From: Paul Eggert Date: Thu, 4 Jun 2015 19:15:35 +0000 (-0700) Subject: build: port single_binary_prog to POSIX shell X-Git-Tag: v8.24~43 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7eaf8c8eec7d4fe1bb89a61c08996a8f39950db6;p=thirdparty%2Fcoreutils.git 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 ...'. --- diff --git a/Makefile.am b/Makefile.am index 7d7e3812ad..f5543ddb91 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 5a3b1b3154..eaeed08e7b 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