From b69976aa36264bceedbabba6f5071b124a5f0477 Mon Sep 17 00:00:00 2001 From: Chris Koeritz Date: Mon, 3 Oct 2016 18:36:05 -0400 Subject: [PATCH] fix major hoseage in building a bit premature check-in last time, since nothing was building with that version. --- scripts/clam/cpp/rules.def | 5 +++-- scripts/clam/cpp/variables.def | 2 +- scripts/clam/rules.def | 17 ++++++++++------- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/scripts/clam/cpp/rules.def b/scripts/clam/cpp/rules.def index ba51dabb..e0b72315 100644 --- a/scripts/clam/cpp/rules.def +++ b/scripts/clam/cpp/rules.def @@ -398,11 +398,12 @@ ACTUAL_LAST_TARGETS = post_compilation $(LAST_TARGETS) ############################################################################ +ifneq "$(CLEAN)" "" # Add the obligatory junk to be cleaned up. set_cleanups_variable: - echo hey we are in the set cleanups variable and pwd is: $(shell pwd) $(eval CLEANUPS += $(ACTUAL_TARGETS) $(ACTUAL_TARGETS:%.exe=%) ) - echo "yoyo, cleanups variable is now: $(CLEANUPS)" +# echo "new CLEANUPS variable: $(CLEANUPS)" +endif ############################################################################ diff --git a/scripts/clam/cpp/variables.def b/scripts/clam/cpp/variables.def index 6bbd346a..8643b27b 100644 --- a/scripts/clam/cpp/variables.def +++ b/scripts/clam/cpp/variables.def @@ -119,7 +119,7 @@ endif # Add an early target to set the cleanups variable based on the variables # that have been filled in by the user makefile. -FIRST_TARGETS += set_cleanups_variable +###no FIRST_TARGETS += set_cleanups_variable # GLOBAL_PRODUCT_NAME is an important variable for tagging the entire code base # with some branding. It is provided as a macro definition to all source diff --git a/scripts/clam/rules.def b/scripts/clam/rules.def index 032dd6d3..367f8f19 100644 --- a/scripts/clam/rules.def +++ b/scripts/clam/rules.def @@ -45,7 +45,7 @@ if [ -d $* ]; then \ if [ -f "$*/$(MAKEFILE_NAME)" ]; then \ $(MAKE) --silent -f "$(MAKEFILE_NAME)" NOT_FIRST_MAKE=t -C "$*"; \ else \ - echo "Asked to build directory [$*] but there was no makefile."; \ + echo "($@ skipping directory $*)"; \ fi \ else \ echo Skipping missing directory [$*]; \ @@ -98,27 +98,30 @@ make_subdirs: # files and such that were created by the project. it invokes the makefile # again with the CLEAN variable defined so that this can be passed down into # all subsequent makes. -clean: set_cleaner_variable $(OTHER_CLEANS) scratch_other_cleans clean_subdirs ready_to_clean +clean: establish_cleanup_variable $(OTHER_CLEANS) scratch_other_cleans clean_subdirs ready_to_clean @# no code here. -set_cleaner_variable: +establish_cleanup_variable: $(eval CLEAN := true) scratch_other_cleans: $(eval OTHER_CLEANS := ) +# guard the main cleaning task with our variable +# so we do not pull in subtargets when we do not want to. +ifneq "$(CLEAN)" "" ready_to_clean: $(OTHER_CLEANING_TASKS) - echo hey the other clean should have happened above. @echo Whacking [$(CLEANUPS)] -# @echo could also be cleaning the first and last targets... -# @echo FIRST_TARGETS=$(FIRST_TARGETS) -# @echo LAST_TARGETS=$(LAST_TARGETS) $(HIDESH) -c '\ if [ ! -z "$(CLEANUPS)" ]; then \ for spork19 in $(CLEANUPS) nonexistentishfileforlist; do \ rm -rf "$$spork19"; \ done \ fi' +else +ready_to_clean: + @# do nothing. +endif # "clean_subdirs" travels down each subdirectory and cleans using make. clean_subdirs: -- 2.34.1