fixing generated deps interference with clean
authorChris Koeritz <fred@gruntose.com>
Mon, 3 Oct 2016 18:24:54 +0000 (14:24 -0400)
committerChris Koeritz <fred@gruntose.com>
Mon, 3 Oct 2016 18:24:54 +0000 (14:24 -0400)
working towards resolving cleaning issues with generated deps file, where a submake will go into a loop during clean trying to make this file.  ugh.

nucleus/applications/bundler/makefile
nucleus/applications/bundler/makefile.stub
scripts/clam/cpp/rules.def
scripts/clam/rules.def

index 7904ea71ff892c4985c115c0ac21f7b05fa7b5ea..9985446c3de2c83b26ef6a5a877dcb57205bdc0c 100644 (file)
@@ -18,9 +18,12 @@ ifeq "$(COMPILER)" "VISUAL_CPP"
 else
   LIBS_USED += z
 endif
+OTHER_CLEANS += clean_stub
 
 include cpp/rules.def
 
 make_stub:
        $(MAKE) -f makefile.stub
 
+clean_stub:
+       $(MAKE) -f makefile.stub NO_DEPS=t clean
index a949d0121ace79c165071bd0f99e469a9c7748f3..74af1a0c29118a8da2a5c311e93048347720f403 100644 (file)
@@ -10,7 +10,6 @@ ifeq "$(OMIT_VERSIONS)" ""
 endif
 DEFINITIONS += __BUILD_STATIC_APPLICATION__=t
 TARGETS = unpacker_stub.exe
-#ifeq "$(OP_SYSTEM)" "WIN32"
 ifeq "$(COMPILER)" "VISUAL_CPP"
   LIBS_USED += libcmt.lib shlwapi.lib zlib.lib
   LOAD_FLAG_PREFIX += -nodefaultlib:msvcrt.lib 
index 1cfc607742057c9e1c7ac4060ffc4ac261bef3a6..722cb7a03a7ec03acdf1b6d57e2c9695a6f84ec1 100644 (file)
@@ -350,9 +350,11 @@ ifeq "$(OMIT_VERSIONS)" ""
   endif
 endif
 
-ifneq "$(GENDEPS)" ""
-  EXTRA_FIRST_TARGETS += gendeps
-endif
+# if we are cleaning up, then do not generate dependency file.
+ifeq "$(CLEAN)" ""
+  ifneq "$(GENDEPS)" ""
+    EXTRA_FIRST_TARGETS += gendeps
+  endif
 
 # only do the deps generation for makefiles that are properly marked.
 ifneq "$(findstring __BUILD_STATIC_APPLICATION__, $(DEFINITIONS))" ""
@@ -360,6 +362,8 @@ ifneq "$(findstring __BUILD_STATIC_APPLICATION__, $(DEFINITIONS))" ""
   GENERATED_DEPS_LIST = $(TARGETS:%.exe=%.gendeps)
 endif
 
+endif
+
 # Make sure that the directory for objects exists.
 ACTUAL_FIRST_TARGETS = check_requirements $(EXTRA_FIRST_TARGETS) $(VERSION_TARGET) $(FIRST_TARGETS) pre_compilation
 
@@ -673,8 +677,10 @@ endif
 
 # includes the auto-dependency information.  the dependency file is checked
 # for being up-to-date.  if not, it gets rebuilt and the make is restarted.
-ifeq "$(NO_DEPS)" ""
-  include $(DEPS_FILE)
+ifeq "$(CLEAN)" ""
+  ifeq "$(NO_DEPS)" ""
+    include $(DEPS_FILE)
+  endif
 endif
 
 # preserves intermediate files from being deleted.
index b73a06c2b1d24abef442ea171afd2c17c4580e06..e9f91b155d5aa7ee70d4107ed9a323a480b8a0d4 100644 (file)
@@ -117,7 +117,7 @@ ready_to_clean: $(OTHER_CLEANS) clean_subdirs
        @echo Whacking [$(CLEANUPS)]
        $(HIDESH) -c '\
 echo the other cleans were: $(OTHER_CLEANS); \
-echo the clean list is: $(CLEANUPS); \
+echo the cleanup removal list is: $(CLEANUPS); \
 if [ ! -z "$(CLEANUPS)" ]; then \
   for i in $(CLEANUPS) nonexistentishfileforlist; do \
     rm -rf "$$i"; \