Browse Source

add TAB variable to ppremake

David Rose 24 years ago
parent
commit
38d80de205
4 changed files with 231 additions and 231 deletions
  1. 2 2
      dtool/Package.pp
  2. 83 83
      dtool/pptempl/Template.gmsvc.pp
  3. 74 74
      dtool/pptempl/Template.msvc.pp
  4. 72 72
      dtool/pptempl/Template.unix.pp

+ 2 - 2
dtool/Package.pp

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

+ 83 - 83
dtool/pptempl/Template.gmsvc.pp

@@ -194,22 +194,22 @@ test : $[test_bin_targets]
 // It does assume that the odirs are not '.', however.
 clean :
 #if $[so_sources]
-	rm -rf $[so_dir]
+$[TAB]rm -rf $[so_dir]
 #endif
 #if $[st_sources]
-	rm -rf $[st_dir]
+$[TAB]rm -rf $[st_dir]
 #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,
 // it also cleans up the bison and flex output, as well as the
 // dependency cache file.
 cleanall : clean
 #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
 #if $[ne $[DEPENDENCY_CACHE_FILENAME],]
-	rm -f $[DEPENDENCY_CACHE_FILENAME]
+$[TAB]rm -f $[DEPENDENCY_CACHE_FILENAME]
 #endif
 
 clean-igate :
@@ -219,13 +219,13 @@ clean-igate :
   #define igatemscan $[components $[get_igatedb:%=$[RELDIR]/$[so_dir]/%],$[active_component_libs]]
   #define igatemout $[if $[igatemscan],lib$[TARGET]_module.cxx]
   #if $[igatedb]
-	rm -f $[so_dir]/$[igatedb]
+$[TAB]rm -f $[so_dir]/$[igatedb]
   #endif
   #if $[igateoutput]
-	rm -f $[so_dir]/$[igateoutput] $[igateoutput:%.cxx=$[so_dir]/%.obj]
+$[TAB]rm -f $[so_dir]/$[igateoutput] $[igateoutput:%.cxx=$[so_dir]/%.obj]
   #endif
   #if $[igatemout]
-	rm -f $[so_dir]/$[igatemout] $[igatemout:%.cxx=$[so_dir]/%.obj]
+$[TAB]rm -f $[so_dir]/$[igatemout] $[igatemout:%.cxx=$[so_dir]/%.obj]
   #endif
 #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-%]
 #if $[installed_files]
-	rm -f $[sort $[installed_files]]
+$[TAB]rm -f $[sort $[installed_files]]
 #endif
 
 uninstall-igate :
 #if $[installed_igate_files]
-	rm -f $[sort $[installed_igate_files]]
+$[TAB]rm -f $[sort $[installed_igate_files]]
 #endif
 
 
@@ -284,8 +284,8 @@ uninstall-igate :
     $[if $[install_igatedb],$[install_igatedb_dir]] \
     ]
 $[directory] :
-	@test -d $[directory] || echo mkdir -p $[directory]
-	@test -d $[directory] || mkdir -p $[directory]
+$[TAB]@test -d $[directory] || echo mkdir -p $[directory]
+$[TAB]@test -d $[directory] || mkdir -p $[directory]
 #end directory
 
 // We need to make the .obj files depend on the $[so_dir] and
@@ -298,9 +298,9 @@ $[directory] :
     $[if $[st_sources],$[st_dir]] \
     ]
 $[directory]/stamp :
-	@test -d $[directory] || echo mkdir -p $[directory]
-	@test -d $[directory] || mkdir -p $[directory]
-	@touch $[directory]/stamp
+$[TAB]@test -d $[directory] || echo mkdir -p $[directory]
+$[TAB]@test -d $[directory] || mkdir -p $[directory]
+$[TAB]@touch $[directory]/stamp
 #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)
 #if $[GENERATE_BUILDDATE]
 .NOTPARALLEL $[target] : $[sources] $[so_dir]/stamp $[dtool_ver_dir_cyg]/version.rc
-		// first generate builddate for rc compiler
-		mkdir -p $[tmpdirname_cyg]  // this dir-creation-stuff is leftover from trying to resolve parallel link difficulties
+     // first generate builddate for rc compiler
+$[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"
-		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]cl /nologo /EP "$[dtool_ver_dir]\verdate.cpp"  > "$[tmpdirname_win]\verdate.h"
+$[TAB]rc /n /i"$[tmpdirname_win]" /fo$[VER_RESOURCE] $[filter /D%, $[flags]]  "$[dtool_ver_dir]\version.rc"
   #if $[filter %.cxx %.yxx %.lxx,$[get_sources]]
-	$[SHARED_LIB_C++] $[VER_RESOURCE]
+$[TAB]$[SHARED_LIB_C++] $[VER_RESOURCE]
   #else  
-	$[SHARED_LIB_C] $[VER_RESOURCE]
+$[TAB]$[SHARED_LIB_C] $[VER_RESOURCE]
   #endif
 #else
 .NOTPARALLEL $[target] : $[sources] $[so_dir]/stamp
   #if $[filter %.cxx %.yxx %.lxx,$[get_sources]]
-	$[SHARED_LIB_C++]
+$[TAB]$[SHARED_LIB_C++]
   #else  
