X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=scripts%2Fclam%2Frules.def;h=4d0be0e8712b3933df947eb2cdd78fb555251c77;hb=d84cca001d859500e4273888332fea8ed9943f51;hp=a526fb1f392a53c82c768a1ab43dab852f6d93a6;hpb=d87617f212d9dff8d5033b81e19a0740846999fe;p=feisty_meow.git diff --git a/scripts/clam/rules.def b/scripts/clam/rules.def index a526fb1f..4d0be0e8 100644 --- a/scripts/clam/rules.def +++ b/scripts/clam/rules.def @@ -88,70 +88,44 @@ endif # runs the programs specified in the RUN_TARGETS variable. run_targets: $(HIDESH)"$(CLAM_DIR)/target_runner.sh" -#### "$(RUN_TARGETS)" # "make_subdirs" travels down each subdirectory and builds using make. make_subdirs: - $(HIDESH) -c '\ -for i in *; do \ - if [ -d $$i ]; then \ - if [ -f $$i/$(MAKEFILE_NAME) -a ! $$i -ef `pwd` ]; then \ - echo; \ - (cd $$i; $(MAKE) --silent NOT_FIRST_MAKE=t -f $(MAKEFILE_NAME) ); \ - else \ - echo Skipping makefile-less directory $$i...; \ - echo; \ - fi \ - fi \ -done; \ -exit 0' + $(HIDESH)$(CLAM_DIR)/make_subdirs.sh # "clean" is a default target that removes object files, libs, executable # 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 clean_subdirs $(OTHER_CLEANS) ready_to_clean - # no code here. +clean: set_cleaner_variable $(OTHER_CLEANS) scratch_other_cleans clean_subdirs ready_to_clean + @# no code here. set_cleaner_variable: $(eval CLEAN := true) +scratch_other_cleans: + $(eval OTHER_CLEANS := ) + ready_to_clean: @echo Whacking [$(CLEANUPS)] $(HIDESH) -c '\ -echo the other cleans were: $(OTHER_CLEANS); \ -echo the cleanup removal list is: $(CLEANUPS); \ if [ ! -z "$(CLEANUPS)" ]; then \ - for i in $(CLEANUPS) nonexistentishfileforlist; do \ - rm -rf "$$i"; \ + for spork19 in $(CLEANUPS) nonexistentishfileforlist; do \ + rm -rf "$$spork19"; \ done \ fi' # "clean_subdirs" travels down each subdirectory and cleans using make. clean_subdirs: - $(HIDESH) -c '\ -for smoot87 in *; do \ - if [ -d "$$smoot87" ]; then \ -echo "got inside first check of it being dir: $$smoot87"; \ - if [ -f "$$smoot87/$(MAKEFILE_NAME)" -a ! "$$smoot87" -ef `pwd` ]; then \ -echo "got inside barriers, with filename=$$smoot87 and all conditions met."; \ -echo "the interesting one was: [$(test ! "$$smoot87" -ef `pwd` )]"; \ - (cd "$$i"; $(MAKE) --silent NOT_FIRST_MAKE=t -f $(MAKEFILE_NAME) clean); \ - else \ - echo "Skipping makefile-less directory $$i..."; \ - fi \ - fi \ -done; \ -exit 0' -###echo Cleaning "$$i" now...; + $(HIDESH)$(CLAM_DIR)/clean_subdirs.sh # "rm_links" removes the files in the current directory that are links # to other files. this is only useful in a unix environment. rm_links: $(HIDESH) -c '\ -for i in *; do \ - if [ -h "$$i" ]; then \ - /bin/rm -f "$$i"; \ +for gujira26 in *; do \ + if [ -h "$$gujira26" ]; then \ + /bin/rm -f "$$gujira26"; \ fi \ done; \ exit 0'