From 616b0c2347ecffc9342462f5f7f4af1a3aa3a8df Mon Sep 17 00:00:00 2001 From: hendricks266 Date: Sat, 13 Jul 2019 00:12:46 +0000 Subject: [PATCH] Fix sequential GNUmakefile build git-svn-id: https://svn.eduke32.com/eduke32@7786 1a8010ca-5511-0410-912e-c29ae57300e0 --- Common.mak | 12 +++++++++++- GNUmakefile | 16 ++++++++-------- source/build/src/empty.cpp | 0 3 files changed, 19 insertions(+), 9 deletions(-) create mode 100644 source/build/src/empty.cpp diff --git a/Common.mak b/Common.mak index c7900dc3e..a1025e08c 100644 --- a/Common.mak +++ b/Common.mak @@ -11,6 +11,8 @@ SYNTHESIS := 0 override empty := override space := $(empty) $(empty) override comma := , +override paren_open := ( +override paren_close := ) ##### Detect platform @@ -107,6 +109,7 @@ endif DONT_PRINT := > $(NULLSTREAM) 2>&1 DONT_PRINT_STDERR := 2> $(NULLSTREAM) DONT_FAIL := ; exit 0 +ESCAPE=\\ HAVE_SH := 1 # when no sh.exe is found in PATH on Windows, no path is prepended to it @@ -129,9 +132,13 @@ endef define CAT cat $1 endef +define RAW_ECHO + echo '$1' +endef ifeq (0,$(HAVE_SH)) DONT_FAIL := & rem + ESCAPE=^ define LL dir $(subst /,\,$1) @@ -146,7 +153,10 @@ ifeq (0,$(HAVE_SH)) rmdir /s /q $(subst /,\,$(filter-out / *,$1)) $(DONT_PRINT_STDERR) $(DONT_FAIL) endef define CAT - type $1 + type $(subst /,\,$1) + endef + define RAW_ECHO + echo $(subst ",$(ESCAPE)",$(subst $(paren_open),$(ESCAPE)$(paren_open),$(subst $(paren_close),$(ESCAPE)$(paren_close),$1))) endef # if, printf, exit, and ; are unavailable without sh diff --git a/GNUmakefile b/GNUmakefile index f77cfabd8..746bf8bad 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -1008,16 +1008,16 @@ $$($1_obj)/%.$$o: $$($1_src)/%.mm | $$($1_obj) $$(COMPILE_STATUS) $$(RECIPE_IF) $$(COMPILER_OBJCXX) $$($1_cflags) -c $$< -o $$@ $$(RECIPE_RESULT_COMPILE) -$$($1_obj)/%.$$o: $$($1_obj)/%.c +$$($1_obj)/%.$$o: $$($1_obj)/%.c | $$($1_obj) $$(COMPILE_STATUS) $$(RECIPE_IF) $$(COMPILER_C) $$($1_cflags) -c $$< -o $$@ $$(RECIPE_RESULT_COMPILE) -$$($1_obj)/%.$$o: $$($1_src)/%.glsl | $$($1_src)/generated - echo "Creating header from "$$< - echo "char const *$$(basename $$( $$(> $$(> $$( $$(> $$(> $$(