This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
missing quotes in gcc/Makefile.in (stmp-fixinc)
- To: gcc-bugs at gcc dot gnu dot org
- Subject: missing quotes in gcc/Makefile.in (stmp-fixinc)
- From: Toomas Rosin <toomas at ns dot tklabor dot ee>
- Date: Sun, 29 Apr 2001 13:15:42 +0200
- Cc: toomas at ns dot tklabor dot ee
Hello!
When I tell `make' to give command line options to shell, i.e. when I
run, e.g. make SHELL="/bin/sh -x", I will get a non-interrupting error
message when making the `stmp-fixinc' target:
/bin/sh: -x: command not found
. (Fortunately, the right thing happens anyway, only the "-x" is
ignored.) This can be avoided thusly:
--- gcc-2.95.3/gcc/Makefile.in.orig
+++ gcc-2.95.3/gcc/Makefile.in
@@ -2161,7 +2161,7 @@
stmp-fixinc: fixinc.sh gsyslimits.h
rm -rf include; mkdir include
TARGET_MACHINE=$(target); srcdir=`cd $(srcdir); pwd`; \
- INSTALL_ASSERT_H=$(INSTALL_ASSERT_H); SHELL=$(SHELL) ;\
+ INSTALL_ASSERT_H=$(INSTALL_ASSERT_H); SHELL='$(SHELL)' ;\
export TARGET_MACHINE srcdir INSTALL_ASSERT_H SHELL ; \
$(SHELL) ./fixinc.sh `pwd`/include $(SYSTEM_HEADER_DIR) $(OTHER_FIXINCLUDES_DIRS)
rm -f include/syslimits.h
By the way, I have always wondered about a "philosophical" question:
why are "&&" and "set -e" so seldom used in makerules? Not in
Makefiles for GCC only, but just about everywhere? Are they not
portable? I would have guessed using one or the other of them in all
multi-command rules would be a good practice.
Peace,
Toomas.