fixing generated deps interference with clean
[feisty_meow.git] / scripts / clam / cpp / rules.def
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.