[fixinc/Makefile.in patch] for SHELL requirement
korbb@egcs.cygnus.com
korbb@egcs.cygnus.com
Wed Apr 7 12:08:00 GMT 1999
Reply-To: ddsinc09@ix.netcom.com
Hi Alexandre,
Your fix was Close, but I think it better to simply remove the AutoGen
invocation in fixinc/Makefile.in. To update the generated files, you
would have to go to /gcc/fixinc and invoke ./genfixes.
Regards,
Bruce
> On Apr 5, 1999, Tim C Prince <Prince_Tim_C@solarturbines.com> wrote:
>
> > The new fixincludes apparently depend on the SHELL
> > environment being set to a suitable value.
>
> Here's a patch that should fix this. We can't expect SHELL to be set
> to a Bourne Shell-compatible shell :-(
>
> Jeff, is this ok to install?
>
> --
> Alexandre Oliva http://www.dcc.unicamp.br/~oliva IC-Unicamp, Brasil
> {oliva,Alexandre.Oliva}@dcc.unicamp.br aoliva@{acm.org,computer.org}
> oliva@{gnu.org,kaffe.org,{egcs,sourceware}.cygnus.com,samba.org}
> *** E-mail about software projects will be forwarded to mailing lists
>
> ? gcc/testsuite/g++.old-deja/g++.oliva
> Index: gcc/ChangeLog
> from Alexandre Oliva <oliva@dcc.unicamp.br>
>
> * Makefile.in (stmp-fixinc): Pass to fixinc.sh as
> CONFIG_SHELL.
> * Makefile.in (fixinc.sh): Ditto, to mkfixinc.sh.
> * fixinc/mkfixinc.sh: Refer to CONFIG_SHELL, so as not to be
> trapped if the user's SHELL is /bin/csh; default to /bin/sh.
> * fixinc/procopen.c (chain_open): Likewise; default remains sh.
* fixinc/Makefile.in: Omit invocations of autogen.
That should be done with the shell script genfixes.
Index: Makefile.in
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/fixinc/Makefile.in,v
retrieving revision 1.5
diff -u -r1.5 Makefile.in
--- Makefile.in 1999/03/15 01:34:02 1.5
+++ Makefile.in 1999/04/07 18:36:06
@@ -34,7 +34,10 @@
# End of variables for you to override.
-default : gen
+BIN_TARGET = fixincl
+TARGETS = $(BIN_TARGET)
+
+default : $(TARGETS)
# Now figure out from those variables how to compile and link.
@@ -62,15 +65,7 @@
HDR = server.h regex.h
LIBERTY = ../../libiberty/libiberty.a
-SH_TARGET = inclhack.sh fixincl.sh
-BIN_TARGET = fixincl
-AG_TEXT = $(SH_TARGET) fixincl.x \
- inclhack.def inclhack.tpl hackshell.tpl fixincl.tpl
-TARGETS = $(SH_TARGET) $(BIN_TARGET)
-
all : $(TARGETS)
-sh : $(SH_TARGET)
-gen : $(SH_TARGET) fixincl.x
$(OBJ): $(HDR)
@@ -87,35 +83,6 @@
server.o : server.c server.h
procopen.o : procopen.c server.h
-fixincl.x: fixincl.tpl inclhack.def
- @if ( autogen --help > /dev/null 2>&1 ) ; then \
- echo autogen -T fixincl.tpl -b fixincl inclhack.def ; \
- autogen -T $(srcdir)/fixincl.tpl -b fixincl \
- $(srcdir)/inclhack.def ; \
- else echo You need to install autogen ; \
- if [ `pwd` != `cd $(srcdir) ; pwd` ] ; then \
- $(CP) $(srcdir)/$@ . ; \
- else touch $@ ; fi ; fi
-
-inclhack.sh: inclhack.def inclhack.tpl hackshell.tpl
- @if ( autogen --help > /dev/null 2>&1 ) ; then \
- echo autogen inclhack.def ; \
- autogen -L$(srcdir) $(srcdir)/inclhack.def ; \
- else echo You need to install autogen ; \
- if [ `pwd` != `cd $(srcdir) ; pwd` ] ; then \
- $(CP) $(srcdir)/$@ . ; \
- else touch $@ ; fi ; fi
-
-fixincl.sh: inclhack.def inclhack.tpl
- @if ( autogen --help > /dev/null 2>&1 ) ; then \
- echo autogen -DPROGRAM=1 -b fixincl inclhack.def ; \
- autogen -DPROGRAM=1 -b fixincl -L$(srcdir) \
- $(srcdir)/inclhack.def ; touch $@ ; \
- else echo You need to install autogen ; \
- if [ `pwd` != `cd $(srcdir) ; pwd` ] ; then \
- $(CP) $(srcdir)/$@ . ; \
- else touch $@ ; fi ; fi
-
clean:
rm -f *.o $(TARGETS) fixincl.x
@@ -127,10 +94,8 @@
install: $(TARGETS)
@rm -f ../fixinc.sh ; \
if ( ./fixincl -v > /dev/null 2>&1 ) ; then \
- echo cp fixincl.sh ../fixinc.sh ; \
- if [ -f ./fixincl.sh ] ; \
- then cp fixincl.sh ../fixinc.sh ; \
- else cp $(srcdir)/fixincl.sh ../fixinc.sh ; fi ; \
+ echo cp $(srcdir)/fixincl.sh ../fixinc.sh ; \
+ cp $(srcdir)/fixincl.sh ../fixinc.sh ; \
chmod 555 ../fixinc.sh ; \
rm -f ../fixincl ; \
echo cp fixincl .. ; \
@@ -139,8 +104,6 @@
else \
echo Could not install binary fixincludes. ; \
echo Installing shell script instead. ; \
- echo cp inclhack.sh ../fixinc.sh ; \
- if [ -f ./inclhack.sh ] ; \
- then cp inclhack.sh ../fixinc.sh ; \
- else cp $(srcdir)/inclhack.sh ../fixinc.sh ; fi ; \
+ echo cp $(srcdir)/inclhack.sh ../fixinc.sh ; \
+ cp $(srcdir)/inclhack.sh ../fixinc.sh ; \
fi
More information about the Gcc-patches
mailing list