Browse Source

*** empty log message ***

David Rose 24 years ago
parent
commit
5000ac5975
3 changed files with 110 additions and 20 deletions
  1. 51 6
      dtool/pptempl/Template.gmsvc.pp
  2. 45 0
      dtool/pptempl/Template.msvc.pp
  3. 14 14
      dtool/pptempl/Template.unix.pp

+ 51 - 6
dtool/pptempl/Template.gmsvc.pp

@@ -212,6 +212,23 @@ cleanall : clean
 	rm -f $[DEPENDENCY_CACHE_FILENAME]
 	rm -f $[DEPENDENCY_CACHE_FILENAME]
 #endif
 #endif
 
 
+clean-igate :
+#forscopes metalib_target lib_target ss_lib_target
+  #define igatedb $[get_igatedb]
+  #define igateoutput $[get_igateoutput]
+  #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]
+  #endif
+  #if $[igateoutput]
+	rm -f $[so_dir]/$[igateoutput] $[igateoutput:%.cxx=$[so_dir]/%.obj]
+  #endif
+  #if $[igatemout]
+	rm -f $[so_dir]/$[igatemout] $[igatemout:%.cxx=$[so_dir]/%.obj]
+  #endif
+#end metalib_target lib_target ss_lib_target
+
 // Now, 'install' and 'uninstall'.  These simply copy files into the
 // Now, 'install' and 'uninstall'.  These simply copy files into the
 // install directory (or remove them).  The 'install' rule also makes
 // install directory (or remove them).  The 'install' rule also makes
 // the directories if necessary.
 // the directories if necessary.
@@ -222,6 +239,9 @@ cleanall : clean
      $[INSTALL_DATA:%=$[install_data_dir]/%] \
      $[INSTALL_DATA:%=$[install_data_dir]/%] \
      $[INSTALL_CONFIG:%=$[install_config_dir]/%]
      $[INSTALL_CONFIG:%=$[install_config_dir]/%]
 
 
+#define installed_igate_files \
+     $[get_igatedb(metalib_target lib_target ss_lib_target):%=$[install_igatedb_dir]/%]
+
 #define install_targets \
 #define install_targets \
      $[sort \
      $[sort \
        $[if $[install_lib],$[install_lib_dir]] \
        $[if $[install_lib],$[install_lib_dir]] \
@@ -238,11 +258,18 @@ cleanall : clean
 
 
 install : all $[install_targets]
 install : all $[install_targets]
 
 
+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]]
 	rm -f $[sort $[installed_files]]
 #endif
 #endif
 
 
+uninstall-igate :
+#if $[installed_igate_files]
+	rm -f $[sort $[installed_igate_files]]
+#endif
+
 
 
 // We need a rule for each directory we might need to make.  This
 // We need a rule for each directory we might need to make.  This
 // loops through the full set of directories and creates a rule to
 // loops through the full set of directories and creates a rule to
@@ -863,42 +890,60 @@ $[DEPENDENCY_CACHE_FILENAME] : $[dep_sources]
 all : $[subdirs]
 all : $[subdirs]
 test : $[subdirs:%=test-%]
 test : $[subdirs:%=test-%]
 clean : $[subdirs:%=clean-%]
 clean : $[subdirs:%=clean-%]
+clean-igate : $[subdirs:%=clean-igate-%]
 cleanall : $[subdirs:%=cleanall-%]
 cleanall : $[subdirs:%=cleanall-%]
 install : $[if $[CONFIG_HEADER],$[install_headers_dir] $[install_headers_dir]/$[CONFIG_HEADER]] $[subdirs:%=install-%]
 install : $[if $[CONFIG_HEADER],$[install_headers_dir] $[install_headers_dir]/$[CONFIG_HEADER]] $[subdirs:%=install-%]
+install-igate : $[subdirs:%=install-igate-%]
 uninstall : $[subdirs:%=uninstall-%]
 uninstall : $[subdirs:%=uninstall-%]
 #if $[CONFIG_HEADER]
 #if $[CONFIG_HEADER]
 	rm -f $[install_headers_dir]/$[CONFIG_HEADER]
 	rm -f $[install_headers_dir]/$[CONFIG_HEADER]
 #endif
 #endif
+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
+	cd ./$[PATH] && $(MAKE) all
 #end dirname
 #end dirname
 
 
 #formap dirname subdirs
 #formap dirname subdirs
 test-$[dirname] :
 test-$[dirname] :
