add TAB variable to ppremake

This commit is contained in:
David Rose 2001-05-30 01:30:00 +00:00
parent c68fd64442
commit 38d80de205
4 changed files with 231 additions and 231 deletions

View File

@ -13,8 +13,8 @@
// files. // files.
// Check the version of ppremake in use. // Check the version of ppremake in use.
#if $[< $[PPREMAKE_VERSION],0.50] #if $[< $[PPREMAKE_VERSION],1.00]
#error You need at least ppremake version 0.50 to process this tree. #error You need at least ppremake version 1.00 to process this tree.
#endif #endif
// What is the name and version of this source tree? // What is the name and version of this source tree?

View File

@ -194,22 +194,22 @@ test : $[test_bin_targets]
// It does assume that the odirs are not '.', however. // It does assume that the odirs are not '.', however.
clean : clean :
#if $[so_sources] #if $[so_sources]
rm -rf $[so_dir] $[TAB]rm -rf $[so_dir]
#endif #endif
#if $[st_sources] #if $[st_sources]
rm -rf $[st_dir] $[TAB]rm -rf $[st_dir]
#endif #endif
rm -f *.pyc *.pyo // Also scrub out old generated Python code. $[TAB]rm -f *.pyc *.pyo // Also scrub out old generated Python code.
// 'cleanall' is not much more thorough than 'clean': At the moment, // 'cleanall' is not much more thorough than 'clean': At the moment,
// it also cleans up the bison and flex output, as well as the // it also cleans up the bison and flex output, as well as the
// dependency cache file. // dependency cache file.
cleanall : clean cleanall : clean
#if $[yxx_so_sources] $[yxx_st_sources] $[lxx_so_sources] $[lxx_st_sources] #if $[yxx_so_sources] $[yxx_st_sources] $[lxx_so_sources] $[lxx_st_sources]
rm -f $[patsubst %.yxx %.lxx,%.cxx,$[yxx_so_sources] $[yxx_st_sources] $[lxx_so_sources] $[lxx_st_sources]] $[TAB]rm -f $[patsubst %.yxx %.lxx,%.cxx,$[yxx_so_sources] $[yxx_st_sources] $[lxx_so_sources] $[lxx_st_sources]]
#endif #endif
#if $[ne $[DEPENDENCY_CACHE_FILENAME],] #if $[ne $[DEPENDENCY_CACHE_FILENAME],]
rm -f $[DEPENDENCY_CACHE_FILENAME] $[TAB]rm -f $[DEPENDENCY_CACHE_FILENAME]
#endif #endif
clean-igate : clean-igate :
@ -219,13 +219,13 @@ clean-igate :
#define igatemscan $[components $[get_igatedb:%=$[RELDIR]/$[so_dir]/%],$[active_component_libs]] #define igatemscan $[components $[get_igatedb:%=$[RELDIR]/$[so_dir]/%],$[active_component_libs]]
#define igatemout $[if $[igatemscan],lib$[TARGET]_module.cxx] #define igatemout $[if $[igatemscan],lib$[TARGET]_module.cxx]
#if $[igatedb] #if $[igatedb]
rm -f $[so_dir]/$[igatedb] $[TAB]rm -f $[so_dir]/$[igatedb]
#endif #endif
#if $[igateoutput] #if $[igateoutput]
rm -f $[so_dir]/$[igateoutput] $[igateoutput:%.cxx=$[so_dir]/%.obj] $[TAB]rm -f $[so_dir]/$[igateoutput] $[igateoutput:%.cxx=$[so_dir]/%.obj]
#endif #endif
#if $[igatemout] #if $[igatemout]
rm -f $[so_dir]/$[igatemout] $[igatemout:%.cxx=$[so_dir]/%.obj] $[TAB]rm -f $[so_dir]/$[igatemout] $[igatemout:%.cxx=$[so_dir]/%.obj]
#endif #endif
#end metalib_target lib_target ss_lib_target #end metalib_target lib_target ss_lib_target
@ -262,12 +262,12 @@ install-igate : $[sort $[installed_igate_files]]
uninstall : $[active_target(metalib_target lib_target static_lib_target ss_lib_target):%=uninstall-lib%] $[active_target(bin_target):%=uninstall-%] uninstall : $[active_target(metalib_target lib_target static_lib_target ss_lib_target):%=uninstall-lib%] $[active_target(bin_target):%=uninstall-%]
#if $[installed_files] #if $[installed_files]
rm -f $[sort $[installed_files]] $[TAB]rm -f $[sort $[installed_files]]
#endif #endif
uninstall-igate : uninstall-igate :
#if $[installed_igate_files] #if $[installed_igate_files]
rm -f $[sort $[installed_igate_files]] $[TAB]rm -f $[sort $[installed_igate_files]]
#endif #endif
@ -284,8 +284,8 @@ uninstall-igate :
$[if $[install_igatedb],$[install_igatedb_dir]] \ $[if $[install_igatedb],$[install_igatedb_dir]] \
] ]
$[directory] : $[directory] :
@test -d $[directory] || echo mkdir -p $[directory] $[TAB]@test -d $[directory] || echo mkdir -p $[directory]
@test -d $[directory] || mkdir -p $[directory] $[TAB]@test -d $[directory] || mkdir -p $[directory]
#end directory #end directory
// We need to make the .obj files depend on the $[so_dir] and // We need to make the .obj files depend on the $[so_dir] and
@ -298,9 +298,9 @@ $[directory] :
$[if $[st_sources],$[st_dir]] \ $[if $[st_sources],$[st_dir]] \
] ]
$[directory]/stamp : $[directory]/stamp :
@test -d $[directory] || echo mkdir -p $[directory] $[TAB]@test -d $[directory] || echo mkdir -p $[directory]
@test -d $[directory] || mkdir -p $[directory] $[TAB]@test -d $[directory] || mkdir -p $[directory]
@touch $[directory]/stamp $[TAB]@touch $[directory]/stamp
#end directory #end directory
@ -368,22 +368,22 @@ $[varname] = $[sources]
// not parallel (requires gmake 3.79) because of link.exe conflicts in TMP dir (see audiotraits dir) // not parallel (requires gmake 3.79) because of link.exe conflicts in TMP dir (see audiotraits dir)
#if $[GENERATE_BUILDDATE] #if $[GENERATE_BUILDDATE]
.NOTPARALLEL $[target] : $[sources] $[so_dir]/stamp $[dtool_ver_dir_cyg]/version.rc .NOTPARALLEL $[target] : $[sources] $[so_dir]/stamp $[dtool_ver_dir_cyg]/version.rc
// first generate builddate for rc compiler // first generate builddate for rc compiler
mkdir -p $[tmpdirname_cyg] // this dir-creation-stuff is leftover from trying to resolve parallel link difficulties $[TAB]mkdir -p $[tmpdirname_cyg] // this dir-creation-stuff is leftover from trying to resolve parallel link difficulties
#define VER_RESOURCE "$[tmpdirname_win]\$[mybasename].res" #define VER_RESOURCE "$[tmpdirname_win]\$[mybasename].res"
cl /nologo /EP "$[dtool_ver_dir]\verdate.cpp" > "$[tmpdirname_win]\verdate.h" $[TAB]cl /nologo /EP "$[dtool_ver_dir]\verdate.cpp" > "$[tmpdirname_win]\verdate.h"
rc /n /i"$[tmpdirname_win]" /fo$[VER_RESOURCE] $[filter /D%, $[flags]] "$[dtool_ver_dir]\version.rc" $[TAB]rc /n /i"$[tmpdirname_win]" /fo$[VER_RESOURCE] $[filter /D%, $[flags]] "$[dtool_ver_dir]\version.rc"
#if $[filter %.cxx %.yxx %.lxx,$[get_sources]] #if $[filter %.cxx %.yxx %.lxx,$[get_sources]]
$[SHARED_LIB_C++] $[VER_RESOURCE] $[TAB]$[SHARED_LIB_C++] $[VER_RESOURCE]
#else #else
$[SHARED_LIB_C] $[VER_RESOURCE] $[TAB]$[SHARED_LIB_C] $[VER_RESOURCE]
#endif #endif
#else #else
.NOTPARALLEL $[target] : $[sources] $[so_dir]/stamp .NOTPARALLEL $[target] : $[sources] $[so_dir]/stamp
#if $[filter %.cxx %.yxx %.lxx,$[get_sources]] #if $[filter %.cxx %.yxx %.lxx,$[get_sources]]
$[SHARED_LIB_C++] $[TAB]$[SHARED_LIB_C++]
#else #else
$[SHARED_LIB_C] $[TAB]$[SHARED_LIB_C]
#endif #endif
#endif #endif
@ -415,26 +415,26 @@ install-lib$[TARGET] : $[installed_files]
uninstall-lib$[TARGET] : uninstall-lib$[TARGET] :
#if $[installed_files] #if $[installed_files]
rm -f $[sort $[installed_files]] $[TAB]rm -f $[sort $[installed_files]]
#endif #endif
#if $[build_dlls] #if $[build_dlls]
$[install_lib_dir]/lib$[TARGET]$[dllext].dll : $[so_dir]/lib$[TARGET]$[dllext].dll $[so_dir]/stamp $[install_lib_dir]/lib$[TARGET]$[dllext].dll : $[so_dir]/lib$[TARGET]$[dllext].dll $[so_dir]/stamp
#define local lib$[TARGET]$[dllext].dll #define local lib$[TARGET]$[dllext].dll
#define dest $[install_lib_dir] #define dest $[install_lib_dir]
cp -f $[so_dir]/$[local] $[dest] $[TAB]cp -f $[so_dir]/$[local] $[dest]
#endif #endif
$[install_lib_dir]/lib$[TARGET]$[dllext].lib : $[so_dir]/lib$[TARGET]$[dllext].lib $[so_dir]/stamp $[install_lib_dir]/lib$[TARGET]$[dllext].lib : $[so_dir]/lib$[TARGET]$[dllext].lib $[so_dir]/stamp
#define local lib$[TARGET]$[dllext].lib #define local lib$[TARGET]$[dllext].lib
#define dest $[install_lib_dir] #define dest $[install_lib_dir]
cp -f $[so_dir]/$[local] $[dest] $[TAB]cp -f $[so_dir]/$[local] $[dest]
#if $[and $[build_dlls],$[build_pdbs]] #if $[and $[build_dlls],$[build_pdbs]]
$[install_lib_dir]/lib$[TARGET]$[dllext].pdb : $[so_dir]/lib$[TARGET]$[dllext].pdb $[so_dir]/stamp $[install_lib_dir]/lib$[TARGET]$[dllext].pdb : $[so_dir]/lib$[TARGET]$[dllext].pdb $[so_dir]/stamp
#define local lib$[TARGET]$[dllext].pdb #define local lib$[TARGET]$[dllext].pdb
#define dest $[install_lib_dir] #define dest $[install_lib_dir]
cp -f $[so_dir]/$[local] $[dest] $[TAB]cp -f $[so_dir]/$[local] $[dest]
#endif #endif
#if $[igatescan] #if $[igatescan]
@ -453,7 +453,7 @@ $[install_lib_dir]/lib$[TARGET]$[dllext].pdb : $[so_dir]/lib$[TARGET]$[dllext].p
$[install_igatedb_dir]/$[igatedb] : $[so_dir]/$[igatedb] $[so_dir]/stamp $[install_igatedb_dir]/$[igatedb] : $[so_dir]/$[igatedb] $[so_dir]/stamp
#define local $[igatedb] #define local $[igatedb]
#define dest $[install_igatedb_dir] #define dest $[install_igatedb_dir]
cp -f $[so_dir]/$[local] $[dest] $[TAB]cp -f $[so_dir]/$[local] $[dest]
// We have to split this out as a separate rule to properly support // We have to split this out as a separate rule to properly support
// parallel make. // parallel make.
@ -461,14 +461,14 @@ $[so_dir]/$[igatedb] : $[so_dir]/$[igateoutput]
lib$[TARGET]_igatescan = $[igatescan] lib$[TARGET]_igatescan = $[igatescan]
$[so_dir]/$[igateoutput] : $[sort $[patsubst %.h,%.h,%.I,%.I,%.T,%.T,%,,$[dependencies $[igatescan]] $[igatescan:%=./%]]] $[so_dir]/stamp $[so_dir]/$[igateoutput] : $[sort $[patsubst %.h,%.h,%.I,%.I,%.T,%.T,%,,$[dependencies $[igatescan]] $[igatescan:%=./%]]] $[so_dir]/stamp
interrogate -od $[so_dir]/$[igatedb] -oc $[so_dir]/$[igateoutput] $[interrogate_options] -module "$[igatemod]" -library "$[igatelib]" $(lib$[TARGET]_igatescan) $[TAB]interrogate -od $[so_dir]/$[igatedb] -oc $[so_dir]/$[igateoutput] $[interrogate_options] -module "$[igatemod]" -library "$[igatelib]" $(lib$[TARGET]_igatescan)
#define target $[igateoutput:%.cxx=$[so_dir]/%.obj] #define target $[igateoutput:%.cxx=$[so_dir]/%.obj]
#define source $[so_dir]/$[igateoutput] #define source $[so_dir]/$[igateoutput]
#define ipath . $[target_ipath] #define ipath . $[target_ipath]
#define flags $[get_cflags] $[C++FLAGS] $[CFLAGS_OPT$[OPTIMIZE]] $[CFLAGS_SHARED] $[building_var:%=/D%] #define flags $[get_cflags] $[C++FLAGS] $[CFLAGS_OPT$[OPTIMIZE]] $[CFLAGS_SHARED] $[building_var:%=/D%]
$[target] : $[source] $[so_dir]/stamp $[target] : $[source] $[so_dir]/stamp
$[COMPILE_C++] $[TAB]$[COMPILE_C++]
#endif // $[igatescan] #endif // $[igatescan]
#if $[igatemout] #if $[igatemout]
@ -483,14 +483,14 @@ lib$[TARGET]_igatemscan = $[igatemscan]
#define target $[so_dir]/$[igatemout] #define target $[so_dir]/$[igatemout]
#define sources $(lib$[TARGET]_igatemscan) #define sources $(lib$[TARGET]_igatemscan)
$[target] : $[sources] $[so_dir]/stamp $[target] : $[sources] $[so_dir]/stamp
interrogate_module -oc $[target] -module "$[igatemod]" -library "$[igatelib]" -python $[sources] $[TAB]interrogate_module -oc $[target] -module "$[igatemod]" -library "$[igatelib]" -python $[sources]
#define target $[igatemout:%.cxx=$[so_dir]/%.obj] #define target $[igatemout:%.cxx=$[so_dir]/%.obj]
#define source $[so_dir]/$[igatemout] #define source $[so_dir]/$[igatemout]
#define ipath . $[target_ipath] #define ipath . $[target_ipath]
#define flags $[get_cflags] $[C++FLAGS] $[CFLAGS_OPT$[OPTIMIZE]] $[CFLAGS_SHARED] $[building_var:%=/D%] #define flags $[get_cflags] $[C++FLAGS] $[CFLAGS_OPT$[OPTIMIZE]] $[CFLAGS_SHARED] $[building_var:%=/D%]
$[target] : $[source] $[so_dir]/stamp $[target] : $[source] $[so_dir]/stamp
$[COMPILE_C++] $[TAB]$[COMPILE_C++]
#endif // $[igatescan] #endif // $[igatescan]
#end metalib_target lib_target #end metalib_target lib_target
@ -513,9 +513,9 @@ $[varname] = $[unique $[patsubst %_src.cxx,,%.cxx %.c %.yxx %.lxx,$[so_dir]/%.ob
#define sources $($[varname]) #define sources $($[varname])
$[target] : $[sources] $[so_dir]/stamp $[target] : $[sources] $[so_dir]/stamp
#if $[filter %.cxx %.yxx %.lxx,$[get_sources]] #if $[filter %.cxx %.yxx %.lxx,$[get_sources]]
$[SHARED_LIB_C++] $[TAB]$[SHARED_LIB_C++]
#else #else
$[SHARED_LIB_C] $[TAB]$[SHARED_LIB_C]
#endif #endif
#if $[build_dlls] #if $[build_dlls]
@ -542,9 +542,9 @@ $[varname] = $[unique $[patsubst %_src.cxx,,%.cxx %.c %.yxx %.lxx,$[st_dir]/%.ob
#define sources $($[varname]) #define sources $($[varname])
$[target] : $[sources] $[st_dir]/stamp $[target] : $[sources] $[st_dir]/stamp
#if $[filter %.cxx %.yxx %.lxx,$[get_sources]] #if $[filter %.cxx %.yxx %.lxx,$[get_sources]]
$[STATIC_LIB_C++] $[TAB]$[STATIC_LIB_C++]
#else #else
$[STATIC_LIB_C] $[TAB]$[STATIC_LIB_C]
#endif #endif
#define installed_files \ #define installed_files \
@ -558,13 +558,13 @@ install-lib$[TARGET] : $[installed_files]
uninstall-lib$[TARGET] : uninstall-lib$[TARGET] :
#if $[installed_files] #if $[installed_files]
rm -f $[sort $[installed_files]] $[TAB]rm -f $[sort $[installed_files]]
#endif #endif
$[install_lib_dir]/lib$[TARGET]$[dllext].lib : $[st_dir]/lib$[TARGET]$[dllext].lib $[st_dir]/stamp $[install_lib_dir]/lib$[TARGET]$[dllext].lib : $[st_dir]/lib$[TARGET]$[dllext].lib $[st_dir]/stamp
#define local lib$[TARGET]$[dllext].lib #define local lib$[TARGET]$[dllext].lib
#define dest $[install_lib_dir] #define dest $[install_lib_dir]
cp -f $[st_dir]/$[local] $[dest] $[TAB]cp -f $[st_dir]/$[local] $[dest]
#end static_lib_target ss_lib_target #end static_lib_target ss_lib_target
@ -583,8 +583,8 @@ $[TARGET] : $[st_dir]/$[TARGET] $[st_dir]/stamp
#define source $[SOURCE] #define source $[SOURCE]
#define script $[COMMAND] #define script $[COMMAND]
$[target] : $[source] $[st_dir]/stamp $[target] : $[source] $[st_dir]/stamp
$[SED] $[TAB]$[SED]
chmod +x $[target] $[TAB]chmod +x $[target]
#define installed_files \ #define installed_files \
$[install_bin_dir]/$[TARGET] $[install_bin_dir]/$[TARGET]
@ -593,13 +593,13 @@ install-$[TARGET] : $[installed_files]
uninstall-$[TARGET] : uninstall-$[TARGET] :
#if $[installed_files] #if $[installed_files]
rm -f $[sort $[installed_files]] $[TAB]rm -f $[sort $[installed_files]]
#endif #endif
#define local $[TARGET] #define local $[TARGET]
#define dest $[install_bin_dir] #define dest $[install_bin_dir]
$[install_bin_dir]/$[TARGET] : $[st_dir]/$[TARGET] $[st_dir]/stamp $[install_bin_dir]/$[TARGET] : $[st_dir]/$[TARGET] $[st_dir]/stamp
cp -f $[st_dir]/$[local] $[dest] $[TAB]cp -f $[st_dir]/$[local] $[dest]
#end sed_bin_target #end sed_bin_target
@ -620,13 +620,13 @@ $[varname] = $[unique $[patsubst %_src.cxx,,%.cxx %.c %.yxx %.lxx,$[st_dir]/%.ob
$[target] : $[sources] $[st_dir]/stamp $[target] : $[sources] $[st_dir]/stamp
#if $[ld] #if $[ld]
// If there's a custom linker defined for the target, we have to use it. // If there's a custom linker defined for the target, we have to use it.
$[ld] -o $[target] $[sources] $[lpath:%=-L%] $[libs:%=-l%] $[TAB]$[ld] -o $[target] $[sources] $[lpath:%=-L%] $[libs:%=-l%]$[TAB]
#else #else
// Otherwise, we can use the normal linker. // Otherwise, we can use the normal linker.
#if $[filter %.cxx %.yxx %.lxx,$[get_sources]] #if $[filter %.cxx %.yxx %.lxx,$[get_sources]]
$[LINK_BIN_C++] $[TAB]$[LINK_BIN_C++]
#else #else
$[LINK_BIN_C] $[TAB]$[LINK_BIN_C]
#endif #endif
#endif #endif
@ -646,19 +646,19 @@ install-$[TARGET] : $[installed_files]
uninstall-$[TARGET] : uninstall-$[TARGET] :
#if $[installed_files] #if $[installed_files]
rm -f $[sort $[installed_files]] $[TAB]rm -f $[sort $[installed_files]]
#endif #endif
$[install_bin_dir]/$[TARGET].exe : $[st_dir]/$[TARGET].exe $[st_dir]/stamp $[install_bin_dir]/$[TARGET].exe : $[st_dir]/$[TARGET].exe $[st_dir]/stamp
#define local $[TARGET].exe #define local $[TARGET].exe
#define dest $[install_bin_dir] #define dest $[install_bin_dir]
cp -f $[st_dir]/$[local] $[dest] $[TAB]cp -f $[st_dir]/$[local] $[dest]
#if $[build_pdbs] #if $[build_pdbs]
$[install_bin_dir]/$[TARGET].pdb : $[st_dir]/$[TARGET].pdb $[st_dir]/stamp $[install_bin_dir]/$[TARGET].pdb : $[st_dir]/$[TARGET].pdb $[st_dir]/stamp
#define local $[TARGET].pdb #define local $[TARGET].pdb
#define dest $[install_bin_dir] #define dest $[install_bin_dir]
cp -f $[st_dir]/$[local] $[dest] $[TAB]cp -f $[st_dir]/$[local] $[dest]
#endif #endif
#end bin_target #end bin_target
@ -679,9 +679,9 @@ $[varname] = $[unique $[patsubst %_src.cxx,,%.cxx %.c %.yxx %.lxx,$[st_dir]/%.ob
#define sources $($[varname]) #define sources $($[varname])
$[target] : $[sources] $[st_dir]/stamp $[target] : $[sources] $[st_dir]/stamp
#if $[filter %.cxx %.yxx %.lxx,$[get_sources]] #if $[filter %.cxx %.yxx %.lxx,$[get_sources]]
$[LINK_BIN_C++] $[TAB]$[LINK_BIN_C++]
#else #else
$[LINK_BIN_C] $[TAB]$[LINK_BIN_C]
#endif #endif
#end noinst_bin_target test_bin_target #end noinst_bin_target test_bin_target
@ -699,9 +699,9 @@ $[target] : $[sources] $[st_dir]/stamp
#define target $[patsubst %.yxx,%.cxx,$[file]] #define target $[patsubst %.yxx,%.cxx,$[file]]
#define source $[file] #define source $[file]
$[target] : $[source] $[target] : $[source]
$[BISON] $[YFLAGS] -y $[if $[YACC_PREFIX],-d --name-prefix=$[YACC_PREFIX]] $[source] $[TAB]$[BISON] $[YFLAGS] -y $[if $[YACC_PREFIX],-d --name-prefix=$[YACC_PREFIX]] $[source]
mv y.tab.c $[target] $[TAB]mv y.tab.c $[target]
mv y.tab.h $[patsubst %.yxx,%.h,$[source]] $[TAB]mv y.tab.h $[patsubst %.yxx,%.h,$[source]]
#end file #end file
@ -710,11 +710,11 @@ $[target] : $[source]
#define target $[patsubst %.lxx,%.cxx,$[file]] #define target $[patsubst %.lxx,%.cxx,$[file]]
#define source $[file] #define source $[file]
$[target] : $[source] $[target] : $[source]
$[FLEX] $[LFLAGS] $[if $[YACC_PREFIX],-P$[YACC_PREFIX]] -olex.yy.c $[source] $[TAB]$[FLEX] $[LFLAGS] $[if $[YACC_PREFIX],-P$[YACC_PREFIX]] -olex.yy.c $[source]
#define source lex.yy.c #define source lex.yy.c
#define script /#include <unistd.h>/d #define script /#include <unistd.h>/d
$[SED] $[TAB]$[SED]
rm $[source] $[TAB]rm $[source]
#end file #end file
@ -725,7 +725,7 @@ $[target] : $[source]
#define ipath $[file_ipath] #define ipath $[file_ipath]
#define flags $[cflags] $[CFLAGS_SHARED] $[all_sources $[building_var:%=/D%],$[file]] #define flags $[cflags] $[CFLAGS_SHARED] $[all_sources $[building_var:%=/D%],$[file]]
$[target] : $[source] $[dependencies $[source]] $[so_dir]/stamp $[target] : $[source] $[dependencies $[source]] $[so_dir]/stamp
$[COMPILE_C] $[TAB]$[COMPILE_C]
#end file #end file
@ -737,7 +737,7 @@ $[target] : $[source] $[dependencies $[source]] $[so_dir]/stamp
#define ipath $[file_ipath] #define ipath $[file_ipath]
#define flags $[cflags] $[all_sources $[building_var:%=/D%],$[file]] #define flags $[cflags] $[all_sources $[building_var:%=/D%],$[file]]
$[target] : $[source] $[dependencies $[source]] $[st_dir]/stamp $[target] : $[source] $[dependencies $[source]] $[st_dir]/stamp
$[COMPILE_C] $[TAB]$[COMPILE_C]
#end file #end file
@ -750,7 +750,7 @@ $[target] : $[source] $[dependencies $[source]] $[st_dir]/stamp
// Yacc must run before some files can be compiled, so all files // Yacc must run before some files can be compiled, so all files
// depend on yacc having run. // depend on yacc having run.
$[target] : $[source] $[dependencies $[file]] $[yxx_so_sources:%.yxx=%.cxx] $[so_dir]/stamp $[target] : $[source] $[dependencies $[file]] $[yxx_so_sources:%.yxx=%.cxx] $[so_dir]/stamp
$[COMPILE_C++] $[TAB]$[COMPILE_C++]
#end file #end file
@ -762,7 +762,7 @@ $[target] : $[source] $[dependencies $[file]] $[yxx_so_sources:%.yxx=%.cxx] $[so
#define ipath $[file_ipath] #define ipath $[file_ipath]
#define flags $[c++flags] $[all_sources $[building_var:%=/D%],$[file]] #define flags $[c++flags] $[all_sources $[building_var:%=/D%],$[file]]
$[target] : $[source] $[dependencies $[file]] $[yxx_st_sources:%.yxx=%.cxx] $[st_dir]/stamp $[target] : $[source] $[dependencies $[file]] $[yxx_st_sources:%.yxx=%.cxx] $[st_dir]/stamp
$[COMPILE_C++] $[TAB]$[COMPILE_C++]
#end file #end file
@ -775,7 +775,7 @@ $[target] : $[source] $[dependencies $[file]] $[yxx_st_sources:%.yxx=%.cxx] $[st
// Yacc must run before some files can be compiled, so all files // Yacc must run before some files can be compiled, so all files
// depend on yacc having run. // depend on yacc having run.
$[target] : $[source] $[dependencies $[file]] $[yxx_so_sources:%.yxx=%.cxx] $[so_dir]/stamp $[target] : $[source] $[dependencies $[file]] $[yxx_so_sources:%.yxx=%.cxx] $[so_dir]/stamp
$[COMPILE_C++] $[TAB]$[COMPILE_C++]
#end file #end file
@ -787,7 +787,7 @@ $[target] : $[source] $[dependencies $[file]] $[yxx_so_sources:%.yxx=%.cxx] $[so
#define ipath $[file_ipath] #define ipath $[file_ipath]
#define flags $[noopt_c++flags] $[all_sources $[building_var:%=/D%],$[file]] #define flags $[noopt_c++flags] $[all_sources $[building_var:%=/D%],$[file]]
$[target] : $[source] $[dependencies $[file]] $[yxx_st_sources:%.yxx=%.cxx] $[st_dir]/stamp $[target] : $[source] $[dependencies $[file]] $[yxx_st_sources:%.yxx=%.cxx] $[st_dir]/stamp
$[COMPILE_C++] $[TAB]$[COMPILE_C++]
#end file #end file
@ -797,53 +797,53 @@ $[target] : $[source] $[dependencies $[file]] $[yxx_st_sources:%.yxx=%.cxx] $[st
$[install_bin_dir]/$[file] : $[file] $[install_bin_dir]/$[file] : $[file]
#define local $[file] #define local $[file]
#define dest $[install_bin_dir] #define dest $[install_bin_dir]
cp -f $[local] $[dest] $[TAB]cp -f $[local] $[dest]
#end file #end file
#foreach file $[install_headers] #foreach file $[install_headers]
$[install_headers_dir]/$[file] : $[file] $[install_headers_dir]/$[file] : $[file]
#define local $[file] #define local $[file]
#define dest $[install_headers_dir] #define dest $[install_headers_dir]
cp -f $[local] $[dest] $[TAB]cp -f $[local] $[dest]
#end file #end file
#foreach file $[install_parser_inc] #foreach file $[install_parser_inc]
$[install_parser_inc_dir]/$[file] : $[file] $[install_parser_inc_dir]/$[file] : $[file]
#define local $[file] #define local $[file]
#define dest $[install_parser_inc_dir] #define dest $[install_parser_inc_dir]
cp -f $[local] $[dest] $[TAB]cp -f $[local] $[dest]
#end file #end file
#foreach file $[install_data] #foreach file $[install_data]
$[install_data_dir]/$[file] : $[file] $[install_data_dir]/$[file] : $[file]
#define local $[file] #define local $[file]
#define dest $[install_data_dir] #define dest $[install_data_dir]
cp -f $[local] $[dest] $[TAB]cp -f $[local] $[dest]
#end file #end file
#foreach file $[install_config] #foreach file $[install_config]
$[install_config_dir]/$[file] : $[file] $[install_config_dir]/$[file] : $[file]
#define local $[file] #define local $[file]
#define dest $[install_config_dir] #define dest $[install_config_dir]
cp -f $[local] $[dest] $[TAB]cp -f $[local] $[dest]
#end file #end file
// Finally, all the special targets. These are commands that just need // Finally, all the special targets. These are commands that just need
// to be invoked; we don't pretend to know what they are. // to be invoked; we don't pretend to know what they are.
#forscopes special_target #forscopes special_target
$[TARGET] : $[TARGET] :
$[COMMAND] $[TAB]$[COMMAND]
#end special_target #end special_target
// Finally, the rules to freshen the Makefile itself. // Finally, the rules to freshen the Makefile itself.
Makefile : $[SOURCE_FILENAME] Makefile : $[SOURCE_FILENAME]
ppremake $[TAB]ppremake
#if $[and $[DEPENDENCY_CACHE_FILENAME],$[dep_sources]] #if $[and $[DEPENDENCY_CACHE_FILENAME],$[dep_sources]]
$[DEPENDENCY_CACHE_FILENAME] : $[dep_sources] $[DEPENDENCY_CACHE_FILENAME] : $[dep_sources]
@ppremake -D $[DEPENDENCY_CACHE_FILENAME] $[TAB]@ppremake -D $[DEPENDENCY_CACHE_FILENAME]
#endif #endif
@ -896,65 +896,65 @@ install : $[if $[CONFIG_HEADER],$[install_headers_dir] $[install_headers_dir]/$[
install-igate : $[subdirs:%=install-igate-%] install-igate : $[subdirs:%=install-igate-%]
uninstall : $[subdirs:%=uninstall-%] uninstall : $[subdirs:%=uninstall-%]
#if $[CONFIG_HEADER] #if $[CONFIG_HEADER]
rm -f $[install_headers_dir]/$[CONFIG_HEADER] $[TAB]rm -f $[install_headers_dir]/$[CONFIG_HEADER]
#endif #endif
uninstall-igate : $[subdirs:%=uninstall-igate-%] uninstall-igate : $[subdirs:%=uninstall-igate-%]
#formap dirname subdirs #formap dirname subdirs
#define depends #define depends
$[dirname] : $[dirnames $[if $[build_directory],$[DIRNAME]],$[DEPEND_DIRS]] $[dirname] : $[dirnames $[if $[build_directory],$[DIRNAME]],$[DEPEND_DIRS]]
cd ./$[PATH] && $(MAKE) all $[TAB]cd ./$[PATH] && $(MAKE) all
#end dirname #end dirname
#formap dirname subdirs #formap dirname subdirs
test-$[dirname] : test-$[dirname] :
cd ./$[PATH] && $(MAKE) test $[TAB]cd ./$[PATH] && $(MAKE) test
#end dirname #end dirname
#formap dirname subdirs #formap dirname subdirs
clean-$[dirname] : clean-$[dirname] :
cd ./$[PATH] && $(MAKE) clean $[TAB]cd ./$[PATH] && $(MAKE) clean
#end dirname #end dirname
#formap dirname subdirs #formap dirname subdirs
clean-igate-$[dirname] : clean-igate-$[dirname] :
cd ./$[PATH] && $(MAKE) clean-igate $[TAB]cd ./$[PATH] && $(MAKE) clean-igate
#end dirname #end dirname
#formap dirname subdirs #formap dirname subdirs
cleanall-$[dirname] : $[patsubst %,cleanall-%,$[dirnames $[if $[build_directory],$[DIRNAME]],$[DEPEND_DIRS]]] cleanall-$[dirname] : $[patsubst %,cleanall-%,$[dirnames $[if $[build_directory],$[DIRNAME]],$[DEPEND_DIRS]]]
cd ./$[PATH] && $(MAKE) cleanall $[TAB]cd ./$[PATH] && $(MAKE) cleanall
#end dirname #end dirname
#formap dirname subdirs #formap dirname subdirs
install-$[dirname] : $[patsubst %,install-%,$[dirnames $[if $[build_directory],$[DIRNAME]],$[DEPEND_DIRS]]] install-$[dirname] : $[patsubst %,install-%,$[dirnames $[if $[build_directory],$[DIRNAME]],$[DEPEND_DIRS]]]
cd ./$[PATH] && $(MAKE) install $[TAB]cd ./$[PATH] && $(MAKE) install
#end dirname #end dirname
#formap dirname subdirs #formap dirname subdirs
install-igate-$[dirname] : install-igate-$[dirname] :
cd ./$[PATH] && $(MAKE) install-igate $[TAB]cd ./$[PATH] && $(MAKE) install-igate
#end dirname #end dirname
#formap dirname subdirs #formap dirname subdirs
uninstall-$[dirname] : uninstall-$[dirname] :
cd ./$[PATH] && $(MAKE) uninstall $[TAB]cd ./$[PATH] && $(MAKE) uninstall
#end dirname #end dirname
#formap dirname subdirs #formap dirname subdirs
uninstall-igate-$[dirname] : uninstall-igate-$[dirname] :
cd ./$[PATH] && $(MAKE) uninstall-igate $[TAB]cd ./$[PATH] && $(MAKE) uninstall-igate
#end dirname #end dirname
#if $[ne $[CONFIG_HEADER],] #if $[ne $[CONFIG_HEADER],]
$[install_headers_dir] : $[install_headers_dir] :
@test -d $[install_headers_dir] || echo mkdir -p $[install_headers_dir] $[TAB]@test -d $[install_headers_dir] || echo mkdir -p $[install_headers_dir]
@test -d $[install_headers_dir] || mkdir -p $[install_headers_dir] $[TAB]@test -d $[install_headers_dir] || mkdir -p $[install_headers_dir]
$[install_headers_dir]/$[CONFIG_HEADER] : $[CONFIG_HEADER] $[install_headers_dir]/$[CONFIG_HEADER] : $[CONFIG_HEADER]
#define local $[CONFIG_HEADER] #define local $[CONFIG_HEADER]
#define dest $[install_headers_dir] #define dest $[install_headers_dir]
cp -f $[local] $[dest] $[TAB]cp -f $[local] $[dest]
#endif #endif
#end Makefile #end Makefile

View File

@ -194,22 +194,22 @@ test : $[test_bin_targets]
// It does assume that the odirs are not '.', however. // It does assume that the odirs are not '.', however.
clean : clean :
#if $[so_sources] #if $[so_sources]
-rmdir /s /q $[so_dir] $[TAB]-rmdir /s /q $[so_dir]
#endif #endif
#if $[st_sources] #if $[st_sources]
-rmdir /s /q $[st_dir] $[TAB]-rmdir /s /q $[st_dir]
#endif #endif
-del /f *.pyc *.pyo // Also scrub out old generated Python code. $[TAB]-del /f *.pyc *.pyo // Also scrub out old generated Python code.
// 'cleanall' is not much more thorough than 'clean': At the moment, // 'cleanall' is not much more thorough than 'clean': At the moment,
// it also cleans up the bison and flex output, as well as the // it also cleans up the bison and flex output, as well as the
// dependency cache file. // dependency cache file.
cleanall : clean cleanall : clean
#if $[yxx_so_sources] $[yxx_st_sources] $[lxx_so_sources] $[lxx_st_sources] #if $[yxx_so_sources] $[yxx_st_sources] $[lxx_so_sources] $[lxx_st_sources]
-del /f $[patsubst %.yxx %.lxx,%.cxx,$[yxx_so_sources] $[yxx_st_sources] $[lxx_so_sources] $[lxx_st_sources]] $[TAB]-del /f $[patsubst %.yxx %.lxx,%.cxx,$[yxx_so_sources] $[yxx_st_sources] $[lxx_so_sources] $[lxx_st_sources]]
#endif #endif
#if $[ne $[DEPENDENCY_CACHE_FILENAME],] #if $[ne $[DEPENDENCY_CACHE_FILENAME],]
-del /f $[DEPENDENCY_CACHE_FILENAME] $[TAB]-del /f $[DEPENDENCY_CACHE_FILENAME]
#endif #endif
clean-igate : clean-igate :
@ -219,13 +219,13 @@ clean-igate :
#define igatemscan $[components $[get_igatedb:%=$[RELDIR]/$[so_dir]/%],$[active_component_libs]] #define igatemscan $[components $[get_igatedb:%=$[RELDIR]/$[so_dir]/%],$[active_component_libs]]
#define igatemout $[if $[igatemscan],lib$[TARGET]_module.cxx] #define igatemout $[if $[igatemscan],lib$[TARGET]_module.cxx]
#if $[igatedb] #if $[igatedb]
-del /f $[so_dir]\$[igatedb] $[TAB]-del /f $[so_dir]\$[igatedb]
#endif #endif
#if $[igateoutput] #if $[igateoutput]
-del /f $[so_dir]\$[igateoutput] $[igateoutput:%.cxx=$[so_dir]\%.obj] $[TAB]-del /f $[so_dir]\$[igateoutput] $[igateoutput:%.cxx=$[so_dir]\%.obj]
#endif #endif
#if $[igatemout] #if $[igatemout]
-del /f $[so_dir]\$[igatemout] $[igatemout:%.cxx=$[so_dir]\%.obj] $[TAB]-del /f $[so_dir]\$[igatemout] $[igatemout:%.cxx=$[so_dir]\%.obj]
#endif #endif
#end metalib_target lib_target ss_lib_target #end metalib_target lib_target ss_lib_target
@ -262,12 +262,12 @@ install-igate : $[sort $[installed_igate_files]]
uninstall : $[active_target(metalib_target lib_target static_lib_target ss_lib_target):%=uninstall-lib%] $[active_target(bin_target):%=uninstall-%] uninstall : $[active_target(metalib_target lib_target static_lib_target ss_lib_target):%=uninstall-lib%] $[active_target(bin_target):%=uninstall-%]
#foreach file $[sort $[installed_files]] #foreach file $[sort $[installed_files]]
-del /f $[file] $[TAB]-del /f $[file]
#end file #end file
uninstall-igate : uninstall-igate :
#foreach file $[sort $[installed_igate_files]] #foreach file $[sort $[installed_igate_files]]
-del /f $[file] $[TAB]-del /f $[file]
#end file #end file
@ -286,7 +286,7 @@ uninstall-igate :
$[if $[install_igatedb],$[install_igatedb_dir]] \ $[if $[install_igatedb],$[install_igatedb_dir]] \
] ]
$[osfilename $[directory]] : $[osfilename $[directory]] :
mkdir $[osfilename $[directory]] $[TAB]mkdir $[osfilename $[directory]]
#end directory #end directory
@ -350,16 +350,16 @@ $[varname] = $[osfilename $[sources]]
#if $[GENERATE_BUILDDATE] #if $[GENERATE_BUILDDATE]
$[target] : $[sources] "$[dtool_ver_dir]\version.rc" $[target] : $[sources] "$[dtool_ver_dir]\version.rc"
// first generate builddate for rc compiler // first generate builddate for rc compiler
cl /nologo /EP "$[dtool_ver_dir]\verdate.cpp" > "$[TEMP]\verdate.h" $[TAB]cl /nologo /EP "$[dtool_ver_dir]\verdate.cpp" > "$[TEMP]\verdate.h"
rc /n /I$[TEMP] /fo$[ver_resource] $[filter /D%, $[flags]] "$[dtool_ver_dir]\version.rc" $[TAB]rc /n /I$[TEMP] /fo$[ver_resource] $[filter /D%, $[flags]] "$[dtool_ver_dir]\version.rc"
rm -f "$[dtool_ver_dir]\verdate.h" $[TAB]rm -f "$[dtool_ver_dir]\verdate.h"
#else #else
$[target] : $[sources] $[target] : $[sources]
#endif #endif
#if $[filter %.cxx %.yxx %.lxx,$[get_sources]] #if $[filter %.cxx %.yxx %.lxx,$[get_sources]]
$[SHARED_LIB_C++] $[TAB]$[SHARED_LIB_C++]
#else #else
$[SHARED_LIB_C] $[TAB]$[SHARED_LIB_C]
#endif #endif
#if $[build_dlls] #if $[build_dlls]
@ -389,26 +389,26 @@ install-lib$[TARGET] : $[installed_files]
uninstall-lib$[TARGET] : uninstall-lib$[TARGET] :
#foreach file $[sort $[installed_files]] #foreach file $[sort $[installed_files]]
-del /f $[file] $[TAB]-del /f $[file]
#end file #end file
#if $[build_dlls] #if $[build_dlls]
$[install_lib_dir]\lib$[TARGET]$[dllext].dll : $[so_dir]\lib$[TARGET]$[dllext].dll $[install_lib_dir]\lib$[TARGET]$[dllext].dll : $[so_dir]\lib$[TARGET]$[dllext].dll
#define local lib$[TARGET]$[dllext].dll #define local lib$[TARGET]$[dllext].dll
#define dest $[install_lib_dir] #define dest $[install_lib_dir]
$[NT_COPYCMD] $[so_dir]\$[local] $[dest] $[TAB]$[NT_COPYCMD] $[so_dir]\$[local] $[dest]
#endif #endif
$[install_lib_dir]\lib$[TARGET]$[dllext].lib : $[so_dir]\lib$[TARGET]$[dllext].lib $[install_lib_dir]\lib$[TARGET]$[dllext].lib : $[so_dir]\lib$[TARGET]$[dllext].lib
#define local lib$[TARGET]$[dllext].lib #define local lib$[TARGET]$[dllext].lib
#define dest $[install_lib_dir] #define dest $[install_lib_dir]
$[NT_COPYCMD] $[so_dir]\$[local] $[dest] $[TAB]$[NT_COPYCMD] $[so_dir]\$[local] $[dest]
#if $[and $[build_dlls],$[build_pdbs]] #if $[and $[build_dlls],$[build_pdbs]]
$[install_lib_dir]\lib$[TARGET]$[dllext].pdb : $[so_dir]\lib$[TARGET]$[dllext].pdb $[install_lib_dir]\lib$[TARGET]$[dllext].pdb : $[so_dir]\lib$[TARGET]$[dllext].pdb
#define local lib$[TARGET]$[dllext].pdb #define local lib$[TARGET]$[dllext].pdb
#define dest $[install_lib_dir] #define dest $[install_lib_dir]
$[NT_COPYCMD] $[so_dir]\$[local] $[dest] $[TAB]$[NT_COPYCMD] $[so_dir]\$[local] $[dest]
#endif #endif
#if $[igatescan] #if $[igatescan]
@ -427,19 +427,19 @@ $[install_lib_dir]\lib$[TARGET]$[dllext].pdb : $[so_dir]\lib$[TARGET]$[dllext].p
$[install_igatedb_dir]\$[igatedb] : $[so_dir]\$[igatedb] $[install_igatedb_dir]\$[igatedb] : $[so_dir]\$[igatedb]
#define local $[igatedb] #define local $[igatedb]
#define dest $[install_igatedb_dir] #define dest $[install_igatedb_dir]
$[NT_COPYCMD] $[so_dir]\$[local] $[dest] $[TAB]$[NT_COPYCMD] $[so_dir]\$[local] $[dest]
lib$[TARGET]_igatescan = $[osfilename $[igatescan]] lib$[TARGET]_igatescan = $[osfilename $[igatescan]]
$[so_dir]\$[igatedb] $[so_dir]\$[igateoutput] : $[sort $[patsubst %.h,%.h,%.I,%.I,%.T,%.T,%,,$[dependencies $[igatescan]] $[igatescan:%=./%]]] $[so_dir]\$[igatedb] $[so_dir]\$[igateoutput] : $[sort $[patsubst %.h,%.h,%.I,%.I,%.T,%.T,%,,$[dependencies $[igatescan]] $[igatescan:%=./%]]]
// We use forward slash for interrogate because it prefers those. // We use forward slash for interrogate because it prefers those.
interrogate -od $[so_dir]/$[igatedb] -oc $[so_dir]/$[igateoutput] $[interrogate_options] -module "$[igatemod]" -library "$[igatelib]" $(lib$[TARGET]_igatescan) $[TAB]interrogate -od $[so_dir]/$[igatedb] -oc $[so_dir]/$[igateoutput] $[interrogate_options] -module "$[igatemod]" -library "$[igatelib]" $(lib$[TARGET]_igatescan)
#define target $[igateoutput:%.cxx=$[so_dir]\%.obj] #define target $[igateoutput:%.cxx=$[so_dir]\%.obj]
#define source $[so_dir]\$[igateoutput] #define source $[so_dir]\$[igateoutput]
#define ipath . $[target_ipath] #define ipath . $[target_ipath]
#define flags $[get_cflags] $[C++FLAGS] $[CFLAGS_OPT$[OPTIMIZE]] $[CFLAGS_SHARED] $[building_var:%=/D%] #define flags $[get_cflags] $[C++FLAGS] $[CFLAGS_OPT$[OPTIMIZE]] $[CFLAGS_SHARED] $[building_var:%=/D%]
$[target] : $[source] $[target] : $[source]
$[COMPILE_C++] $[TAB]$[COMPILE_C++]
#endif // $[igatescan] #endif // $[igatescan]
#if $[igatemout] #if $[igatemout]
@ -454,14 +454,14 @@ lib$[TARGET]_igatemscan = $[osfilename $[igatemscan]]
#define target $[so_dir]\$[igatemout] #define target $[so_dir]\$[igatemout]
#define sources $(lib$[TARGET]_igatemscan) #define sources $(lib$[TARGET]_igatemscan)
$[target] : $[sources] $[target] : $[sources]
interrogate_module -oc $[target] -module "$[igatemod]" -library "$[igatelib]" -python $[sources] $[TAB]interrogate_module -oc $[target] -module "$[igatemod]" -library "$[igatelib]" -python $[sources]
#define target $[igatemout:%.cxx=$[so_dir]\%.obj] #define target $[igatemout:%.cxx=$[so_dir]\%.obj]
#define source $[so_dir]\$[igatemout] #define source $[so_dir]\$[igatemout]
#define ipath . $[target_ipath] #define ipath . $[target_ipath]
#define flags $[get_cflags] $[C++FLAGS] $[CFLAGS_OPT$[OPTIMIZE]] $[CFLAGS_SHARED] $[building_var:%=/D%] #define flags $[get_cflags] $[C++FLAGS] $[CFLAGS_OPT$[OPTIMIZE]] $[CFLAGS_SHARED] $[building_var:%=/D%]
$[target] : $[source] $[target] : $[source]
$[COMPILE_C++] $[TAB]$[COMPILE_C++]
#endif // $[igatescan] #endif // $[igatescan]
#end metalib_target lib_target #end metalib_target lib_target
@ -484,9 +484,9 @@ $[varname] = $[osfilename $[unique $[patsubst %_src.cxx,,%.cxx %.c %.yxx %.lxx,$
#define sources $($[varname]) #define sources $($[varname])
$[target] : $[sources] $[target] : $[sources]
#if $[filter %.cxx %.yxx %.lxx,$[get_sources]] #if $[filter %.cxx %.yxx %.lxx,$[get_sources]]
$[SHARED_LIB_C++] $[TAB]$[SHARED_LIB_C++]
#else #else
$[SHARED_LIB_C] $[TAB]$[SHARED_LIB_C]
#endif #endif
#if $[build_dlls] #if $[build_dlls]
@ -513,9 +513,9 @@ $[varname] = $[osfilename $[unique $[patsubst %_src.cxx,,%.cxx %.c %.yxx %.lxx,$
#define sources $($[varname]) #define sources $($[varname])
$[target] : $[sources] $[target] : $[sources]
#if $[filter %.cxx %.yxx %.lxx,$[get_sources]] #if $[filter %.cxx %.yxx %.lxx,$[get_sources]]
$[STATIC_LIB_C++] $[TAB]$[STATIC_LIB_C++]
#else #else
$[STATIC_LIB_C] $[TAB]$[STATIC_LIB_C]
#endif #endif
#define installed_files \ #define installed_files \
@ -529,13 +529,13 @@ install-lib$[TARGET] : $[installed_files]
uninstall-lib$[TARGET] : uninstall-lib$[TARGET] :
#foreach file $[sort $[installed_files]] #foreach file $[sort $[installed_files]]
-del /f $[file] $[TAB]-del /f $[file]
#end file #end file
$[install_lib_dir]\lib$[TARGET]$[dllext].lib : $[st_dir]\lib$[TARGET]$[dllext].lib $[install_lib_dir]\lib$[TARGET]$[dllext].lib : $[st_dir]\lib$[TARGET]$[dllext].lib
#define local lib$[TARGET]$[dllext].lib #define local lib$[TARGET]$[dllext].lib
#define dest $[install_lib_dir] #define dest $[install_lib_dir]
$[NT_COPYCMD] $[st_dir]\$[local] $[dest] $[TAB]$[NT_COPYCMD] $[st_dir]\$[local] $[dest]
#end static_lib_target ss_lib_target #end static_lib_target ss_lib_target
@ -554,7 +554,7 @@ $[TARGET] : $[st_dir]\$[TARGET]
#define source $[SOURCE] #define source $[SOURCE]
#define script $[COMMAND] #define script $[COMMAND]
$[target] : $[source] $[target] : $[source]
$[SED] $[TAB]$[SED]
#define installed_files \ #define installed_files \
$[install_bin_dir]\$[TARGET] $[install_bin_dir]\$[TARGET]
@ -563,13 +563,13 @@ install-$[TARGET] : $[installed_files]
uninstall-$[TARGET] : uninstall-$[TARGET] :
#foreach file $[sort $[installed_files]] #foreach file $[sort $[installed_files]]
-del /f $[file] $[TAB]-del /f $[file]
#end file #end file
#define local $[TARGET] #define local $[TARGET]
#define dest $[install_bin_dir] #define dest $[install_bin_dir]
$[install_bin_dir]\$[TARGET] : $[st_dir]\$[TARGET] $[install_bin_dir]\$[TARGET] : $[st_dir]\$[TARGET]
$[NT_COPYCMD] $[st_dir]\$[local] $[dest] $[TAB]$[NT_COPYCMD] $[st_dir]\$[local] $[dest]
#end sed_bin_target #end sed_bin_target
@ -591,13 +591,13 @@ $[varname] = $[osfilename $[unique $[patsubst %_src.cxx,,%.cxx %.c %.yxx %.lxx,$
$[target] : $[sources] $[target] : $[sources]
#if $[ld] #if $[ld]
// If there's a custom linker defined for the target, we have to use it. // If there's a custom linker defined for the target, we have to use it.
$[ld] -o $[target] $[sources] $[lpath:%=-L%] $[libs:%=-l%] $[TAB]$[ld] -o $[target] $[sources] $[lpath:%=-L%] $[libs:%=-l%]$[TAB]
#else #else
// Otherwise, we can use the normal linker. // Otherwise, we can use the normal linker.
#if $[filter %.cxx %.yxx %.lxx,$[get_sources]] #if $[filter %.cxx %.yxx %.lxx,$[get_sources]]
$[LINK_BIN_C++] $[TAB]$[LINK_BIN_C++]
#else #else
$[LINK_BIN_C] $[TAB]$[LINK_BIN_C]
#endif #endif
#endif #endif
#define transitive_link #define transitive_link
@ -618,19 +618,19 @@ install-$[TARGET] : $[installed_files]
uninstall-$[TARGET] : uninstall-$[TARGET] :
#foreach file $[sort $[installed_files]] #foreach file $[sort $[installed_files]]
-del /f $[file] $[TAB]-del /f $[file]
#end file #end file
$[install_bin_dir]\$[TARGET].exe : $[st_dir]\$[TARGET].exe $[install_bin_dir]\$[TARGET].exe : $[st_dir]\$[TARGET].exe
#define local $[TARGET].exe #define local $[TARGET].exe
#define dest $[install_bin_dir] #define dest $[install_bin_dir]
$[NT_COPYCMD] $[st_dir]\$[local] $[dest] $[TAB]$[NT_COPYCMD] $[st_dir]\$[local] $[dest]
#if $[build_pdbs] #if $[build_pdbs]
$[install_bin_dir]\$[TARGET].pdb : $[st_dir]\$[TARGET].pdb $[install_bin_dir]\$[TARGET].pdb : $[st_dir]\$[TARGET].pdb
#define local $[TARGET].pdb #define local $[TARGET].pdb
#define dest $[install_bin_dir] #define dest $[install_bin_dir]
$[NT_COPYCMD] $[st_dir]\$[local] $[dest] $[TAB]$[NT_COPYCMD] $[st_dir]\$[local] $[dest]
#endif #endif
#end bin_target #end bin_target
@ -651,9 +651,9 @@ $[varname] = $[osfilename $[unique $[patsubst %_src.cxx,,%.cxx %.c %.yxx %.lxx,$
#define sources $($[varname]) #define sources $($[varname])
$[target] : $[sources] $[target] : $[sources]
#if $[filter %.cxx %.yxx %.lxx,$[get_sources]] #if $[filter %.cxx %.yxx %.lxx,$[get_sources]]
$[LINK_BIN_C++] $[TAB]$[LINK_BIN_C++]
#else #else
$[LINK_BIN_C] $[TAB]$[LINK_BIN_C]
#endif #endif
#end noinst_bin_target test_bin_target #end noinst_bin_target test_bin_target
@ -671,9 +671,9 @@ $[target] : $[sources]
#define target $[patsubst %.yxx,%.cxx,$[file]] #define target $[patsubst %.yxx,%.cxx,$[file]]
#define source $[file] #define source $[file]
$[target] : $[source] $[target] : $[source]
$[BISON] $[YFLAGS] -y $[if $[YACC_PREFIX],-d --name-prefix=$[YACC_PREFIX]] $[source] $[TAB]$[BISON] $[YFLAGS] -y $[if $[YACC_PREFIX],-d --name-prefix=$[YACC_PREFIX]] $[source]
move y.tab.c $[target] $[TAB]move y.tab.c $[target]
move y.tab.h $[patsubst %.yxx,%.h,$[source]] $[TAB]move y.tab.h $[patsubst %.yxx,%.h,$[source]]
#end file #end file
@ -682,11 +682,11 @@ $[target] : $[source]
#define target $[patsubst %.lxx,%.cxx,$[file]] #define target $[patsubst %.lxx,%.cxx,$[file]]
#define source $[file] #define source $[file]
$[target] : $[source] $[target] : $[source]
$[FLEX] $[LFLAGS] $[if $[YACC_PREFIX],-P$[YACC_PREFIX]] -olex.yy.c $[source] $[TAB]$[FLEX] $[LFLAGS] $[if $[YACC_PREFIX],-P$[YACC_PREFIX]] -olex.yy.c $[source]
#define source lex.yy.c #define source lex.yy.c
#define script /#include <unistd.h>/d #define script /#include <unistd.h>/d
$[SED] $[TAB]$[SED]
-del $[source] $[TAB]-del $[source]
#end file #end file
@ -697,7 +697,7 @@ $[target] : $[source]
#define ipath $[file_ipath] #define ipath $[file_ipath]
#define flags $[cflags] $[CFLAGS_SHARED] $[all_sources $[building_var:%=/D%],$[file]] #define flags $[cflags] $[CFLAGS_SHARED] $[all_sources $[building_var:%=/D%],$[file]]
$[target] : $[source] $[dependencies $[source]] $[target] : $[source] $[dependencies $[source]]
$[COMPILE_C] $[TAB]$[COMPILE_C]
#end file #end file
@ -709,7 +709,7 @@ $[target] : $[source] $[dependencies $[source]]
#define ipath $[file_ipath] #define ipath $[file_ipath]
#define flags $[cflags] $[all_sources $[building_var:%=/D%],$[file]] #define flags $[cflags] $[all_sources $[building_var:%=/D%],$[file]]
$[target] : $[source] $[dependencies $[source]] $[target] : $[source] $[dependencies $[source]]
$[COMPILE_C] $[TAB]$[COMPILE_C]
#end file #end file
@ -722,7 +722,7 @@ $[target] : $[source] $[dependencies $[source]]
// Yacc must run before some files can be compiled, so all files // Yacc must run before some files can be compiled, so all files
// depend on yacc having run. // depend on yacc having run.
$[target] : $[source] $[dependencies $[file]] $[yxx_so_sources:%.yxx=%.cxx] $[target] : $[source] $[dependencies $[file]] $[yxx_so_sources:%.yxx=%.cxx]
$[COMPILE_C++] $[TAB]$[COMPILE_C++]
#end file #end file
@ -734,7 +734,7 @@ $[target] : $[source] $[dependencies $[file]] $[yxx_so_sources:%.yxx=%.cxx]
#define ipath $[file_ipath] #define ipath $[file_ipath]
#define flags $[c++flags] $[all_sources $[building_var:%=/D%],$[file]] #define flags $[c++flags] $[all_sources $[building_var:%=/D%],$[file]]
$[target] : $[source] $[dependencies $[file]] $[yxx_st_sources:%.yxx=%.cxx] $[target] : $[source] $[dependencies $[file]] $[yxx_st_sources:%.yxx=%.cxx]
$[COMPILE_C++] $[TAB]$[COMPILE_C++]
#end file #end file
@ -747,7 +747,7 @@ $[target] : $[source] $[dependencies $[file]] $[yxx_st_sources:%.yxx=%.cxx]
// Yacc must run before some files can be compiled, so all files // Yacc must run before some files can be compiled, so all files
// depend on yacc having run. // depend on yacc having run.
$[target] : $[source] $[dependencies $[file]] $[yxx_so_sources:%.yxx=%.cxx] $[target] : $[source] $[dependencies $[file]] $[yxx_so_sources:%.yxx=%.cxx]
$[COMPILE_C++] $[TAB]$[COMPILE_C++]
#end file #end file
@ -759,7 +759,7 @@ $[target] : $[source] $[dependencies $[file]] $[yxx_so_sources:%.yxx=%.cxx]
#define ipath $[file_ipath] #define ipath $[file_ipath]
#define flags $[noopt_c++flags] $[all_sources $[building_var:%=/D%],$[file]] #define flags $[noopt_c++flags] $[all_sources $[building_var:%=/D%],$[file]]
$[target] : $[source] $[dependencies $[file]] $[yxx_st_sources:%.yxx=%.cxx] $[target] : $[source] $[dependencies $[file]] $[yxx_st_sources:%.yxx=%.cxx]
$[COMPILE_C++] $[TAB]$[COMPILE_C++]
#end file #end file
@ -769,53 +769,53 @@ $[target] : $[source] $[dependencies $[file]] $[yxx_st_sources:%.yxx=%.cxx]
$[install_bin_dir]\$[file] : $[file] $[install_bin_dir]\$[file] : $[file]
#define local $[file] #define local $[file]
#define dest $[install_bin_dir] #define dest $[install_bin_dir]
$[NT_COPYCMD] $[local] $[dest] $[TAB]$[NT_COPYCMD] $[local] $[dest]
#end file #end file
#foreach file $[install_headers] #foreach file $[install_headers]
$[install_headers_dir]\$[file] : $[file] $[install_headers_dir]\$[file] : $[file]
#define local $[file] #define local $[file]
#define dest $[install_headers_dir] #define dest $[install_headers_dir]
$[NT_COPYCMD] $[local] $[dest] $[TAB]$[NT_COPYCMD] $[local] $[dest]
#end file #end file
#foreach file $[install_parser_inc] #foreach file $[install_parser_inc]
$[install_parser_inc_dir]\$[file] : $[file] $[install_parser_inc_dir]\$[file] : $[file]
#define local $[file] #define local $[file]
#define dest $[install_parser_inc_dir] #define dest $[install_parser_inc_dir]
$[NT_COPYCMD] $[local] $[dest] $[TAB]$[NT_COPYCMD] $[local] $[dest]
#end file #end file
#foreach file $[install_data] #foreach file $[install_data]
$[install_data_dir]\$[file] : $[file] $[install_data_dir]\$[file] : $[file]
#define local $[file] #define local $[file]
#define dest $[install_data_dir] #define dest $[install_data_dir]
$[NT_COPYCMD] $[local] $[dest] $[TAB]$[NT_COPYCMD] $[local] $[dest]
#end file #end file
#foreach file $[install_config] #foreach file $[install_config]
$[install_config_dir]\$[file] : $[file] $[install_config_dir]\$[file] : $[file]
#define local $[file] #define local $[file]
#define dest $[install_config_dir] #define dest $[install_config_dir]
$[NT_COPYCMD] $[local] $[dest] $[TAB]$[NT_COPYCMD] $[local] $[dest]
#end file #end file
// Finally, all the special targets. These are commands that just need // Finally, all the special targets. These are commands that just need
// to be invoked; we don't pretend to know what they are. // to be invoked; we don't pretend to know what they are.
#forscopes special_target #forscopes special_target
$[TARGET] : $[TARGET] :
$[COMMAND] $[TAB]$[COMMAND]
#end special_target #end special_target
// Finally, the rules to freshen the Makefile itself. // Finally, the rules to freshen the Makefile itself.
Makefile : $[SOURCE_FILENAME] Makefile : $[SOURCE_FILENAME]
ppremake $[TAB]ppremake
#if $[and $[DEPENDENCY_CACHE_FILENAME],$[dep_sources]] #if $[and $[DEPENDENCY_CACHE_FILENAME],$[dep_sources]]
$[DEPENDENCY_CACHE_FILENAME] : $[dep_sources] $[DEPENDENCY_CACHE_FILENAME] : $[dep_sources]
@ppremake -D $[DEPENDENCY_CACHE_FILENAME] $[TAB]@ppremake -D $[DEPENDENCY_CACHE_FILENAME]
#endif #endif
@ -868,64 +868,64 @@ install : $[if $[CONFIG_HEADER],$[install_headers_dir] $[install_headers_dir]\$[
install-igate : $[subdirs:%=install-igate-%] install-igate : $[subdirs:%=install-igate-%]
uninstall : $[subdirs:%=uninstall-%] uninstall : $[subdirs:%=uninstall-%]
#if $[CONFIG_HEADER] #if $[CONFIG_HEADER]
-del /f $[install_headers_dir]\$[CONFIG_HEADER] $[TAB]-del /f $[install_headers_dir]\$[CONFIG_HEADER]
#endif #endif
uninstall-igate : $[subdirs:%=uninstall-igate-%] uninstall-igate : $[subdirs:%=uninstall-igate-%]
#formap dirname subdirs #formap dirname subdirs
#define depends #define depends
$[dirname] : $[dirnames $[if $[build_directory],$[DIRNAME]],$[DEPEND_DIRS]] $[dirname] : $[dirnames $[if $[build_directory],$[DIRNAME]],$[DEPEND_DIRS]]
cd $[osfilename $[PATH]] && $(MAKE) /nologo all $[TAB]cd $[osfilename $[PATH]] && $(MAKE) /nologo all
#end dirname #end dirname
#formap dirname subdirs #formap dirname subdirs
test-$[dirname] : test-$[dirname] :
cd $[osfilename $[PATH]] && $(MAKE) /nologo test $[TAB]cd $[osfilename $[PATH]] && $(MAKE) /nologo test
#end dirname #end dirname
#formap dirname subdirs #formap dirname subdirs
clean-$[dirname] : clean-$[dirname] :
cd $[osfilename $[PATH]] && $(MAKE) /nologo clean $[TAB]cd $[osfilename $[PATH]] && $(MAKE) /nologo clean
#end dirname #end dirname
#formap dirname subdirs #formap dirname subdirs
clean-igate-$[dirname] : clean-igate-$[dirname] :
cd $[osfilename $[PATH]] && $(MAKE) /nologo clean-igate $[TAB]cd $[osfilename $[PATH]] && $(MAKE) /nologo clean-igate
#end dirname #end dirname
#formap dirname subdirs #formap dirname subdirs
cleanall-$[dirname] : $[patsubst %,cleanall-%,$[dirnames $[if $[build_directory],$[DIRNAME]],$[DEPEND_DIRS]]] cleanall-$[dirname] : $[patsubst %,cleanall-%,$[dirnames $[if $[build_directory],$[DIRNAME]],$[DEPEND_DIRS]]]
cd $[osfilename $[PATH]] && $(MAKE) /nologo cleanall $[TAB]cd $[osfilename $[PATH]] && $(MAKE) /nologo cleanall
#end dirname #end dirname
#formap dirname subdirs #formap dirname subdirs
install-$[dirname] : $[patsubst %,install-%,$[dirnames $[if $[build_directory],$[DIRNAME]],$[DEPEND_DIRS]]] install-$[dirname] : $[patsubst %,install-%,$[dirnames $[if $[build_directory],$[DIRNAME]],$[DEPEND_DIRS]]]
cd $[osfilename $[PATH]] && $(MAKE) /nologo install $[TAB]cd $[osfilename $[PATH]] && $(MAKE) /nologo install
#end dirname #end dirname
#formap dirname subdirs #formap dirname subdirs
install-igate-$[dirname] : install-igate-$[dirname] :
cd $[osfilename $[PATH]] && $(MAKE) /nologo install-igate $[TAB]cd $[osfilename $[PATH]] && $(MAKE) /nologo install-igate
#end dirname #end dirname
#formap dirname subdirs #formap dirname subdirs
uninstall-$[dirname] : uninstall-$[dirname] :
cd $[osfilename $[PATH]] && $(MAKE) /nologo uninstall $[TAB]cd $[osfilename $[PATH]] && $(MAKE) /nologo uninstall
#end dirname #end dirname
#formap dirname subdirs #formap dirname subdirs
uninstall-igate-$[dirname] : uninstall-igate-$[dirname] :
cd $[osfilename $[PATH]] && $(MAKE) /nologo uninstall-igate $[TAB]cd $[osfilename $[PATH]] && $(MAKE) /nologo uninstall-igate
#end dirname #end dirname
#if $[ne $[CONFIG_HEADER],] #if $[ne $[CONFIG_HEADER],]
$[install_headers_dir] : $[install_headers_dir] :
mkdir $[install_headers_dir] $[TAB]mkdir $[install_headers_dir]
$[install_headers_dir]\$[CONFIG_HEADER] : $[CONFIG_HEADER] $[install_headers_dir]\$[CONFIG_HEADER] : $[CONFIG_HEADER]
#define local $[CONFIG_HEADER] #define local $[CONFIG_HEADER]
#define dest $[install_headers_dir] #define dest $[install_headers_dir]
$[NT_COPYCMD] $[local] $[dest] $[TAB]$[NT_COPYCMD] $[local] $[dest]
#endif #endif
#end Makefile #end Makefile

View File

@ -161,22 +161,22 @@ test : $[test_bin_targets]
// It does assume that the odirs are not '.', however. // It does assume that the odirs are not '.', however.
clean : clean :
#if $[so_sources] #if $[so_sources]
rm -rf $[so_dir] $[TAB]rm -rf $[so_dir]
#endif #endif
#if $[st_sources] #if $[st_sources]
rm -rf $[st_dir] $[TAB]rm -rf $[st_dir]
#endif #endif
rm -f *.pyc *.pyo // Also scrub out old generated Python code. $[TAB]rm -f *.pyc *.pyo // Also scrub out old generated Python code.
// 'cleanall' is not much more thorough than 'clean': At the moment, // 'cleanall' is not much more thorough than 'clean': At the moment,
// it also cleans up the bison and flex output, as well as the // it also cleans up the bison and flex output, as well as the
// dependency cache file. // dependency cache file.
cleanall : clean cleanall : clean
#if $[yxx_so_sources] $[yxx_st_sources] $[lxx_so_sources] $[lxx_st_sources] #if $[yxx_so_sources] $[yxx_st_sources] $[lxx_so_sources] $[lxx_st_sources]
rm -f $[patsubst %.yxx %.lxx,%.cxx,$[yxx_so_sources] $[yxx_st_sources] $[lxx_so_sources] $[lxx_st_sources]] $[TAB]rm -f $[patsubst %.yxx %.lxx,%.cxx,$[yxx_so_sources] $[yxx_st_sources] $[lxx_so_sources] $[lxx_st_sources]]
#endif #endif
#if $[ne $[DEPENDENCY_CACHE_FILENAME],] #if $[ne $[DEPENDENCY_CACHE_FILENAME],]
rm -f $[DEPENDENCY_CACHE_FILENAME] $[TAB]rm -f $[DEPENDENCY_CACHE_FILENAME]
#endif #endif
clean-igate : clean-igate :
@ -186,13 +186,13 @@ clean-igate :
#define igatemscan $[components $[get_igatedb:%=$[RELDIR]/$[so_dir]/%],$[active_component_libs]] #define igatemscan $[components $[get_igatedb:%=$[RELDIR]/$[so_dir]/%],$[active_component_libs]]
#define igatemout $[if $[igatemscan],lib$[TARGET]_module.cxx] #define igatemout $[if $[igatemscan],lib$[TARGET]_module.cxx]
#if $[igatedb] #if $[igatedb]
rm -f $[so_dir]/$[igatedb] $[TAB]rm -f $[so_dir]/$[igatedb]
#endif #endif
#if $[igateoutput] #if $[igateoutput]
rm -f $[so_dir]/$[igateoutput] $[igateoutput:%.cxx=$[so_dir]/%.o] $[TAB]rm -f $[so_dir]/$[igateoutput] $[igateoutput:%.cxx=$[so_dir]/%.o]
#endif #endif
#if $[igatemout] #if $[igatemout]
rm -f $[so_dir]/$[igatemout] $[igatemout:%.cxx=$[so_dir]/%.o] $[TAB]rm -f $[so_dir]/$[igatemout] $[igatemout:%.cxx=$[so_dir]/%.o]
#endif #endif
#end metalib_target lib_target ss_lib_target #end metalib_target lib_target ss_lib_target
@ -228,12 +228,12 @@ install-igate : $[sort $[installed_igate_files]]
uninstall : $[TARGET(metalib_target lib_target ss_lib_target static_lib_target):%=uninstall-lib%] $[TARGET(bin_target):%=uninstall-%] uninstall : $[TARGET(metalib_target lib_target ss_lib_target static_lib_target):%=uninstall-lib%] $[TARGET(bin_target):%=uninstall-%]
#if $[installed_files] #if $[installed_files]
rm -f $[sort $[installed_files]] $[TAB]rm -f $[sort $[installed_files]]
#endif #endif
uninstall-igate : uninstall-igate :
#if $[installed_igate_files] #if $[installed_igate_files]
rm -f $[sort $[installed_igate_files]] $[TAB]rm -f $[sort $[installed_igate_files]]
#endif #endif
@ -252,8 +252,8 @@ uninstall-igate :
$[if $[install_igatedb],$[install_igatedb_dir]] \ $[if $[install_igatedb],$[install_igatedb_dir]] \
] ]
$[directory] : $[directory] :
@test -d $[directory] || echo mkdir -p $[directory] $[TAB]@test -d $[directory] || echo mkdir -p $[directory]
@test -d $[directory] || mkdir -p $[directory] $[TAB]@test -d $[directory] || mkdir -p $[directory]
#end directory #end directory
@ -300,9 +300,9 @@ $[varname] = $[unique $[patsubst %_src.cxx,,%.cxx %.c %.yxx %.lxx,$[so_dir]/%.o,
#define sources $($[varname]) #define sources $($[varname])
$[target] : $[sources] $[target] : $[sources]
#if $[filter %.cxx %.yxx %.lxx,$[get_sources]] #if $[filter %.cxx %.yxx %.lxx,$[get_sources]]
$[SHARED_LIB_C++] $[TAB]$[SHARED_LIB_C++]
#else #else
$[SHARED_LIB_C] $[TAB]$[SHARED_LIB_C]
#endif #endif
// Here are the rules to install and uninstall the library and // Here are the rules to install and uninstall the library and
@ -319,13 +319,13 @@ install-lib$[TARGET] : $[installed_files]
uninstall-lib$[TARGET] : uninstall-lib$[TARGET] :
#if $[installed_files] #if $[installed_files]
rm -f $[sort $[installed_files]] $[TAB]rm -f $[sort $[installed_files]]
#endif #endif
$[install_lib_dir]/lib$[TARGET].so : $[so_dir]/lib$[TARGET].so $[install_lib_dir]/lib$[TARGET].so : $[so_dir]/lib$[TARGET].so
#define local lib$[TARGET].so #define local lib$[TARGET].so
#define dest $[install_lib_dir] #define dest $[install_lib_dir]
cd ./$[so_dir] && $[INSTALL_PROG] $[TAB]cd ./$[so_dir] && $[INSTALL_PROG]
#if $[igatescan] #if $[igatescan]
// Now, some additional rules to generate and compile the interrogate // Now, some additional rules to generate and compile the interrogate
@ -343,7 +343,7 @@ $[install_lib_dir]/lib$[TARGET].so : $[so_dir]/lib$[TARGET].so
$[install_igatedb_dir]/$[igatedb] : $[so_dir]/$[igatedb] $[install_igatedb_dir]/$[igatedb] : $[so_dir]/$[igatedb]
#define local $[igatedb] #define local $[igatedb]
#define dest $[install_igatedb_dir] #define dest $[install_igatedb_dir]
cd ./$[so_dir] && $[INSTALL] $[TAB]cd ./$[so_dir] && $[INSTALL]
// We have to split this out as a separate rule to properly support // We have to split this out as a separate rule to properly support
// parallel make. // parallel make.
@ -351,14 +351,14 @@ $[so_dir]/$[igatedb] : $[so_dir]/$[igateoutput]
lib$[TARGET]_igatescan = $[igatescan] lib$[TARGET]_igatescan = $[igatescan]
$[so_dir]/$[igateoutput] : $[sort $[patsubst %.h,%.h,%.I,%.I,%.T,%.T,%,,$[dependencies $[igatescan]] $[igatescan:%=./%]]] $[so_dir]/$[igateoutput] : $[sort $[patsubst %.h,%.h,%.I,%.I,%.T,%.T,%,,$[dependencies $[igatescan]] $[igatescan:%=./%]]]
interrogate -od $[so_dir]/$[igatedb] -oc $[so_dir]/$[igateoutput] $[interrogate_options] -module "$[igatemod]" -library "$[igatelib]" $(lib$[TARGET]_igatescan) $[TAB]interrogate -od $[so_dir]/$[igatedb] -oc $[so_dir]/$[igateoutput] $[interrogate_options] -module "$[igatemod]" -library "$[igatelib]" $(lib$[TARGET]_igatescan)
#define target $[igateoutput:%.cxx=$[so_dir]/%.o] #define target $[igateoutput:%.cxx=$[so_dir]/%.o]
#define source $[so_dir]/$[igateoutput] #define source $[so_dir]/$[igateoutput]
#define ipath . $[target_ipath] #define ipath . $[target_ipath]
#define flags $[get_cflags] $[C++FLAGS] $[CFLAGS_OPT$[OPTIMIZE]] $[if $[>= $[OPTIMIZE],2],$[OPTFLAGS]] $[CFLAGS_SHARED] #define flags $[get_cflags] $[C++FLAGS] $[CFLAGS_OPT$[OPTIMIZE]] $[if $[>= $[OPTIMIZE],2],$[OPTFLAGS]] $[CFLAGS_SHARED]
$[target] : $[source] $[target] : $[source]
$[COMPILE_C++] $[TAB]$[COMPILE_C++]
#endif // $[igatescan] #endif // $[igatescan]
#if $[igatemout] #if $[igatemout]
@ -373,14 +373,14 @@ lib$[TARGET]_igatemscan = $[igatemscan]
#define target $[so_dir]/$[igatemout] #define target $[so_dir]/$[igatemout]
#define sources $(lib$[TARGET]_igatemscan) #define sources $(lib$[TARGET]_igatemscan)
$[target] : $[sources] $[target] : $[sources]
interrogate_module -oc $[target] -module "$[igatemod]" -library "$[igatelib]" -python $[sources] $[TAB]interrogate_module -oc $[target] -module "$[igatemod]" -library "$[igatelib]" -python $[sources]
#define target $[igatemout:%.cxx=$[so_dir]/%.o] #define target $[igatemout:%.cxx=$[so_dir]/%.o]
#define source $[so_dir]/$[igatemout] #define source $[so_dir]/$[igatemout]
#define ipath . $[target_ipath] #define ipath . $[target_ipath]
#define flags $[get_cflags] $[C++FLAGS] $[CFLAGS_OPT$[OPTIMIZE]] $[if $[>= $[OPTIMIZE],2],$[OPTFLAGS]] $[CFLAGS_SHARED] #define flags $[get_cflags] $[C++FLAGS] $[CFLAGS_OPT$[OPTIMIZE]] $[if $[>= $[OPTIMIZE],2],$[OPTFLAGS]] $[CFLAGS_SHARED]
$[target] : $[source] $[target] : $[source]
$[COMPILE_C++] $[TAB]$[COMPILE_C++]
#endif // $[igatescan] #endif // $[igatescan]
#end metalib_target lib_target ss_lib_target #end metalib_target lib_target ss_lib_target
@ -403,9 +403,9 @@ $[varname] = $[unique $[patsubst %_src.cxx,,%.cxx %.c %.yxx %.lxx,$[so_dir]/%.o,
#define sources $($[varname]) #define sources $($[varname])
$[target] : $[sources] $[target] : $[sources]
#if $[filter %.cxx %.yxx %.lxx,$[get_sources]] #if $[filter %.cxx %.yxx %.lxx,$[get_sources]]
$[SHARED_LIB_C++] $[TAB]$[SHARED_LIB_C++]
#else #else
$[SHARED_LIB_C] $[TAB]$[SHARED_LIB_C]
#endif #endif
#end noinst_lib_target #end noinst_lib_target
@ -425,12 +425,12 @@ $[varname] = $[unique $[patsubst %_src.cxx,,%.cxx %.c %.yxx %.lxx,$[st_dir]/%.o,
#define sources $($[varname]) #define sources $($[varname])
$[target] : $[sources] $[target] : $[sources]
#if $[filter %.cxx %.yxx %.lxx,$[get_sources]] #if $[filter %.cxx %.yxx %.lxx,$[get_sources]]
$[STATIC_LIB_C++] $[TAB]$[STATIC_LIB_C++]
#else #else
$[STATIC_LIB_C] $[TAB]$[STATIC_LIB_C]
#endif #endif
#if $[RANLIB] #if $[RANLIB]
$[RANLIB] $[TAB]$[RANLIB]
#endif #endif
#define installed_files \ #define installed_files \
@ -444,13 +444,13 @@ install-lib$[TARGET] : $[installed_files]
uninstall-lib$[TARGET] : uninstall-lib$[TARGET] :
#if $[installed_files] #if $[installed_files]
rm -f $[sort $[installed_files]] $[TAB]rm -f $[sort $[installed_files]]
#endif #endif
$[install_lib_dir]/lib$[TARGET].a : $[st_dir]/lib$[TARGET].a $[install_lib_dir]/lib$[TARGET].a : $[st_dir]/lib$[TARGET].a
#define local lib$[TARGET].a #define local lib$[TARGET].a
#define dest $[install_lib_dir] #define dest $[install_lib_dir]
cd ./$[st_dir] && $[INSTALL] $[TAB]cd ./$[st_dir] && $[INSTALL]
#end static_lib_target #end static_lib_target
@ -469,8 +469,8 @@ $[TARGET] : $[st_dir]/$[TARGET]
#define source $[SOURCE] #define source $[SOURCE]
#define script $[COMMAND] #define script $[COMMAND]
$[target] : $[source] $[target] : $[source]
$[SED] $[TAB]$[SED]
chmod +x $[target] $[TAB]chmod +x $[target]
#define installed_files \ #define installed_files \
$[install_bin_dir]/$[TARGET] $[install_bin_dir]/$[TARGET]
@ -479,13 +479,13 @@ install-$[TARGET] : $[installed_files]
uninstall-$[TARGET] : uninstall-$[TARGET] :
#if $[installed_files] #if $[installed_files]
rm -f $[sort $[installed_files]] $[TAB]rm -f $[sort $[installed_files]]
#endif #endif
$[install_bin_dir]/$[TARGET] : $[st_dir]/$[TARGET] $[install_bin_dir]/$[TARGET] : $[st_dir]/$[TARGET]
#define local $[TARGET] #define local $[TARGET]
#define dest $[install_bin_dir] #define dest $[install_bin_dir]
cd ./$[st_dir] && $[INSTALL_PROG] $[TAB]cd ./$[st_dir] && $[INSTALL_PROG]
#end sed_bin_target #end sed_bin_target
@ -506,13 +506,13 @@ $[varname] = $[unique $[patsubst %_src.cxx,,%.cxx %.c %.yxx %.lxx,$[st_dir]/%.o,
$[target] : $[sources] $[target] : $[sources]
#if $[ld] #if $[ld]
// If there's a custom linker defined for the target, we have to use it. // If there's a custom linker defined for the target, we have to use it.
$[ld] -o $[target] $[sources] $[lpath:%=-L%] $[libs:%=-l%] $[TAB]$[ld] -o $[target] $[sources] $[lpath:%=-L%] $[libs:%=-l%]$[TAB]
#else #else
// Otherwise, we can use the normal linker. // Otherwise, we can use the normal linker.
#if $[filter %.cxx %.yxx %.lxx,$[get_sources]] #if $[filter %.cxx %.yxx %.lxx,$[get_sources]]
$[LINK_BIN_C++] $[TAB]$[LINK_BIN_C++]
#else #else
$[LINK_BIN_C] $[TAB]$[LINK_BIN_C]
#endif #endif
#endif #endif
@ -527,13 +527,13 @@ install-$[TARGET] : $[installed_files]
uninstall-$[TARGET] : uninstall-$[TARGET] :
#if $[installed_files] #if $[installed_files]
rm -f $[sort $[installed_files]] $[TAB]rm -f $[sort $[installed_files]]
#endif #endif
$[install_bin_dir]/$[TARGET] : $[st_dir]/$[TARGET] $[install_bin_dir]/$[TARGET] : $[st_dir]/$[TARGET]
#define local $[TARGET] #define local $[TARGET]
#define dest $[install_bin_dir] #define dest $[install_bin_dir]
cd ./$[st_dir] && $[INSTALL_PROG] $[TAB]cd ./$[st_dir] && $[INSTALL_PROG]
#end bin_target #end bin_target
@ -553,9 +553,9 @@ $[varname] = $[unique $[patsubst %_src.cxx,,%.cxx %.c %.yxx %.lxx,$[st_dir]/%.o,
#define sources $($[varname]) #define sources $($[varname])
$[target] : $[sources] $[target] : $[sources]
#if $[filter %.cxx %.yxx %.lxx,$[get_sources]] #if $[filter %.cxx %.yxx %.lxx,$[get_sources]]
$[LINK_BIN_C++] $[TAB]$[LINK_BIN_C++]
#else #else
$[LINK_BIN_C] $[TAB]$[LINK_BIN_C]
#endif #endif
#end noinst_bin_target test_bin_target #end noinst_bin_target test_bin_target
@ -573,9 +573,9 @@ $[target] : $[sources]
#define target $[patsubst %.yxx,%.cxx,$[file]] #define target $[patsubst %.yxx,%.cxx,$[file]]
#define source $[file] #define source $[file]
$[target] : $[source] $[target] : $[source]
$[BISON] -y $[YFLAGS] $[if $[YACC_PREFIX],-d --name-prefix=$[YACC_PREFIX]] $[source] $[TAB]$[BISON] -y $[YFLAGS] $[if $[YACC_PREFIX],-d --name-prefix=$[YACC_PREFIX]] $[source]
mv y.tab.c $[target] $[TAB]mv y.tab.c $[target]
mv y.tab.h $[patsubst %.yxx,%.h,$[source]] $[TAB]mv y.tab.h $[patsubst %.yxx,%.h,$[source]]
#end file #end file
@ -584,11 +584,11 @@ $[target] : $[source]
#define target $[patsubst %.lxx,%.cxx,$[file]] #define target $[patsubst %.lxx,%.cxx,$[file]]
#define source $[file] #define source $[file]
$[target] : $[source] $[target] : $[source]
$[FLEX] $[LFLAGS] $[if $[YACC_PREFIX],-P$[YACC_PREFIX]] -olex.yy.c $[source] $[TAB]$[FLEX] $[LFLAGS] $[if $[YACC_PREFIX],-P$[YACC_PREFIX]] -olex.yy.c $[source]
#define source lex.yy.c #define source lex.yy.c
#define script /#include <unistd.h>/d #define script /#include <unistd.h>/d
$[SED] $[TAB]$[SED]
rm $[source] $[TAB]rm $[source]
#end file #end file
@ -599,7 +599,7 @@ $[target] : $[source]
#define ipath $[file_ipath] #define ipath $[file_ipath]
#define flags $[cflags] $[CFLAGS_SHARED] #define flags $[cflags] $[CFLAGS_SHARED]
$[target] : $[source] $[dependencies $[source]] $[target] : $[source] $[dependencies $[source]]
$[COMPILE_C] $[TAB]$[COMPILE_C]
#end file #end file
@ -611,7 +611,7 @@ $[target] : $[source] $[dependencies $[source]]
#define ipath $[file_ipath] #define ipath $[file_ipath]
#define flags $[cflags] #define flags $[cflags]
$[target] : $[source] $[dependencies $[source]] $[target] : $[source] $[dependencies $[source]]
$[COMPILE_C] $[TAB]$[COMPILE_C]
#end file #end file
@ -624,7 +624,7 @@ $[target] : $[source] $[dependencies $[source]]
// Yacc must run before some files can be compiled, so all files // Yacc must run before some files can be compiled, so all files
// depend on yacc having run. // depend on yacc having run.
$[target] : $[source] $[dependencies $[file]] $[yxx_so_sources:%.yxx=%.cxx] $[target] : $[source] $[dependencies $[file]] $[yxx_so_sources:%.yxx=%.cxx]
$[COMPILE_C++] $[TAB]$[COMPILE_C++]
#end file #end file
@ -636,7 +636,7 @@ $[target] : $[source] $[dependencies $[file]] $[yxx_so_sources:%.yxx=%.cxx]
#define ipath $[file_ipath] #define ipath $[file_ipath]
#define flags $[c++flags] #define flags $[c++flags]
$[target] : $[source] $[dependencies $[file]] $[yxx_st_sources:%.yxx=%.cxx] $[target] : $[source] $[dependencies $[file]] $[yxx_st_sources:%.yxx=%.cxx]
$[COMPILE_C++] $[TAB]$[COMPILE_C++]
#end file #end file
@ -649,7 +649,7 @@ $[target] : $[source] $[dependencies $[file]] $[yxx_st_sources:%.yxx=%.cxx]
// Yacc must run before some files can be compiled, so all files // Yacc must run before some files can be compiled, so all files
// depend on yacc having run. // depend on yacc having run.
$[target] : $[source] $[dependencies $[file]] $[yxx_so_sources:%.yxx=%.cxx] $[target] : $[source] $[dependencies $[file]] $[yxx_so_sources:%.yxx=%.cxx]
$[COMPILE_C++] $[TAB]$[COMPILE_C++]
#end file #end file
@ -661,7 +661,7 @@ $[target] : $[source] $[dependencies $[file]] $[yxx_so_sources:%.yxx=%.cxx]
#define ipath $[file_ipath] #define ipath $[file_ipath]
#define flags $[noopt_c++flags] #define flags $[noopt_c++flags]
$[target] : $[source] $[dependencies $[file]] $[yxx_st_sources:%.yxx=%.cxx] $[target] : $[source] $[dependencies $[file]] $[yxx_st_sources:%.yxx=%.cxx]
$[COMPILE_C++] $[TAB]$[COMPILE_C++]
#end file #end file
@ -671,53 +671,53 @@ $[target] : $[source] $[dependencies $[file]] $[yxx_st_sources:%.yxx=%.cxx]
$[install_bin_dir]/$[file] : $[file] $[install_bin_dir]/$[file] : $[file]
#define local $[file] #define local $[file]
#define dest $[install_bin_dir] #define dest $[install_bin_dir]
$[INSTALL_PROG] $[TAB]$[INSTALL_PROG]
#end file #end file
#foreach file $[install_headers] #foreach file $[install_headers]
$[install_headers_dir]/$[file] : $[file] $[install_headers_dir]/$[file] : $[file]
#define local $[file] #define local $[file]
#define dest $[install_headers_dir] #define dest $[install_headers_dir]
$[INSTALL] $[TAB]$[INSTALL]
#end file #end file
#foreach file $[install_parser_inc] #foreach file $[install_parser_inc]
$[install_parser_inc_dir]/$[file] : $[file] $[install_parser_inc_dir]/$[file] : $[file]
#define local $[file] #define local $[file]
#define dest $[install_parser_inc_dir] #define dest $[install_parser_inc_dir]
$[INSTALL] $[TAB]$[INSTALL]
#end file #end file
#foreach file $[install_data] #foreach file $[install_data]
$[install_data_dir]/$[file] : $[file] $[install_data_dir]/$[file] : $[file]
#define local $[file] #define local $[file]
#define dest $[install_data_dir] #define dest $[install_data_dir]
$[INSTALL] $[TAB]$[INSTALL]
#end file #end file
#foreach file $[install_config] #foreach file $[install_config]
$[install_config_dir]/$[file] : $[file] $[install_config_dir]/$[file] : $[file]
#define local $[file] #define local $[file]
#define dest $[install_config_dir] #define dest $[install_config_dir]
$[INSTALL] $[TAB]$[INSTALL]
#end file #end file
// Finally, all the special targets. These are commands that just need // Finally, all the special targets. These are commands that just need
// to be invoked; we don't pretend to know what they are. // to be invoked; we don't pretend to know what they are.
#forscopes special_target #forscopes special_target
$[TARGET] : $[TARGET] :
$[COMMAND] $[TAB]$[COMMAND]
#end special_target #end special_target
// Finally, the rules to freshen the Makefile itself. // Finally, the rules to freshen the Makefile itself.
Makefile : $[SOURCE_FILENAME] Makefile : $[SOURCE_FILENAME]
ppremake $[TAB]ppremake
#if $[and $[DEPENDENCY_CACHE_FILENAME],$[dep_sources]] #if $[and $[DEPENDENCY_CACHE_FILENAME],$[dep_sources]]
$[DEPENDENCY_CACHE_FILENAME] : $[dep_sources] $[DEPENDENCY_CACHE_FILENAME] : $[dep_sources]
@ppremake -D $[DEPENDENCY_CACHE_FILENAME] $[TAB]@ppremake -D $[DEPENDENCY_CACHE_FILENAME]
#endif #endif
@ -770,7 +770,7 @@ install : $[if $[CONFIG_HEADER],$[install_headers_dir] $[install_headers_dir]/$[
install-igate : $[subdirs:%=install-igate-%] install-igate : $[subdirs:%=install-igate-%]
uninstall : $[subdirs:%=uninstall-%] uninstall : $[subdirs:%=uninstall-%]
#if $[CONFIG_HEADER] #if $[CONFIG_HEADER]
rm -f $[install_headers_dir]/$[CONFIG_HEADER] $[TAB]rm -f $[install_headers_dir]/$[CONFIG_HEADER]
#endif #endif
uninstall-igate : $[subdirs:%=uninstall-igate-%] uninstall-igate : $[subdirs:%=uninstall-igate-%]
@ -782,58 +782,58 @@ uninstall-igate : $[subdirs:%=uninstall-igate-%]
#formap dirname subdirs #formap dirname subdirs
#define depends #define depends
$[dirname] : $[dirnames $[if $[build_directory],$[DIRNAME]],$[DEPEND_DIRS]] $[dirname] : $[dirnames $[if $[build_directory],$[DIRNAME]],$[DEPEND_DIRS]]
cd ./$[PATH] && $(MAKE) all $[TAB]cd ./$[PATH] && $(MAKE) all
#end dirname #end dirname
#formap dirname subdirs #formap dirname subdirs
test-$[dirname] : test-$[dirname] :
cd ./$[PATH] && $(MAKE) test $[TAB]cd ./$[PATH] && $(MAKE) test
#end dirname #end dirname
#formap dirname subdirs #formap dirname subdirs
clean-$[dirname] : clean-$[dirname] :
cd ./$[PATH] && $(MAKE) clean $[TAB]cd ./$[PATH] && $(MAKE) clean
#end dirname #end dirname
#formap dirname subdirs #formap dirname subdirs
clean-igate-$[dirname] : clean-igate-$[dirname] :
cd ./$[PATH] && $(MAKE) clean-igate $[TAB]cd ./$[PATH] && $(MAKE) clean-igate
#end dirname #end dirname
#formap dirname subdirs #formap dirname subdirs
cleanall-$[dirname] : $[patsubst %,cleanall-%,$[dirnames $[if $[build_directory],$[DIRNAME]],$[DEPEND_DIRS]]] cleanall-$[dirname] : $[patsubst %,cleanall-%,$[dirnames $[if $[build_directory],$[DIRNAME]],$[DEPEND_DIRS]]]
cd ./$[PATH] && $(MAKE) cleanall $[TAB]cd ./$[PATH] && $(MAKE) cleanall
#end dirname #end dirname
#formap dirname subdirs #formap dirname subdirs
install-$[dirname] : $[patsubst %,install-%,$[dirnames $[if $[build_directory],$[DIRNAME]],$[DEPEND_DIRS]]] install-$[dirname] : $[patsubst %,install-%,$[dirnames $[if $[build_directory],$[DIRNAME]],$[DEPEND_DIRS]]]
cd ./$[PATH] && $(MAKE) install $[TAB]cd ./$[PATH] && $(MAKE) install
#end dirname #end dirname
#formap dirname subdirs #formap dirname subdirs
install-igate-$[dirname] : install-igate-$[dirname] :
cd ./$[PATH] && $(MAKE) install-igate $[TAB]cd ./$[PATH] && $(MAKE) install-igate
#end dirname #end dirname
#formap dirname subdirs #formap dirname subdirs
uninstall-$[dirname] : uninstall-$[dirname] :
cd ./$[PATH] && $(MAKE) uninstall $[TAB]cd ./$[PATH] && $(MAKE) uninstall
#end dirname #end dirname
#formap dirname subdirs #formap dirname subdirs
uninstall-igate-$[dirname] : uninstall-igate-$[dirname] :
cd ./$[PATH] && $(MAKE) uninstall-igate $[TAB]cd ./$[PATH] && $(MAKE) uninstall-igate
#end dirname #end dirname
#if $[ne $[CONFIG_HEADER],] #if $[ne $[CONFIG_HEADER],]
$[install_headers_dir] : $[install_headers_dir] :
@test -d $[install_headers_dir] || echo mkdir -p $[install_headers_dir] $[TAB]@test -d $[install_headers_dir] || echo mkdir -p $[install_headers_dir]
@test -d $[install_headers_dir] || mkdir -p $[install_headers_dir] $[TAB]@test -d $[install_headers_dir] || mkdir -p $[install_headers_dir]
$[install_headers_dir]/$[CONFIG_HEADER] : $[CONFIG_HEADER] $[install_headers_dir]/$[CONFIG_HEADER] : $[CONFIG_HEADER]
#define local $[CONFIG_HEADER] #define local $[CONFIG_HEADER]
#define dest $[install_headers_dir] #define dest $[install_headers_dir]
$[INSTALL] $[TAB]$[INSTALL]
#endif #endif
#end Makefile #end Makefile