ref: 0c9e79fb08bc1c6a717f3196635d00639c221744
parent: e0b1a359c5ec97ff904222864d13a7f73f571ca1
author: Josuah Demangeon <mail@josuah.net>
date: Thu May 10 08:25:24 EDT 2018
convert ./configure from makefile syntax to plain shell syntax In Makefiles, $ needs to be escaped into $$, and it is not possible to have multiple commands without using ;\ Theses are removed, but the $$.mk is still kept, as in shell $$ is the current PID and $$.mk expanding to something like 38742.mk is a normal behavior.
--- a/configure
+++ b/configure
@@ -4,12 +4,12 @@
then
printf '%s\n' 'Generating config.mk from defaults...' \
'(edit it for customization and then re-run this script)'
- trap "rm -f $$.mk" 0 2 3; \
- (cat config.mk.def ;\
- sed -n '/^# '`uname`'/,/^$$/p' system.mk) > $$.mk && \
+ trap "rm -f $$.mk" 0 2 3
+ (cat config.mk.def
+ sed -n '/^# '`uname`'/,/^$/p' system.mk) > $$.mk &&
mv $$.mk config.mk
fi
printf 'Generating arch-dependant build files...\n'
-make dep > /dev/null && \
+make dep > /dev/null &&
printf 'You can now install scc with “make install”\n'