-	cd ./$[PATH]; $(MAKE) test
+	cd ./$[PATH] && $(MAKE) test
 #end dirname
 #end dirname
 
 
 #formap dirname subdirs
 #formap dirname subdirs
 clean-$[dirname] :
 clean-$[dirname] :
-	cd ./$[PATH]; $(MAKE) clean
+	cd ./$[PATH] && $(MAKE) clean
+#end dirname
+
+#formap dirname subdirs
+clean-igate-$[dirname] :
+	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
+	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
+	cd ./$[PATH] && $(MAKE) install
+#end dirname
+
+#formap dirname subdirs
+install-igate-$[dirname] :
+	cd ./$[PATH] && $(MAKE) install-igate
 #end dirname
 #end dirname
 
 
 #formap dirname subdirs
 #formap dirname subdirs
 uninstall-$[dirname] :
 uninstall-$[dirname] :
-	cd ./$[PATH]; $(MAKE) uninstall
+	cd ./$[PATH] && $(MAKE) uninstall
+#end dirname
+
+#formap dirname subdirs
+uninstall-igate-$[dirname] :
+	cd ./$[PATH] && $(MAKE) uninstall-igate
 #end dirname
 #end dirname
 
 
 #if $[ne $[CONFIG_HEADER],]
 #if $[ne $[CONFIG_HEADER],]

+ 45 - 0
dtool/pptempl/Template.msvc.pp

@@ -212,6 +212,23 @@ cleanall : clean
 	-del /f $[DEPENDENCY_CACHE_FILENAME]
 	-del /f $[DEPENDENCY_CACHE_FILENAME]
 #endif
 #endif
 
 
+clean-igate :
+#forscopes metalib_target lib_target ss_lib_target
+  #define igatedb $[get_igatedb]
+  #define igateoutput $[get_igateoutput]
+  #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]
+  #endif
+  #if $[igateoutput]
+	-del /f $[so_dir]\$[igateoutput] $[igateoutput:%.cxx=$[so_dir]\%.obj]
+  #endif
+  #if $[igatemout]
+	-del /f $[so_dir]\$[igatemout] $[igatemout:%.cxx=$[so_dir]/%.obj]
+  #endif
+#end metalib_target lib_target ss_lib_target
+
 // Now, 'install' and 'uninstall'.  These simply copy files into the
 // Now, 'install' and 'uninstall'.  These simply copy files into the
 // install directory (or remove them).  The 'install' rule also makes
 // install directory (or remove them).  The 'install' rule also makes
 // the directories if necessary.
 // the directories if necessary.
@@ -222,6 +239,9 @@ cleanall : clean
      $[INSTALL_DATA:%=$[install_data_dir]\%] \
      $[INSTALL_DATA:%=$[install_data_dir]\%] \
      $[INSTALL_CONFIG:%=$[install_config_dir]\%]
      $[INSTALL_CONFIG:%=$[install_config_dir]\%]
 
 
