diff options
author | Ralf Wildenhues <Ralf.Wildenhues@gmx.de> | 2010-11-14 17:53:49 +0100 |
---|---|---|
committer | Ralf Wildenhues <Ralf.Wildenhues@gmx.de> | 2010-11-14 17:54:18 +0100 |
commit | a6da48d34bef50210789a32d032b24f9b16d8fb7 (patch) | |
tree | 3aa262f266e8f7cd722dd6b37ae29bf7d0ec5373 /lib/am/install.am | |
parent | e46935648e7c3b4d043b8a4cda231918ca636a89 (diff) | |
download | automake-a6da48d34bef50210789a32d032b24f9b16d8fb7.tar.gz |
Fix install-strip when $(STRIP) contains several words.
* lib/am/install.am (install-strip): Update comment. Use
separate sub-make invocations for empty and nonempty $(STRIP),
to fix quoting issues.
* tests/strip2.test, tests/strip3.test: New tests.
* tests/Makefile.am (TESTS): Adjust.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Diffstat (limited to 'lib/am/install.am')
-rw-r--r-- | lib/am/install.am | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/lib/am/install.am b/lib/am/install.am index d261070ea..01ae49a21 100644 --- a/lib/am/install.am +++ b/lib/am/install.am @@ -1,5 +1,5 @@ ## automake - create Makefile.in from Makefile.am -## Copyright (C) 2001, 2002, 2003, 2004, 2006, 2008, 2009 Free Software +## Copyright (C) 2001, 2002, 2003, 2004, 2006, 2008, 2009, 2010 Free Software ## Foundation, Inc. ## This program is free software; you can redistribute it and/or modify @@ -90,9 +90,17 @@ install-strip: ## It's OK to override both with INSTALL_STRIP_PROGRAM, because ## INSTALL_STRIP_PROGRAM uses install-sh (see m4/strip.m4 for a rationale). ## -## Use double quotes here because we might need to interpolate some -## backquotes at runtime. - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +## Use double quotes for the *_PROGRAM settings because we might need to +## interpolate some backquotes at runtime. +## +## The case for empty $(STRIP) is separate so that it is quoted correctly for +## multiple words, but does not expand to an empty words if STRIP is empty. + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi |