summaryrefslogtreecommitdiff
path: root/src/local.mk
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2015-06-04 12:15:35 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2015-06-04 12:16:04 -0700
commit7eaf8c8eec7d4fe1bb89a61c08996a8f39950db6 (patch)
treebbc54ac092670acd3501e6d0e99aed144d500060 /src/local.mk
parentda355c98600aadbfcf82621650d5a6bbc95c7ed2 (diff)
downloadcoreutils-7eaf8c8eec7d4fe1bb89a61c08996a8f39950db6.tar.xz
build: port single_binary_prog to POSIX shell
Problem reported privately by Michael Felt. * Makefile.am (install-exec-hook): * src/local.mk (src/coreutils_symlinks, src/coreutils_shebangs) (clean-local): Port to POSIX shell, which doesn't allow 'for i in ; do ...'.
Diffstat (limited to 'src/local.mk')
-rw-r--r--src/local.mk9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/local.mk b/src/local.mk
index 5a3b1b315..eaeed08e7 100644
--- a/src/local.mk
+++ b/src/local.mk
@@ -427,7 +427,8 @@ endif SINGLE_BINARY
CLEANFILES += src/coreutils_symlinks
src/coreutils_symlinks: Makefile
$(AM_V_GEN)touch $@
- $(AM_V_at)for i in $(single_binary_progs); do \
+ $(AM_V_at)for i in x $(single_binary_progs); do \
+ test $$i = x && continue; \
rm -f src/$$i$(EXEEXT) || exit $$?; \
$(LN_S) -s coreutils$(EXEEXT) src/$$i$(EXEEXT) || exit $$?; \
done
@@ -435,7 +436,8 @@ src/coreutils_symlinks: Makefile
CLEANFILES += src/coreutils_shebangs
src/coreutils_shebangs: Makefile
$(AM_V_GEN)touch $@
- $(AM_V_at)for i in $(single_binary_progs); do \
+ $(AM_V_at)for i in x $(single_binary_progs); do \
+ test $$i = x && continue; \
rm -f src/$$i$(EXEEXT) || exit $$?; \
printf '#!%s --coreutils-prog-shebang=%s\n' \
$(abs_top_builddir)/src/coreutils$(EXEEXT) $$i \
@@ -444,7 +446,8 @@ src/coreutils_shebangs: Makefile
done
clean-local:
- $(AM_V_at)for i in $(single_binary_progs); do \
+ $(AM_V_at)for i in x $(single_binary_progs); do \
+ test $$i = x && continue; \
rm -f src/$$i$(EXEEXT) || exit $$?; \
done