-	$[SHARED_LIB_C]
+$[TAB]$[SHARED_LIB_C]
   #endif
 #endif
 
@@ -415,26 +415,26 @@ install-lib$[TARGET] : $[installed_files]
 
 uninstall-lib$[TARGET] :
 #if $[installed_files]
-	rm -f $[sort $[installed_files]]
+$[TAB]rm -f $[sort $[installed_files]]
 #endif
 
 #if $[build_dlls]
 $[install_lib_dir]/lib$[TARGET]$[dllext].dll : $[so_dir]/lib$[TARGET]$[dllext].dll $[so_dir]/stamp
 #define local lib$[TARGET]$[dllext].dll
 #define dest $[install_lib_dir]
-	cp -f $[so_dir]/$[local] $[dest]
+$[TAB]cp -f $[so_dir]/$[local] $[dest]
 #endif
 
 $[install_lib_dir]/lib$[TARGET]$[dllext].lib : $[so_dir]/lib$[TARGET]$[dllext].lib $[so_dir]/stamp
 #define local lib$[TARGET]$[dllext].lib
 #define dest $[install_lib_dir]
-	cp -f $[so_dir]/$[local] $[dest]
+$[TAB]cp -f $[so_dir]/$[local] $[dest]
 
 #if $[and $[build_dlls],$[build_pdbs]]
 $[install_lib_dir]/lib$[TARGET]$[dllext].pdb : $[so_dir]/lib$[TARGET]$[dllext].pdb $[so_dir]/stamp
 #define local lib$[TARGET]$[dllext].pdb
 #define dest $[install_lib_dir]
-	cp -f $[so_dir]/$[local] $[dest]
+$[TAB]cp -f $[so_dir]/$[local] $[dest]
 #endif
 
 #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
 #define local $[igatedb]
 #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
 // parallel make.
@@ -461,14 +461,14 @@ $[so_dir]/$[igatedb] : $[so_dir]/$[igateoutput]
 
 lib$[TARGET]_igatescan = $[igatescan]
 $[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 source $[so_dir]/$[igateoutput]
 #define ipath . $[target_ipath]
 #define flags $[get_cflags] $[C++FLAGS] $[CFLAGS_OPT$[OPTIMIZE]] $[CFLAGS_SHARED] $[building_var:%=/D%]
 $[target] : $[source] $[so_dir]/stamp
-	$[COMPILE_C++]
+$[TAB]$[COMPILE_C++]
 #endif  // $[igatescan]
 
 #if $[igatemout]
@@ -483,14 +483,14 @@ lib$[TARGET]_igatemscan = $[igatemscan]
 #define target $[so_dir]/$[igatemout]
 #define sources $(lib$[TARGET]_igatemscan)
 $[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 source $[so_dir]/$[igatemout]
 #define ipath . $[target_ipath]
 #define flags $[get_cflags] $[C++FLAGS] $[CFLAGS_OPT$[OPTIMIZE]] $[CFLAGS_SHARED] $[building_var:%=/D%]
 $[target] : $[source] $[so_dir]/stamp
-	$[COMPILE_C++]
+$[TAB]$[COMPILE_C++]
 #endif  // $[igatescan]
 
 #end metalib_target lib_target
@@ -513,9 +513,9 @@ $[varname] = $[unique $[patsubst %_src.cxx,,%.cxx %.c %.yxx %.lxx,$[so_dir]/%.ob
 #define sources $($[varname])
 $[target] : $[sources] $[so_dir]/stamp
 #if $[filter %.cxx %.yxx %.lxx,$[get_sources]]
-	$[SHARED_LIB_C++]
+$[TAB]$[SHARED_LIB_C++]
 #else
-	$[SHARED_LIB_C]
+$[TAB]$[SHARED_LIB_C]
 #endif
 
 #if $[build_dlls]
@@ -542,9 +542,9 @@ $[varname] = $[unique $[patsubst %_src.cxx,,%.cxx %.c %.yxx %.lxx,$[st_dir]/%.ob
 #define sources $($[varname])
 $[target] : $[sources] $[st_dir]/stamp
 #if $[filter %.cxx %.yxx %.lxx,$[get_sources]]
-	$[STATIC_LIB_C++]
+$[TAB]$[STATIC_LIB_C++]
 #else
-	$[STATIC_LIB_C]
+$[TAB]$[STATIC_LIB_C]
 #endif
 
 #define installed_files \
@@ -558,13 +558,13 @@ install-lib$[TARGET] : $[installed_files]
 
 uninstall-lib$[TARGET] :
 #if $[installed_files]
-	rm -f $[sort $[installed_files]]
+$[TAB]rm -f $[sort $[installed_files]]
 #endif
 
 $[install_lib_dir]/lib$[TARGET]$[dllext].lib : $[st_dir]/lib$[TARGET]$[dllext].lib $[st_dir]/stamp
 #define local lib$[TARGET]$[dllext].lib
 #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
 
@@ -583,8 +583,8 @@ $[TARGET] : $[st_dir]/$[TARGET] $[st_dir]/stamp
 #define source $[SOURCE]
 #define script $[COMMAND]
 $[target] : $[source] $[st_dir]/stamp
-	$[SED]
-	chmod +x $[target]
+$[TAB]$[SED]
+$[TAB]chmod +x $[target]
 
 #define installed_files \
     $[install_bin_dir]/$[TARGET]
@@ -593,13 +593,13 @@ install-$[TARGET] : $[installed_files]
 
 uninstall-$[TARGET] :
 #if $[installed_files]
-	rm -f $[sort $[installed_files]]
+$[TAB]rm -f $[sort $[installed_files]]
 #endif
 
 #define local $[TARGET]
 #define dest $[install_bin_dir]
 $[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
 
@@ -620,13 +620,13 @@ $[varname] = $[unique $[patsubst %_src.cxx,,%.cxx %.c %.yxx %.lxx,$[st_dir]/%.ob
 $[target] : $[sources] $[st_dir]/stamp
 #if $[ld]
   // 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
   // Otherwise, we can use the normal linker.
   #if $[filter %.cxx %.yxx %.lxx,$[get_sources]]
-	$[LINK_BIN_C++]
+$[TAB]$[LINK_BIN_C++]
   #else
-	$[LINK_BIN_C]
+$[TAB]$[LINK_BIN_C]
   #endif
 #endif
 
@@ -646,19 +646,19 @@ install-$[TARGET] : $[installed_files]
 
 uninstall-$[TARGET] :
 #if $[installed_files]
-	rm -f $[sort $[installed_files]]
+$[TAB]rm -f $[sort $[installed_files]]
 #endif
 
 $[install_bin_dir]/$[TARGET].exe : $[st_dir]/$[TARGET].exe $[st_dir]/stamp
 #define local $[TARGET].exe
 #define dest $[install_bin_dir]
-	cp -f $[st_dir]/$[local] $[dest]
+$[TAB]cp -f $[st_dir]/$[local] $[dest]
 
 #if $[build_pdbs]
 $[install_bin_dir]/$[TARGET].pdb : $[st_dir]/$[TARGET].pdb $[st_dir]/stamp
 #define local $[TARGET].pdb
 #define dest $[install_bin_dir]
-	cp -f $[st_dir]/$[local] $[dest]
+$[TAB]cp -f $[st_dir]/$[local] $[dest]
 #endif
 
 #end bin_target
@@ -679,9 +679,9 @@ $[varname] = $[unique $[patsubst %_src.cxx,,%.cxx %.c %.yxx %.lxx,$[st_dir]/%.ob
 #define sources $($[varname])
 $[target] : $[sources] $[st_dir]/stamp
 #if $[filter %.cxx %.yxx %.lxx,$[get_sources]]
-	$[LINK_BIN_C++]
+$[TAB]$[LINK_BIN_C++]
 #else
-	$[LINK_BIN_C]
+$[TAB]$[LINK_BIN_C]
 #endif
 
 #end noinst_bin_target test_bin_target
@@ -699,9 +699,9 @@ $[target] : $[sources] $[st_dir]/stamp
 #define target $[patsubst %.yxx,%.cxx,$[file]]
 #define source $[file]
 $[target] : $[source]
-	$[BISON] $[YFLAGS] -y $[if $[YACC_PREFIX],-d --name-prefix=$[YACC_PREFIX]] $[source]
-	mv y.tab.c $[target]
-	mv y.tab.h $[patsubst %.yxx,%.h,$[source]]
+$[TAB]$[BISON] $[YFLAGS] -y $[if $[YACC_PREFIX],-d --name-prefix=$[YACC_PREFIX]] $[source]
+$[TAB]mv y.tab.c $[target]
+$[TAB]mv y.tab.h $[patsubst %.yxx,%.h,$[source]]
 
 #end file
 
@@ -710,11 +710,11 @@ $[target] : $[source]
 #define target $[patsubst %.lxx,%.cxx,$[file]]
 #define source $[file]
 $[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 script /#include <unistd.h>/d
-	$[SED]
-	rm $[source]
+$[TAB]$[SED]
+$[TAB]rm $[source]
 
 #end file
 
@@ -725,7 +725,7 @@ $[target] : $[source]
 #define ipath $[file_ipath]
 #define flags $[cflags] $[CFLAGS_SHARED] $[all_sources $[building_var:%=/D%],$[file]]
 $[target] : $[source] $[dependencies $[source]] $[so_dir]/stamp
-	$[COMPILE_C]
+$[TAB]$[COMPILE_C]
 
 #end file
 
@@ -737,7 +737,7 @@ $[target] : $[source] $[dependencies $[source]] $[so_dir]/stamp
 #define ipath $[file_ipath]
 #define flags $[cflags] $[all_sources $[building_var:%=/D%],$[file]]
 $[target] : $[source] $[dependencies $[source]] $[st_dir]/stamp
-	$[COMPILE_C]
+$[TAB]$[COMPILE_C]
 
 #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
 // depend on yacc having run.
 $[target] : $[source] $[dependencies $[file]] $[yxx_so_sources:%.yxx=%.cxx] $[so_dir]/stamp
-	$[COMPILE_C++]
+$[TAB]$[COMPILE_C++]
 
 #end file
 
@@ -762,7 +762,7 @@ $[target] : $[source] $[dependencies $[file]] $[yxx_so_sources:%.yxx=%.cxx] $[so
 #define ipath $[file_ipath]
 #define flags $[c++flags] $[all_sources $[building_var:%=/D%],$[file]]
 $[target] : $[source] $[dependencies $[file]] $[yxx_st_sources:%.yxx=%.cxx] $[st_dir]/stamp
-	$[COMPILE_C++]
+$[TAB]$[COMPILE_C++]
 
 #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
 // depend on yacc having run.
 $[target] : $[source] $[dependencies $[file]] $[yxx_so_sources:%.yxx=%.cxx] $[so_dir]/stamp
-	$[COMPILE_C++]
+$[TAB]$[COMPILE_C++]
 
 #end file
 
@@ -787,7 +787,7 @@ $[target] : $[source] $[dependencies $[file]] $[yxx_so_sources:%.yxx=%.cxx] $[so
 #define ipath $[file_ipath]
 #define flags $[noopt_c++flags] $[all_sources $[building_var:%=/D%],$[file]]
 $[target] : $[source] $[dependencies $[file]] $[yxx_st_sources:%.yxx=%.cxx] $[st_dir]/stamp
-	$[COMPILE_C++]
+$[TAB]$[COMPILE_C++]
 
 #end file
 
@@ -797,53 +797,53 @@ $[target] : $[source] $[dependencies $[file]] $[yxx_st_sources:%.yxx=%.cxx] $[st
 $[install_bin_dir]/$[file] : $[file]
 #define local $[file]
 #define dest $[install_bin_dir]
-	cp -f $[local] $[dest]
+$[TAB]cp -f $[local] $[dest]
 #end file
 
 #foreach file $[install_headers]
 $[install_headers_dir]/$[file] : $[file]
 #define local $[file]
 #define dest $[install_headers_dir]
-	cp -f $[local] $[dest]
+$[TAB]cp -f $[local] $[dest]
 #end file
 
 #foreach file $[install_parser_inc]
 $[install_parser_inc_dir]/$[file] : $[file]
 #define local $[file]
 #define dest $[install_parser_inc_dir]
-	cp -f $[local] $[dest]
+$[TAB]cp -f $[local] $[dest]
 #end file
 
 #foreach file $[install_data]
 $[install_data_dir]/$[file] : $[file]
 #define local $[file]
 #define dest $[install_data_dir]
-	cp -f $[local] $[dest]
+$[TAB]cp -f $[local] $[dest]
 #end file
 
 #foreach file $[install_config]
 $[install_config_dir]/$[file] : $[file]
 #define local $[file]
 #define dest $[install_config_dir]
-	cp -f $[local] $[dest]
+$[TAB]cp -f $[local] $[dest]
 #end file
 
 // Finally, all the special targets.  These are commands that just need
 // to be invoked; we don't pretend to know what they are.
 #forscopes special_target
 $[TARGET] :
-	$[COMMAND]
+$[TAB]$[COMMAND]
 
 #end special_target
 
 
 // Finally, the rules to freshen the Makefile itself.
 Makefile : $[SOURCE_FILENAME]
-	ppremake
+$[TAB]ppremake
 
 #if $[and $[DEPENDENCY_CACHE_FILENAME],$[dep_sources]]
 $[DEPENDENCY_CACHE_FILENAME] : $[dep_sources]
-	@ppremake -D $[DEPENDENCY_CACHE_FILENAME]
+$[TAB]@ppremake -D $[DEPENDENCY_CACHE_FILENAME]
 #endif
 
 
@@ -896,65 +896,65 @@ install : $[if $[CONFIG_HEADER],$[install_headers_dir] $[install_headers_dir]/$[
 install-igate : $[subdirs:%=install-igate-%]
 uninstall : $[subdirs:%=uninstall-%]
 #if $[CONFIG_HEADER]
-	rm -f $[install_headers_dir]/$[CONFIG_HEADER]
+$[TAB]rm -f $[install_headers_dir]/$[CONFIG_HEADER]
 #endif
 uninstall-igate : $[subdirs:%=uninstall-igate-%]
 
 #formap dirname subdirs
 #define depends 
 $[dirname] : $[dirnames $[if $[build_directory],$[DIRNAME]],$[DEPEND_DIRS]]
-	cd ./$[PATH] && $(MAKE) all
+$[TAB]cd ./$[PATH] && $(MAKE) all
 #end dirname
 
 #formap dirname subdirs
 test-$[dirname] :
-	cd ./$[PATH] && $(MAKE) test
+$[TAB]cd ./$[PATH] && $(MAKE) test
 #end dirname
 
 #formap dirname subdirs
 clean-$[dirname] :
-	cd ./$[PATH] && $(MAKE) clean
+$[TAB]cd ./$[PATH] && $(MAKE) clean
 #end dirname
 
 #formap dirname subdirs
 clean-igate-$[dirname] :
-	cd ./$[PATH] && $(MAKE) clean-igate
+$[TAB]cd ./$[PATH] && $(MAKE) clean-igate
 #end dirname
 
 #formap dirname subdirs
 cleanall-$[dirname] : $[patsubst %,cleanall-%,$[dirnames $[if $[build_directory],$[DIRNAME]],$[DEPEND_DIRS]]]
-	cd ./$[PATH] && $(MAKE) cleanall
+$[TAB]cd ./$[PATH] && $(MAKE) cleanall
 #end dirname
 
 #formap dirname subdirs
 install-$[dirname] : $[patsubst %,install-%,$[dirnames $[if $[build_directory],$[DIRNAME]],$[DEPEND_DIRS]]]
-	cd ./$[PATH] && $(MAKE) install
+$[TAB]cd ./$[PATH] && $(MAKE) install
 #end dirname
 
 #formap dirname subdirs
 install-igate-$[dirname] :
-	cd ./$[PATH] && $(MAKE) install-igate
+$[TAB]cd ./$[PATH] && $(MAKE) install-igate
 #end dirname
 
 #formap dirname subdirs
 uninstall-$[dirname] :
-	cd ./$[PATH] && $(MAKE) uninstall
+$[TAB]cd ./$[PATH] && $(MAKE) uninstall
 #end dirname
 
 #formap dirname subdirs
 uninstall-igate-$[dirname] :
-	cd ./$[PATH] && $(MAKE) uninstall-igate
+$[TAB]cd ./$[PATH] && $(MAKE) uninstall-igate
 #end dirname
 
 #if $[ne $[CONFIG_HEADER],]
 $[install_headers_dir] :
-	@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] || echo mkdir -p $[install_headers_dir]
+$[TAB]@test -d $[install_headers_dir] || mkdir -p $[install_headers_dir]
 
 $[install_headers_dir]/$[CONFIG_HEADER] : $[CONFIG_HEADER]
 #define local $[CONFIG_HEADER]
 #define dest $[install_headers_dir]
-	cp -f $[local] $[dest]
+$[TAB]cp -f $[local] $[dest]
 #endif
 
 #end Makefile

+ 74 - 74
dtool/pptempl/Template.msvc.pp

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

+ 72 - 72
dtool/pptempl/Template.unix.pp

@@ -161,22 +161,22 @@ test : $[test_bin_targets]
 // It does assume that the odirs are not '.', however.
 clean :
 #if $[so_sources]
-	rm -rf $[so_dir]
+$[TAB]rm -rf $[so_dir]
 #endif
 #if $[st_sources]
-	rm -rf $[st_dir]
+$[TAB]rm -rf $[st_dir]
 #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,
 // it also cleans up the bison and flex output, as well as the
 // dependency cache file.
 cleanall : clean
 #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
 #if $[ne $[DEPENDENCY_CACHE_FILENAME],]
-	rm -f $[DEPENDENCY_CACHE_FILENAME]
+$[TAB]rm -f $[DEPENDENCY_CACHE_FILENAME]
 #endif
 
 clean-igate :
@@ -186,13 +186,13 @@ clean-igate :
   #define igatemscan $[components $[get_igatedb:%=$[RELDIR]/$[so_dir]/%],$[active_component_libs]]
   #define igatemout $[if $[igatemscan],lib$[TARGET]_module.cxx]
   #if $[igatedb]
-	rm -f $[so_dir]/$[igatedb]
+$[TAB]rm -f $[so_dir]/$[igatedb]
   #endif
   #if $[igateoutput]
-	rm -f $[so_dir]/$[igateoutput] $[igateoutput:%.cxx=$[so_dir]/%.o]
+$[TAB]rm -f $[so_dir]/$[igateoutput] $[igateoutput:%.cxx=$[so_dir]/%.o]
   #endif
   #if $[igatemout]
-	rm -f $[so_dir]/$[igatemout] $[igatemout:%.cxx=$[so_dir]/%.o]
+$[TAB]rm -f $[so_dir]/$[igatemout] $[igatemout:%.cxx=$[so_dir]/%.o]
   #endif
 #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-%]
 #if $[installed_files]
-	rm -f $[sort $[installed_files]]
+$[TAB]rm -f $[sort $[installed_files]]
 #endif
 
 uninstall-igate :
 #if $[installed_igate_files]
-	rm -f $[sort $[installed_igate_files]]
+$[TAB]rm -f $[sort $[installed_igate_files]]
 #endif
 
 
@@ -252,8 +252,8 @@ uninstall-igate :
     $[if $[install_igatedb],$[install_igatedb_dir]] \
     ]
 $[directory] :
-	@test -d $[directory] || echo mkdir -p $[directory]
-	@test -d $[directory] || mkdir -p $[directory]
+$[TAB]@test -d $[directory] || echo mkdir -p $[directory]
+$[TAB]@test -d $[directory] || mkdir -p $[directory]
 #end directory
 
 
@@ -300,9 +300,9 @@ $[varname] = $[unique $[patsubst %_src.cxx,,%.cxx %.c %.yxx %.lxx,$[so_dir]/%.o,
 #define sources $($[varname])
 $[target] : $[sources]
 #if $[filter %.cxx %.yxx %.lxx,$[get_sources]]
-	$[SHARED_LIB_C++]
+$[TAB]$[SHARED_LIB_C++]
 #else
-	$[SHARED_LIB_C]
+$[TAB]$[SHARED_LIB_C]
 #endif
 
 // Here are the rules to install and uninstall the library and
@@ -319,13 +319,13 @@ install-lib$[TARGET] : $[installed_files]
 
 uninstall-lib$[TARGET] :
 #if $[installed_files]
-	rm -f $[sort $[installed_files]]
+$[TAB]rm -f $[sort $[installed_files]]
 #endif
 
 $[install_lib_dir]/lib$[TARGET].so : $[so_dir]/lib$[TARGET].so
 #define local lib$[TARGET].so
 #define dest $[install_lib_dir]
-	cd ./$[so_dir] && $[INSTALL_PROG]
+$[TAB]cd ./$[so_dir] && $[INSTALL_PROG]
 
 #if $[igatescan]
 // 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]
 #define local $[igatedb]
 #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
 // parallel make.
@@ -351,14 +351,14 @@ $[so_dir]/$[igatedb] : $[so_dir]/$[igateoutput]
 
 lib$[TARGET]_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 source $[so_dir]/$[igateoutput]
 #define ipath . $[target_ipath]
 #define flags $[get_cflags] $[C++FLAGS] $[CFLAGS_OPT$[OPTIMIZE]] $[if $[>= $[OPTIMIZE],2],$[OPTFLAGS]] $[CFLAGS_SHARED]
 $[target] : $[source]
-	$[COMPILE_C++]
+$[TAB]$[COMPILE_C++]
 #endif  // $[igatescan]
 
 #if $[igatemout]
@@ -373,14 +373,14 @@ lib$[TARGET]_igatemscan = $[igatemscan]
 #define target $[so_dir]/$[igatemout]
 #define sources $(lib$[TARGET]_igatemscan)
 $[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 source $[so_dir]/$[igatemout]
 #define ipath . $[target_ipath]
 #define flags $[get_cflags] $[C++FLAGS] $[CFLAGS_OPT$[OPTIMIZE]] $[if $[>= $[OPTIMIZE],2],$[OPTFLAGS]] $[CFLAGS_SHARED]
 $[target] : $[source]
-	$[COMPILE_C++]
+$[TAB]$[COMPILE_C++]
 #endif  // $[igatescan]
 
 #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])
 $[target] : $[sources]
 #if $[filter %.cxx %.yxx %.lxx,$[get_sources]]
-	$[SHARED_LIB_C++]
+$[TAB]$[SHARED_LIB_C++]
 #else
-	$[SHARED_LIB_C]
+$[TAB]$[SHARED_LIB_C]
 #endif
 
 #end noinst_lib_target
@@ -425,12 +425,12 @@ $[varname] = $[unique $[patsubst %_src.cxx,,%.cxx %.c %.yxx %.lxx,$[st_dir]/%.o,
 #define sources $($[varname])
 $[target] : $[sources]
 #if $[filter %.cxx %.yxx %.lxx,$[get_sources]]
-	$[STATIC_LIB_C++]
+$[TAB]$[STATIC_LIB_C++]
 #else
-	$[STATIC_LIB_C]
+$[TAB]$[STATIC_LIB_C]
 #endif
 #if $[RANLIB]
-	$[RANLIB]
+$[TAB]$[RANLIB]
 #endif
 
 #define installed_files \
@@ -444,13 +444,13 @@ install-lib$[TARGET] : $[installed_files]
 
 uninstall-lib$[TARGET] :
 #if $[installed_files]
-	rm -f $[sort $[installed_files]]
+$[TAB]rm -f $[sort $[installed_files]]
 #endif
 
 $[install_lib_dir]/lib$[TARGET].a : $[st_dir]/lib$[TARGET].a
 #define local lib$[TARGET].a
 #define dest $[install_lib_dir]
-	cd ./$[st_dir] && $[INSTALL]
+$[TAB]cd ./$[st_dir] && $[INSTALL]
 
 #end static_lib_target
 
@@ -469,8 +469,8 @@ $[TARGET] : $[st_dir]/$[TARGET]
 #define source $[SOURCE]
 #define script $[COMMAND]
 $[target] : $[source]
-	$[SED]
-	chmod +x $[target]
+$[TAB]$[SED]
+$[TAB]chmod +x $[target]
 
 #define installed_files \
     $[install_bin_dir]/$[TARGET]
@@ -479,13 +479,13 @@ install-$[TARGET] : $[installed_files]
 
 uninstall-$[TARGET] :
 #if $[installed_files]
-	rm -f $[sort $[installed_files]]
+$[TAB]rm -f $[sort $[installed_files]]
 #endif
 
 $[install_bin_dir]/$[TARGET] : $[st_dir]/$[TARGET]
 #define local $[TARGET]
 #define dest $[install_bin_dir]
-	cd ./$[st_dir] && $[INSTALL_PROG]
+$[TAB]cd ./$[st_dir] && $[INSTALL_PROG]
 
 #end sed_bin_target
 
@@ -506,13 +506,13 @@ $[varname] = $[unique $[patsubst %_src.cxx,,%.cxx %.c %.yxx %.lxx,$[st_dir]/%.o,
 $[target] : $[sources]
 #if $[ld]
   // 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
   // Otherwise, we can use the normal linker.
   #if $[filter %.cxx %.yxx %.lxx,$[get_sources]]
-	$[LINK_BIN_C++]
+$[TAB]$[LINK_BIN_C++]
   #else
-	$[LINK_BIN_C]
+$[TAB]$[LINK_BIN_C]
   #endif
 #endif
 
@@ -527,13 +527,13 @@ install-$[TARGET] : $[installed_files]
 
 uninstall-$[TARGET] :
 #if $[installed_files]
-	rm -f $[sort $[installed_files]]
+$[TAB]rm -f $[sort $[installed_files]]
 #endif
 
 $[install_bin_dir]/$[TARGET] : $[st_dir]/$[TARGET]
 #define local $[TARGET]
 #define dest $[install_bin_dir]
-	cd ./$[st_dir] && $[INSTALL_PROG]
+$[TAB]cd ./$[st_dir] && $[INSTALL_PROG]
 
 #end bin_target
 
@@ -553,9 +553,9 @@ $[varname] = $[unique $[patsubst %_src.cxx,,%.cxx %.c %.yxx %.lxx,$[st_dir]/%.o,
 #define sources $($[varname])
 $[target] : $[sources]
 #if $[filter %.cxx %.yxx %.lxx,$[get_sources]]
-	$[LINK_BIN_C++]
+$[TAB]$[LINK_BIN_C++]
 #else
-	$[LINK_BIN_C]
+$[TAB]$[LINK_BIN_C]
 #endif
 
 #end noinst_bin_target test_bin_target
@@ -573,9 +573,9 @@ $[target] : $[sources]
 #define target $[patsubst %.yxx,%.cxx,$[file]]
 #define source $[file]
 $[target] : $[source]
-	$[BISON] -y $[YFLAGS] $[if $[YACC_PREFIX],-d --name-prefix=$[YACC_PREFIX]] $[source]
-	mv y.tab.c $[target]
-	mv y.tab.h $[patsubst %.yxx,%.h,$[source]]
+$[TAB]$[BISON] -y $[YFLAGS] $[if $[YACC_PREFIX],-d --name-prefix=$[YACC_PREFIX]] $[source]
+$[TAB]mv y.tab.c $[target]
+$[TAB]mv y.tab.h $[patsubst %.yxx,%.h,$[source]]
 
 #end file
 
@@ -584,11 +584,11 @@ $[target] : $[source]
 #define target $[patsubst %.lxx,%.cxx,$[file]]
 #define source $[file]
 $[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 script /#include <unistd.h>/d
-	$[SED]
-	rm $[source]
+$[TAB]$[SED]
+$[TAB]rm $[source]
 
 #end file
 
@@ -599,7 +599,7 @@ $[target] : $[source]
 #define ipath $[file_ipath]
 #define flags $[cflags] $[CFLAGS_SHARED]
 $[target] : $[source] $[dependencies $[source]]
-	$[COMPILE_C]
+$[TAB]$[COMPILE_C]
 
 #end file
 
@@ -611,7 +611,7 @@ $[target] : $[source] $[dependencies $[source]]
 #define ipath $[file_ipath]
 #define flags $[cflags]
 $[target] : $[source] $[dependencies $[source]]
-	$[COMPILE_C]
+$[TAB]$[COMPILE_C]
 
 #end file
 
@@ -624,7 +624,7 @@ $[target] : $[source] $[dependencies $[source]]
 // Yacc must run before some files can be compiled, so all files
 // depend on yacc having run.
 $[target] : $[source] $[dependencies $[file]] $[yxx_so_sources:%.yxx=%.cxx]
-	$[COMPILE_C++]
+$[TAB]$[COMPILE_C++]
 
 #end file
 
@@ -636,7 +636,7 @@ $[target] : $[source] $[dependencies $[file]] $[yxx_so_sources:%.yxx=%.cxx]
 #define ipath $[file_ipath]
 #define flags $[c++flags]
 $[target] : $[source] $[dependencies $[file]] $[yxx_st_sources:%.yxx=%.cxx]
-	$[COMPILE_C++]
+$[TAB]$[COMPILE_C++]
 
 #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
 // depend on yacc having run.
 $[target] : $[source] $[dependencies $[file]] $[yxx_so_sources:%.yxx=%.cxx]
-	$[COMPILE_C++]
+$[TAB]$[COMPILE_C++]
 
 #end file
 
@@ -661,7 +661,7 @@ $[target] : $[source] $[dependencies $[file]] $[yxx_so_sources:%.yxx=%.cxx]
 #define ipath $[file_ipath]
 #define flags $[noopt_c++flags]
 $[target] : $[source] $[dependencies $[file]] $[yxx_st_sources:%.yxx=%.cxx]
-	$[COMPILE_C++]
+$[TAB]$[COMPILE_C++]
 
 #end file
 
@@ -671,53 +671,53 @@ $[target] : $[source] $[dependencies $[file]] $[yxx_st_sources:%.yxx=%.cxx]
 $[install_bin_dir]/$[file] : $[file]
 #define local $[file]
 #define dest $[install_bin_dir]
-	$[INSTALL_PROG]
+$[TAB]$[INSTALL_PROG]
 #end file
 
 #foreach file $[install_headers]
 $[install_headers_dir]/$[file] : $[file]
 #define local $[file]
 #define dest $[install_headers_dir]
-	$[INSTALL]
+$[TAB]$[INSTALL]
 #end file
 
 #foreach file $[install_parser_inc]
 $[install_parser_inc_dir]/$[file] : $[file]
 #define local $[file]
 #define dest $[install_parser_inc_dir]
-	$[INSTALL]
+$[TAB]$[INSTALL]
 #end file
 
 #foreach file $[install_data]
 $[install_data_dir]/$[file] : $[file]
 #define local $[file]
 #define dest $[install_data_dir]
-	$[INSTALL]
+$[TAB]$[INSTALL]
 #end file
 
 #foreach file $[install_config]
 $[install_config_dir]/$[file] : $[file]
 #define local $[file]
 #define dest $[install_config_dir]
-	$[INSTALL]
+$[TAB]$[INSTALL]
 #end file
 
 // Finally, all the special targets.  These are commands that just need
 // to be invoked; we don't pretend to know what they are.
 #forscopes special_target
 $[TARGET] :
-	$[COMMAND]
+$[TAB]$[COMMAND]
 
 #end special_target
 
 
 // Finally, the rules to freshen the Makefile itself.
 Makefile : $[SOURCE_FILENAME]
-	ppremake
+$[TAB]ppremake
 
 #if $[and $[DEPENDENCY_CACHE_FILENAME],$[dep_sources]]
 $[DEPENDENCY_CACHE_FILENAME] : $[dep_sources]
-	@ppremake -D $[DEPENDENCY_CACHE_FILENAME]
+$[TAB]@ppremake -D $[DEPENDENCY_CACHE_FILENAME]
 #endif
 
 
@@ -770,7 +770,7 @@ install : $[if $[CONFIG_HEADER],$[install_headers_dir] $[install_headers_dir]/$[
 install-igate : $[subdirs:%=install-igate-%]
 uninstall : $[subdirs:%=uninstall-%]
 #if $[CONFIG_HEADER]
-	rm -f $[install_headers_dir]/$[CONFIG_HEADER]
+$[TAB]rm -f $[install_headers_dir]/$[CONFIG_HEADER]
 #endif
 uninstall-igate : $[subdirs:%=uninstall-igate-%]
 
@@ -782,58 +782,58 @@ uninstall-igate : $[subdirs:%=uninstall-igate-%]
 #formap dirname subdirs
 #define depends 
 $[dirname] : $[dirnames $[if $[build_directory],$[DIRNAME]],$[DEPEND_DIRS]]
-	cd ./$[PATH] && $(MAKE) all
+$[TAB]cd ./$[PATH] && $(MAKE) all
 #end dirname
 
 #formap dirname subdirs
 test-$[dirname] :
-	cd ./$[PATH] && $(MAKE) test
+$[TAB]cd ./$[PATH] && $(MAKE) test
 #end dirname
 
 #formap dirname subdirs
 clean-$[dirname] :
-	cd ./$[PATH] && $(MAKE) clean
+$[TAB]cd ./$[PATH] && $(MAKE) clean
 #end dirname
 
 #formap dirname subdirs
 clean-igate-$[dirname] :
-	cd ./$[PATH] && $(MAKE) clean-igate
+$[TAB]cd ./$[PATH] && $(MAKE) clean-igate
 #end dirname
 
 #formap dirname subdirs
 cleanall-$[dirname] : $[patsubst %,cleanall-%,$[dirnames $[if $[build_directory],$[DIRNAME]],$[DEPEND_DIRS]]]
-	cd ./$[PATH] && $(MAKE) cleanall
+$[TAB]cd ./$[PATH] && $(MAKE) cleanall
 #end dirname
 
 #formap dirname subdirs
 install-$[dirname] : $[patsubst %,install-%,$[dirnames $[if $[build_directory],$[DIRNAME]],$[DEPEND_DIRS]]]
-	cd ./$[PATH] && $(MAKE) install
+$[TAB]cd ./$[PATH] && $(MAKE) install
 #end dirname
 
 #formap dirname subdirs
 install-igate-$[dirname] :
-	cd ./$[PATH] && $(MAKE) install-igate
+$[TAB]cd ./$[PATH] && $(MAKE) install-igate
 #end dirname
 
 #formap dirname subdirs
 uninstall-$[dirname] :
-	cd ./$[PATH] && $(MAKE) uninstall
+$[TAB]cd ./$[PATH] && $(MAKE) uninstall
 #end dirname
 
 #formap dirname subdirs
 uninstall-igate-$[dirname] :
-	cd ./$[PATH] && $(MAKE) uninstall-igate
+$[TAB]cd ./$[PATH] && $(MAKE) uninstall-igate
 #end dirname
 
 #if $[ne $[CONFIG_HEADER],]
 $[install_headers_dir] :
-	@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] || echo mkdir -p $[install_headers_dir]
+$[TAB]@test -d $[install_headers_dir] || mkdir -p $[install_headers_dir]
 
 $[install_headers_dir]/$[CONFIG_HEADER] : $[CONFIG_HEADER]
 #define local $[CONFIG_HEADER]
 #define dest $[install_headers_dir]
-	$[INSTALL]
+$[TAB]$[INSTALL]
 #endif
 
 #end Makefile