shithub: scc

Download patch

ref: 496a51ccfcc302614f6647cc75478f5a126ff5fc
parent: 5654f33b4e15918d8a39dc6f45af5f035692971f
author: Roberto E. Vargas Caballero <[email protected]>
date: Tue Jan 15 08:46:37 EST 2019

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.

--- a/Makefile
+++ b/Makefile
@@ -20,12 +20,13 @@
 $(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)