+#define installed_igate_files \
+     $[get_igatedb(metalib_target lib_target ss_lib_target):%=$[install_igatedb_dir]\%]
+
 #define install_targets \
 #define install_targets \
      $[sort \
      $[sort \
        $[if $[install_lib],$[install_lib_dir]] \
        $[if $[install_lib],$[install_lib_dir]] \
@@ -238,11 +258,18 @@ cleanall : clean
 
 
 install : all $[install_targets]
 install : all $[install_targets]
 
 
+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]
 	-del /f $[file]
 #end file
 #end file
 
 
+uninstall-igate :
+#foreach file $[sort $[installed_igate_files]]
+	-del /f $[file]
+#end file
+
 
 
 // We need a rule for each directory we might need to make.  This
 // We need a rule for each directory we might need to make.  This
 // loops through the full set of directories and creates a rule to
 // loops through the full set of directories and creates a rule to
@@ -835,12 +862,15 @@ $[DEPENDENCY_CACHE_FILENAME] : $[dep_sources]
 all : $[subdirs]
 all : $[subdirs]
 test : $[subdirs:%=test-%]
 test : $[subdirs:%=test-%]
 clean : $[subdirs:%=clean-%]
 clean : $[subdirs:%=clean-%]
+clean-igate : $[subdirs:%=clean-igate-%]
 cleanall : $[subdirs:%=cleanall-%]
 cleanall : $[subdirs:%=cleanall-%]
 install : $[if $[CONFIG_HEADER],$[install_headers_dir] $[install_headers_dir]\$[CONFIG_HEADER]] $[subdirs:%=install-%]
 install : $[if $[CONFIG_HEADER],$[install_headers_dir] $[install_headers_dir]\$[CONFIG_HEADER]] $[subdirs:%=install-%]
+install-igate : $[subdirs:%=install-igate-%]
 uninstall : $[subdirs:%=uninstall-%]
 uninstall : $[subdirs:%=uninstall-%]
 #if $[CONFIG_HEADER]
 #if $[CONFIG_HEADER]
 	-del /f $[install_headers_dir]\$[CONFIG_HEADER]
 	-del /f $[install_headers_dir]\$[CONFIG_HEADER]
 #endif
 #endif
+uninstall-igate : $[subdirs:%=uninstall-igate-%]
 
 
 #formap dirname subdirs
 #formap dirname subdirs
 #define depends 
 #define depends 
@@ -858,6 +888,11 @@ clean-$[dirname] :
 	cd $[osfilename $[PATH]] && $(MAKE) /nologo clean
 	cd $[osfilename $[PATH]] && $(MAKE) /nologo clean
 #end dirname
 #end dirname
 
 
+#formap dirname subdirs
+clean-igate-$[dirname] :
+	cd $[osfilename $[PATH]] && $(MAKE) /nologo clean-igate
+#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
 	cd $[osfilename $[PATH]] && $(MAKE) /nologo cleanall
@@ -868,11 +903,21 @@ install-$[dirname] : $[patsubst %,install-%,$[dirnames $[if $[build_directory],$
 	cd $[osfilename $[PATH]] && $(MAKE) /nologo install
 	cd $[osfilename $[PATH]] && $(MAKE) /nologo install
 #end dirname
 #end dirname
 
 
+#formap dirname subdirs
+install-igate-$[dirname] :
+	cd $[osfilename $[PATH]] && $(MAKE) /nologo install-igate
+#end dirname
+
 #formap dirname subdirs
 #formap dirname subdirs
 uninstall-$[dirname] :
 uninstall-$[dirname] :
 	cd $[osfilename $[PATH]] && $(MAKE) /nologo uninstall
 	cd $[osfilename $[PATH]] && $(MAKE) /nologo uninstall
 #end dirname
 #end dirname
 
 
+#formap dirname subdirs
+uninstall-igate-$[dirname] :
+	cd $[osfilename $[PATH]] && $(MAKE) /nologo uninstall-igate
+#end dirname
+
 #if $[ne $[CONFIG_HEADER],]
 #if $[ne $[CONFIG_HEADER],]
 $[install_headers_dir] :
 $[install_headers_dir] :
 	mkdir $[install_headers_dir]
 	mkdir $[install_headers_dir]

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

@@ -325,7 +325,7 @@ uninstall-lib$[TARGET] :
 $[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]
+	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]
+	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.
@@ -450,7 +450,7 @@ uninstall-lib$[TARGET] :
 $[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]
+	cd ./$[st_dir] && $[INSTALL]
 
 
 #end static_lib_target
 #end static_lib_target
 
 
@@ -485,7 +485,7 @@ uninstall-$[TARGET] :
 $[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]
+	cd ./$[st_dir] && $[INSTALL_PROG]
 
 
 #end sed_bin_target
 #end sed_bin_target
 
 
@@ -533,7 +533,7 @@ uninstall-$[TARGET] :
 $[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]
+	cd ./$[st_dir] && $[INSTALL_PROG]
 
 
 #end bin_target
 #end bin_target
 
 
@@ -782,47 +782,47 @@ 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
+	cd ./$[PATH] && $(MAKE) all
 #end dirname
 #end dirname
 
 
 #formap dirname subdirs
 #formap dirname subdirs
 test-$[dirname] :
 test-$[dirname] :
-	cd ./$[PATH]; $(MAKE) test
+	cd ./$[PATH] && $(MAKE) test
 #end dirname
 #end dirname
 
 
 #formap dirname subdirs
 #formap dirname subdirs
 clean-$[dirname] :
 clean-$[dirname] :
-	cd ./$[PATH]; $(MAKE) clean
+	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
+	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
+	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
+	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
+	cd ./$[PATH] && $(MAKE) install-igate
 #end dirname
 #end dirname
 
 
 #formap dirname subdirs
 #formap dirname subdirs
 uninstall-$[dirname] :
 uninstall-$[dirname] :
-	cd ./$[PATH]; $(MAKE) uninstall
+	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
+	cd ./$[PATH] && $(MAKE) uninstall-igate
 #end dirname
 #end dirname
 
 
 #if $[ne $[CONFIG_HEADER],]
 #if $[ne $[CONFIG_HEADER],]