Boost logo

Boost-Build :

From: Ilya Sokolov (fal_delivery_at_[hidden])
Date: 2006-05-15 12:53:42


i am using a custom generator for creating .h files, but they are not
present in includes. should i do any special trics for this?

alias reswrap : /third_party/tool/fox//reswrap ;

alias icons_sources
  : # sources
    [ glob *.bmp ]
    [ glob *.gif ]
  ;

h icons
  : # sources
    icons_sources
  : # requirements
    <reswrap_binary>reswrap
  ;

exe calc
  : # source
    /third_party/tool/fox//fox
    icons
    [ glob *.cpp ]
  : # requirements
    <os>NT:<define>_WINDOWS
    <os>NT:<define>WIN32
  ;


# >reswrap -h
#
# Usage: reswrap [options] [-o[a] outfile] files...
# Convert files containing images, text, or binary data into C/C++ data arrays.
#
# Options:
# -o[a] outfile Output [append] to outfile instead of stdout
# -h Print help
# -v Print version number
# -d Output as decimal
# -m Read files with MS-DOS mode (default is binary)
# -x Output as hex (default)
# -t[a] Output as [ascii] text string
# -e Generate external reference declaration
# -i Build an include file
# -k Keep extension, separated by underscore
# -s Suppress header in output file
# -p prefix Place prefix in front of names of declarations and definitions
# -n namespace Place declarations and definitions inside given namespace
# -c cols Change number of columns in output to cols
# -u Force unsigned char even for text mode
# -z Output size in declarations
#
# Each file may be preceded by the following extra option:
# -r name Override resource name of following resource file

import feature ;
feature.feature reswrap_binary : : free dependency ;

import type ;
type.register RESWRAP
  : # suffixes
    reswrap
    bmp
    ico
    gif
    png
  ;

import generators ;
import toolset ;

generators.register-composing reswrap.wrap_to_h : RESWRAP : H ;

toolset.flags wrap_to_h
     RESWRAP_BINARY
    <reswrap_binary>
  ;

actions wrap_to_h bind RESWRAP_BINARY
{
  $(RESWRAP_BINARY) $(RESWRAP_OPTIONS) -i -o $(<) $(>)
}


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk