diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2015-06-04 12:15:35 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2015-06-04 12:16:04 -0700 |
commit | 7eaf8c8eec7d4fe1bb89a61c08996a8f39950db6 (patch) | |
tree | bbc54ac092670acd3501e6d0e99aed144d500060 | |
parent | da355c98600aadbfcf82621650d5a6bbc95c7ed2 (diff) | |
download | coreutils-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 ...'.
-rw-r--r-- | Makefile.am | 3 | ||||
-rw-r--r-- | src/local.mk | 9 |
2 files changed, 8 insertions, 4 deletions
diff --git a/Makefile.am b/Makefile.am index 7d7e3812a..f5543ddb9 100644 --- a/Makefile.am +++ b/Makefile.am @@ -195,7 +195,8 @@ check-git-hook-script-sync: # the selected tools when installing. install-exec-hook: $(AM_V_at)ctrans=$$(printf coreutils | sed -e "$(transform)"); \ - for p in $(single_binary_progs); do \ + for p in x $(single_binary_progs); do \ + test $$p = x && continue; \ ptrans=$$(printf '%s' "$$p" | sed -e "$(transform)"); \ rm -f $(DESTDIR)$(bindir)/$$ptrans$(EXEEXT) || exit $$?; \ if test "x$(single_binary_install_type)" = xshebangs; then \ 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 |