commit c229f8349041e683cfad27848a21d4c6cf99a6b9 parent f531bd5d19573e47baaebddeb85c50a4c3765f83 Author: Roberto E. Vargas Caballero <k0ga@shike2.com> Date: Tue, 15 Jan 2019 13:46:37 +0000 Fix $(ENV) generation Using a subshell was hidding the return code from the echo commands. With this new structure failures from them are cached by trap. Diffstat:
M | Makefile | | | 13 | +++++++------ |
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/Makefile b/Makefile @@ -20,12 +20,13 @@ $(DIRS): $(ENV) FORCE $(ENV): @rm -f $@; \ trap 'r=$?;rm -f $$$$.tmp;exit $r' EXIT HUP INT QUIT TERM; \ - (echo PATH=$$PWD/scripts:$$PATH:.; \ - echo NM=\"$(NM)\"; \ - echo AR=\"$(AR)\"; \ - echo RL=\"$(RL)\"; \ - echo RLFLAGS=\"$(RLFLAGS)\"; \ - echo export PATH RLFLAGS NM AR RL) > $$$$.tmp && mv $$$$.tmp $@ + echo PATH=$$PATH:$$PWD/$(SCRIPTDIR):. > $$$$.tmp && \ + echo NM=\"$(NM)\" >> $$$$.tmp && \ + echo AR=\"$(AR)\" >> $$$$.tmp && \ + echo RL=\"$(RL)\" >> $$$$.tmp && \ + echo RLFLAGS=\"$(RLFLAGS)\" >> $$$$.tmp && \ + echo export PATH RLFLAGS NM AR RL >> $$$$.tmp && \ + mv $$$$.tmp $@ dep: $(FORALL)