make clean failing
authorjordan@hack_attack <jordanlavatai@gmail.com>
Tue, 27 Sep 2016 02:59:39 +0000 (19:59 -0700)
committerjordan@hack_attack <jordanlavatai@gmail.com>
Tue, 27 Sep 2016 02:59:39 +0000 (19:59 -0700)
src/Makefile

index 70f3a96..36f0e97 100644 (file)
@@ -109,7 +109,7 @@ $(eval SLANG_SRC := $(patsubst ./%,%,$(shell find -name "*.$(slang)")))
 # Foreach target type in the source-to-source language, add this source's
 # targets to the list of the current source-to-source language targets
 $(foreach trg,$($(slang)_TRG),
-$(eval SLANG_TRG += $(SLANG_SRC:%.$(slang)=%.$($(slang)_STEM:%=%.)$(trg))))
+$(eval SLANG_TRG += $(SLANG_SRC:%.$(slang)=%.$(if $($(slang)_STEM),$($(slang)_STEM).)$(trg))))
 # Stat the source file's last-modified time to the var SRC_TIME
 $(foreach src,$(SLANG_SRC),
 $(eval SRC_TIME := $(shell stat -c %Y $(src)))
@@ -137,7 +137,7 @@ $(info $(SHELL_CMD) $(shell $(SHELL_CMD)))
 )
 # Put these targets on the MAKE_TARGETS list to be removed during "clean",
 # regardless of whether or not they were built just now.
-$(eval MAKE_TARGETS += $(SLANG_TRG))
+$(info MAKE_TARGETS+= $(SLANG_TRG))
 ))
 endef
 # Compile a source language to a language that compiles to binary, but only if
@@ -177,7 +177,7 @@ $(eval MDEPS := $(shell echo $(MDEPS) | sed -e 's@[a-zA-Z0-9\-\+/]*\.\./include@
 $(eval ALLDEPS := $(MDEPS) $(DEPS)),\
 $(error Cannot generate deps for: $1, file not found))\
 $(eval SRC_OBJ    := $(basename $1).$($2_OBJ))\
-$(eval MAKE_TARGETS += $(SRC_OBJ))\
+$(info MAKE_TARGETS+= $(SRC_OBJ))\
 
 # Object for $1
 $(SRC_OBJ): $(ALLDEPS)
@@ -285,13 +285,13 @@ endef
 # modules as static libs).
 define MODULE_ARCRULE =
 $(eval ARCDEPS := $(filter $1/%.$(c_OBJ),$(foreach lang,$(LANGS),$($(lang)_MOD_TRG))))\
-$(eval MAKE_TARGETS += $1.$(c_AROBJ))\
+$(info MAKE_TARGETS+= $1.$(c_AROBJ))\
 $1.$(c_AROBJ): $(ARCDEPS)
        $(c_AR) cr $$@ $$^
 $(if $(c_DBG),
 $(eval undefine DBGARCDEPS)
 $(foreach arcdep,$(ARCDEPS),$(eval DBGARCDEPS += $(dir $(arcdep)).$(c_DBG)/$(notdir $(arcdep))))
-$(eval MAKE_TARGETS += .$(c_DBG)/$1.$(c_AROBJ))\
+$(info MAKE_TARGETS+= .$(c_DBG)/$1.$(c_AROBJ))\
 
 .$(c_DBG)/$1.$(c_AROBJ): $(DBGARCDEPS) | .$(c_DBG)/
        $(c_AR) cr $$@ $$^