Use $(MAKE) instead of make to invoke recursively

This commit is contained in:
George Oikonomou 2018-05-27 19:21:08 +01:00
parent d44c32a9b6
commit 6177cac919
4 changed files with 7 additions and 7 deletions

View File

@ -315,8 +315,8 @@ clean:
distclean: distclean:
@for TARG in `ls $(CONTIKI)/arch/platform $(TARGETDIRS)`; do \ @for TARG in `ls $(CONTIKI)/arch/platform $(TARGETDIRS)`; do \
echo Running: make TARGET=$$TARG clean; \ echo Running: $(MAKE) TARGET=$$TARG clean; \
make TARGET=$$TARG clean; \ $(MAKE) TARGET=$$TARG clean; \
done done
-include $(CONTIKI)/arch/platform/$(TARGET)/Makefile.customrules-$(TARGET) -include $(CONTIKI)/arch/platform/$(TARGET)/Makefile.customrules-$(TARGET)

View File

@ -11,7 +11,7 @@ TUNSLIP6 = $(SERIAL_IO_TOOL_DIR)/tunslip6
SERIAL_DUMP_BIN = $(SERIAL_IO_TOOL_DIR)/serialdump SERIAL_DUMP_BIN = $(SERIAL_IO_TOOL_DIR)/serialdump
$(SERIAL_DUMP_BIN): $(SERIAL_IO_TOOL_DIR)/serialdump.c $(SERIAL_IO_TOOL_DEPS) $(SERIAL_DUMP_BIN): $(SERIAL_IO_TOOL_DIR)/serialdump.c $(SERIAL_IO_TOOL_DEPS)
make -C $(SERIAL_IO_TOOL_DIR) serialdump $(MAKE) -C $(SERIAL_IO_TOOL_DIR) serialdump
$(TUNSLIP6): $(SERIAL_IO_TOOL_DIR)/tunslip6.c $(SERIAL_IO_TOOL_DEPS) $(TUNSLIP6): $(SERIAL_IO_TOOL_DIR)/tunslip6.c $(SERIAL_IO_TOOL_DEPS)
make -C $(SERIAL_IO_TOOL_DIR) tunslip6 $(MAKE) -C $(SERIAL_IO_TOOL_DIR) tunslip6

View File

@ -36,7 +36,7 @@ summary: $(SUMMARIES)
@cat $(SUMMARIES) > $@ @cat $(SUMMARIES) > $@
%/summary: %/summary:
@make -C $* summary || true @$(MAKE) -C $* summary || true
clean: clean:
rm -f $(SUMMARIES) summary rm -f $(SUMMARIES) summary

View File

@ -40,7 +40,7 @@ get_target_vars = $(wordlist 2,15,$(subst :, ,$1))
define dooneexample define dooneexample
@echo -n Building example $(3): $(1) $(4) for target $(2) @echo -n Building example $(3): $(1) $(4) for target $(2)
@((cd $(EXAMPLESDIR)/$(1); \ @((cd $(EXAMPLESDIR)/$(1); \
make $(4) TARGET=$(2) clean && make -j $(4) TARGET=$(2) WERROR=1) > \ $(MAKE) $(4) TARGET=$(2) clean && make -j $(4) TARGET=$(2) WERROR=1) > \
/dev/null 2>make.err && \ /dev/null 2>make.err && \
(echo " -> OK" && printf "%-75s %-40s %-20s TEST OK\n" "$(1)" "$(4)" "$(2)" > $(3)-$(subst /,-,$(1))$(2).testlog) || \ (echo " -> OK" && printf "%-75s %-40s %-20s TEST OK\n" "$(1)" "$(4)" "$(2)" > $(3)-$(subst /,-,$(1))$(2).testlog) || \
(echo " -> FAIL" && printf "%-75s %-40s %-20s TEST FAIL\n" "$(1)" "$(4)" "$(2)" > $(3)-$(subst /,-,$(1))$(2).testlog ; cat make.err)) (echo " -> FAIL" && printf "%-75s %-40s %-20s TEST FAIL\n" "$(1)" "$(4)" "$(2)" > $(3)-$(subst /,-,$(1))$(2).testlog ; cat make.err))
@ -65,4 +65,4 @@ clean:
@rm -f *.testlog summary @rm -f *.testlog summary
@$(foreach example, $(EXAMPLES), \ @$(foreach example, $(EXAMPLES), \
$(foreach target, $(EXAMPLESTARGETS), \ $(foreach target, $(EXAMPLESTARGETS), \
(cd $(EXAMPLESDIR)/$(example); make TARGET=$(target) clean);)) (cd $(EXAMPLESDIR)/$(example); $(MAKE) TARGET=$(target) clean);))