summaryrefslogtreecommitdiff
path: root/Makefile.in
diff options
context:
space:
mode:
authorAlexey Neyman <stilor@att.net>2017-02-27 04:42:32 (GMT)
committerAlexey Neyman <stilor@att.net>2017-02-27 04:42:32 (GMT)
commit2dae1cf81619606b133888675d5ebf1b688d9d7c (patch)
treed5592c1e342ff2f98ed18983394e901fc54a336b /Makefile.in
parent59bab98b2de061f395dc81f9a31157b4b1f9de91 (diff)
Require GNU sed
After much struggling with macos (BSD) sed and even getting everything work in crosstool-ng itself, I had to abandon that because some components rely on GNU syntax. Specifically, GNU libc uses '/.../{H;g}' (note absense of the separator after 'g'). So, revert the -r/-E detection and check for sed's being of GNU origin. MacOS people, sorry, but you'd have to install GNU sed. Signed-off-by: Alexey Neyman <stilor@att.net>
Diffstat (limited to 'Makefile.in')
-rw-r--r--Makefile.in35
1 files changed, 6 insertions, 29 deletions
diff --git a/Makefile.in b/Makefile.in
index 4e8db5c..f0034cb 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -204,41 +204,18 @@ $(PROG_NAME): ct-ng.in Makefile
%: %.in Makefile
$(call sed_it)
+__paths_vars = install bash awk grep make sed libtool \
+ libtoolize objcopy objdump readelf patch gperf
+
# We create a script fragment that is parseable from inside a Makefile,
-# and one from inside a shell script
+# and one from inside a shell script.
paths.mk: FORCE
@echo " GEN '$@'"
- @(echo 'export install=$(install)'; \
- echo 'export bash=$(bash)'; \
- echo 'export awk=$(awk)'; \
- echo 'export grep=$(grep)'; \
- echo 'export make=$(make)'; \
- echo 'export sed=$(sed)'; \
- echo 'export libtool=$(libtool)'; \
- echo 'export libtoolize=$(libtoolize)'; \
- echo 'export objcopy=$(objcopy)'; \
- echo 'export objdump=$(objdump)'; \
- echo 'export readelf=$(readelf)'; \
- echo 'export patch=$(patch)'; \
- echo 'export gperf=$(gperf)'; \
- ) >$@
+ @{ $(foreach w,$(__paths_vars),$(if $($w),echo 'export $w=$(subst ','\'',$($w))';)) :; } >$@
paths.sh: FORCE
@echo " GEN '$@'"
- @(echo 'export install="$(install)"'; \
- echo 'export bash="$(bash)"'; \
- echo 'export awk="$(awk)"'; \
- echo 'export grep="$(grep)"'; \
- echo 'export make="$(make)"'; \
- echo 'export sed="$(sed)"'; \
- echo 'export libtool="$(libtool)"'; \
- echo 'export libtoolize="$(libtoolize)"'; \
- echo 'export objcopy="$(objcopy)"'; \
- echo 'export objdump="$(objdump)"'; \
- echo 'export readelf="$(readelf)"'; \
- echo 'export patch="$(patch)"'; \
- echo 'export gperf="$(gperf)"'; \
- ) >$@
+ @{ $(foreach w,$(__paths_vars),$(if $($w),echo 'export $w="$(subst ','\'',$($w))"';)) :; } >$@
config/configure.in: FORCE
@echo " GEN '$@'"