# Makefile for GNU C compiler.
-# Copyright (C) 1987, 1988, 1990, 1991, 1992 Free Software Foundation, Inc.
+# Copyright (C) 1987, 88, 90, 91, 92, 1993 Free Software Foundation, Inc.
#This file is part of GNU CC.
CC = cc
BISON = bison
-BISONFLAGS = -v
+BISONFLAGS =
AR = ar
OLDAR_FLAGS = qc
AR_FLAGS = rc
INSTALL_DATA = $(INSTALL)
SYMLINK = ln -s
MAKEINFO = makeinfo
+TEXI2DVI = texi2dvi
# Define this as & to perform parallel make on a Sequent.
# Note that this has some bugs, and it seems currently necessary
# Dir to search for system headers. Overridden by cross-make.
SYSTEM_HEADER_DIR = /usr/include
+# Uncomment following line for fixproto support. (May become the default!)
+# STMP_FIXPROTO = stmp-fixproto
+
# There may be a premade insn-attrtab.c for this machine.
# (You could rebuild it with genattrtab as usual, but it takes a long time.)
# PREMADE_ATTRTAB is the file name of the file to use.
# Directory in which to put localized header files. On the systems with
# gcc as the native cc, `local_prefix' may not be `prefix' which is
# `/usr'.
-local_prefix = $(prefix)
+# NOTE: local_prefix *should not* default from prefix.
+local_prefix = /usr/local
# Directory in which to put host dependent programs and libraries
exec_prefix = $(prefix)
# Directory in which to put the executable for the command `gcc'
libdir = $(exec_prefix)/lib
# Directory in which the compiler finds executables, libraries, etc.
libsubdir = $(libdir)/gcc-lib/$(target)/$(version)
-# Directory for header file assert.h.
+# Directory to search for site-specific includes.
includedir = $(local_prefix)/include
# assertdir is overridden in cross-make.
-assertdir = $(includedir)
+# (But this currently agrees with what is in cross-make.)
+assertdir = $(tooldir)/include
+# where the info files go
+infodir = $(prefix)/info
# Extension (if any) to put in installed man-page filename.
manext = .1
# Directory in which to put man pages.
mandir = $(prefix)/man/man1
# Directory in which to find other cross-compilation tools and headers.
# Used in install-cross.
-tooldir = $(prefix)/$(target)
+tooldir = $(exec_prefix)/$(target)
# Dir for temp files.
tmpdir = /tmp
# system library.
OBSTACK=obstack.o
+# Specify the rule for actually making libgcc.a,
+LIBGCC = libgcc.a
+# and the rule for installing it.
+INSTALL_LIBGCC = install-libgcc
+
# Specify the rule for actually making libgcc1.a.
# The value may be empty; that means to do absolutely nothing
# with or for libgcc1.a.
LIBGCC1 = libgcc1.a
+# Specify the rule for making libgcc1.a for a cross-compiler.
+# The default rule assumes that libgcc1.a is supplied by the user.
+CROSS_LIBGCC1 = libgcc1.cross
+
# Specify the rule for actually making libgcc2.a.
LIBGCC2 = libgcc2.a
# Control whether header files are installed.
INSTALL_HEADERS=install-headers
+# Options for tar when copying trees. So HPUX can override it.
+TAROUTOPTS = xpBf
+
# Select which version of fixincludes to use (I.E. regular versus SVR4)
# This value is overridden directly by configure.
FIXINCLUDES=fixincludes
# Additional directories of header files to run fixincludes on.
+# These should be directories searched automatically by default
+# just as /usr/include is.
+# *Do not* use this for directories that happen to contain
+# header files, but are not searched automatically by default.
# On most systems, this is empty.
OTHER_FIXINCLUDES_DIRS=
# List of things which should already be built whenever we try to use xgcc
# to link anything.
-GCC_PARTS=$(GCC_PASSES) libgcc.a $(EXTRA_PROGRAMS) $(USE_COLLECT2) $(EXTRA_PARTS)
+GCC_PARTS=$(GCC_PASSES) $(LIBGCC) $(EXTRA_PROGRAMS) $(USE_COLLECT2) $(EXTRA_PARTS)
# Directory to link to, when using the target `maketest'.
DIR = ../gcc
C_OBJS = c-parse.o c-lang.o c-lex.o c-pragma.o \
c-decl.o c-typeck.o c-convert.o c-aux-info.o c-common.o c-iterate.o
-# Language-specific object files for Objectionable C.
+# Language-specific object files for Objective C.
OBJC_OBJS = objc-parse.o objc-act.o c-lex.o c-pragma.o \
c-decl.o c-typeck.o c-convert.o c-aux-info.o c-common.o c-iterate.o
stamp-attr stamp-attrtab stamp-opinit stamp-proto \
genemit genoutput genrecog genextract genflags gencodes genconfig genpeep \
genattrtab genattr genopinit \
- $(GCC_PASSES) $(EXTRA_PARTS) $(EXTRA_PROGRAMS) gcc-cross cccp \
+ $(GCC_PASSES) $(EXTRA_PARTS) $(EXTRA_PROGRAMS) gcc-cross cccp g++ g++-cross \
cc1plus cc1obj enquire protoize unprotoize specs collect2 $(USE_COLLECT2)
# Members of libgcc1.a.
# Header files that are made available under the same name
# to programs compiled with GCC.
-USER_H = va-alpha.h va-i860.h va-i960.h va-mips.h va-m88k.h \
+USER_H = va-alpha.h va-h8300.h va-i860.h va-i960.h va-mips.h va-m88k.h \
va-pa.h va-pyr.h va-sparc.h va-clipper.h va-spur.h proto.h $(EXTRA_HEADERS)
# The files that "belong" in CONFIG_H are deliberately omitted
# This is what to compile if making a cross-compiler.
# Note that we can compile enquire using the cross-compiler just build,
# although we can't run it on this machine.
-all.cross: native gcc-cross specs libgcc.a stmp-headers cross-test enquire $(EXTRA_PARTS)
+all.cross: native gcc-cross g++-cross specs $(LIBGCC) stmp-headers $(STMP_FIXPROTO) cross-test enquire $(EXTRA_PARTS)
# This is what to compile if making gcc with a cross-compiler.
-all.build: native xgcc $(EXTRA_PARTS)
+all.build: native xgcc g++ $(EXTRA_PARTS)
# This is what must be made before installing GCC and converting libraries.
-start.encap: native xgcc specs $(LIBGCC1) xlimits.h
+start.encap: native xgcc g++ specs $(LIBGCC1) xlimits.h
# Use this to make a GCC that will be used only to recompile GCC.
-for-bootstrap: start.encap libgcc.a
+for-bootstrap: start.encap $(LIBGCC)
# These can't be made, with COFF encapsulation, until after GCC can run.
-rest.encap: libgcc.a stmp-headers $(EXTRA_PARTS)
+rest.encap: $(LIBGCC) stmp-headers $(STMP_FIXPROTO) $(EXTRA_PARTS)
# This is what is made with the host's compiler
# whether making a cross compiler or not.
native: config.status cpp $(LANGUAGES) $(EXTRA_PASSES) $(EXTRA_PROGRAMS) $(USE_COLLECT2)
# Define the names for selecting languages in LANGUAGES.
C c: cc1
C++ c++: cc1plus
-OBJC objc: cc1obj objc-runtime
-OBJECTIVE-C objective-c: cc1obj objc-runtime
+# The next two ought to depend on objc-runtime, but that doesn't work yet.
+OBJC objc: cc1obj
+OBJECTIVE-C objective-c: cc1obj
PROTO: proto
# Really, really stupid make features, such as SUN's KEEP_STATE, may force
# On the target machine, finish building a cross compiler.
# This does the things that can't be done on the host machine.
-rest.cross: libgcc.a gfloat.h specs
+rest.cross: $(LIBGCC) gfloat.h specs
# Verify that it works to compile and link cross-test.
# If it does, then there are sufficient replacements for libgcc1.a.
-cross-test: cross-test.o native gcc-cross libgcc.a $(GCC_PARTS)
+cross-test: cross-test.o native gcc-cross $(LIBGCC) $(GCC_PARTS)
$(GCC_FOR_TARGET) $(GCC_CFLAGS) cross-test.o -o $@
cross-test.o: cross-test.c native gcc-cross
$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) -c $(srcdir)/cross-test.c
specs: xgcc
$(GCC_FOR_TARGET) -dumpspecs > specs
+# Create the compiler driver for g++.
+g++: g++.o $(LIBDEPS)
+ $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o g++ g++.o $(LIBS)
+
# We do want to create an executable named `xgcc', so we can use it to
# compile libgcc2.a.
# Also create gcc-cross, so that install-common will install properly.
gcc-cross: xgcc
cp xgcc gcc-cross
+# Create a version of the g++ driver which calls the cross-compiler.
+g++-cross: $(srcdir)/g++.c
+ $(CC) $(ALL_CFLAGS) $(INCLUDES) $(LDFLAGS) -o g++-cross \
+ -DGCC_NAME=\"$(target)-gcc\" $(srcdir)/g++.c version.o $(LIBS)
+
cc1:$(P) $(C_OBJS) $(OBJS) $(LIBDEPS)
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o cc1 $(C_OBJS) $(OBJS) $(LIBS)
# Create float.h source for the native machine.
float.h-nat: enquire
- -./enquire -f > float.h-nat
+ -./enquire -f > tmp-float.h
+ mv tmp-float.h float.h-nat
# Create a dummy float.h source for a cross-compiler.
float.h-cross:
# so that libgcc1.a itself remains nonexistent if compilation is aborted.
# -e causes any failing command to make this rule fail.
# -e doesn't work in certain shells, so we test $$? as well.
- set -e; \
+# lynx has a broken ar, it always complains when the initial library is
+# empty, thus this command works only if we don't do -e
+# There is a trailing backslash (\) deleted from the following line.
+# set -e;
for name in $(LIB1FUNCS); \
do \
echo $${name}; \
-rm -f tmplibgcc2.a
# -e causes any failing command to make this rule fail.
# -e doesn't work in certain shells, so we test $$? as well.
- set -e; \
+# lynx has a broken ar, it always complains when the initial library is
+# empty, thus this command works only if we don't do -e
+# There is a trailing backslash (\) deleted from the following line.
+# set -e;
for name in $(LIB2FUNCS); \
do \
echo $${name}; \
then (cd tmpcopy; $(AR) x ../$(LIBGCC1)); \
else true; \
fi
+# Some versions of ar (specifically the one in RISC/os 5.x), create an
+# unwritable table of contents file, and then print an error message when
+# the second ar command tries to overwrite this file. To avoid the error
+# message from ar, we make sure all files are writable.
+ (cd tmpcopy; chmod +w * > /dev/null 2>&1)
(cd tmpcopy; $(AR) x ../$(LIBGCC2))
(cd tmpcopy; $(AR) $(AR_FLAGS) ../tmplibgcc.a *.o)
rm -rf tmpcopy
objc-runtime: libobjc.a
# Build the Objective C runtime library.
-libobjc.a: cc1obj libgcc2.ready
+libobjc.a: cc1obj libgcc2.ready $(USE_COLLECT2) $(EXTRA_PARTS)
if [ -d objc ]; then true; else mkdir objc; fi
thisdir1=`pwd`; \
srcdir1=`cd $(srcdir); pwd`; \
`echo $(srcdir)/cp-parse.c | sed 's,^\./,,'`
$(srcdir)/cp-parse.c $(srcdir)/cp-parse.h : $(srcdir)/cp-parse.y
- @echo expect 29 shift/reduce conflicts and 14 reduce/reduce conflicts
+ @echo expect 29 shift/reduce conflicts and 13 reduce/reduce conflicts
cd $(srcdir); $(BISON) $(BISONFLAGS) -d -o cp-parse.c cp-parse.y
cd $(srcdir); grep '^#define[ ]*YYEMPTY' cp-parse.c >>cp-parse.h
-DTARGET_MACHINE=\"$(target)\" \
-c `echo $(srcdir)/collect2.c | sed 's,^\./,,'`
-# Objectionable C language specific files.
+# Objective C language specific files.
objc-parse.o : $(srcdir)/objc-parse.c $(CONFIG_H) $(TREE_H) c-lex.h \
c-tree.h input.h flags.h objc-act.h
-DSTANDARD_STARTFILE_PREFIX=\"$(libdir)/\" \
-DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc-lib/\" \
-DDEFAULT_TARGET_MACHINE=\"$(target)\" \
- -DTOOLDIR_BASE_PREFIX=\"$(prefix)/\" \
+ -DTOOLDIR_BASE_PREFIX=\"$(exec_prefix)/\" \
-DTOOLDIR=\"$(tooldir)/\" \
$(MAYBE_TARGET_DEFAULT) \
-c `echo $(srcdir)/gcc.c | sed 's,^\./,,'`
flags.h output.h
sched.o : sched.c $(CONFIG_H) $(RTL_H) basic-block.h regs.h hard-reg-set.h \
flags.h insn-config.h insn-attr.h
-final.o : final.c $(CONFIG_H) $(RTL_H) gvarargs.h flags.h regs.h \
+final.o : final.c $(CONFIG_H) $(RTL_H) $(TREE_H) gvarargs.h flags.h regs.h \
recog.h conditions.h insn-config.h insn-attr.h real.h output.h \
hard-reg-set.h insn-flags.h insn-codes.h gstab.h xcoffout.h defaults.h
recog.o : recog.c $(CONFIG_H) $(RTL_H) \
-DGPLUSPLUS_INCLUDE_DIR=\"$(libdir)/g++-include\" \
-DCROSS_INCLUDE_DIR=\"$(libsubdir)/sys-include\" \
-DTOOL_INCLUDE_DIR=\"$(tooldir)/include\" \
- -DLOCAL_INCLUDE_DIR=\"$(prefix)/include\" \
+ -DLOCAL_INCLUDE_DIR=\"$(local_prefix)/include\" \
-DSTD_PROTO_DIR=\"$(libsubdir)\" \
-DUNPROTOIZE $(srcdir)/protoize.c
mv protoize.o unprotoize.o
-DGPLUSPLUS_INCLUDE_DIR=\"$(libdir)/g++-include\" \
-DCROSS_INCLUDE_DIR=\"$(libsubdir)/sys-include\" \
-DTOOL_INCLUDE_DIR=\"$(tooldir)/include\" \
- -DLOCAL_INCLUDE_DIR=\"$(prefix)/include\" \
+ -DLOCAL_INCLUDE_DIR=\"$(local_prefix)/include\" \
-DSTD_PROTO_DIR=\"$(libsubdir)\" \
$(srcdir)/protoize.c
touch stamp-proto
-aux-info $@ -S -o tmp-SYSCALLS.s SYSCALLS.c
-rm -f SYSCALLS.c tmp-SYSCALLS.s
+
test-protoize-simple: ./protoize ./unprotoize $(GCC_PASSES)
-rm -f tmp-proto.[cso]
cp $(srcdir)/protoize.c tmp-proto.c
touch stmp-headers
# Build fixed copies of system files.
-stmp-fixinc: $(srcdir)/$(FIXINCLUDES) gsyslimits.h
+stmp-fixinc: $(srcdir)/$(FIXINCLUDES) gsyslimits.h xgcc cpp
rm -rf include
mkdir include
if [ x$(FIXINCLUDES) != xMakefile.in ]; \
for dir in $(SYSTEM_HEADER_DIR) $(OTHER_FIXINCLUDES_DIRS); do \
if [ -d $$dir ]; \
then \
- $(srcdir)/$(FIXINCLUDES) include $$dir $(srcdir); \
+ $(srcdir)/$(FIXINCLUDES) include $$dir $(srcdir) "`pwd`/xgcc -B`pwd`/"; \
else true; fi; \
done; \
else true; \
chmod a+r include/syslimits.h
touch stmp-fixinc
-# copy objc header files
-objc-headers: force
+# copy objc header files into build directory
+objc-headers:
if [ -d objc ]; then true; else mkdir objc; fi
thisdir1=`pwd`; \
srcdir1=`cd $(srcdir); pwd`; \
srcdir=$${srcdir1} tooldir=$(tooldir) AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" \
GCC_FOR_TARGET="$${thisdir1}/xgcc -B$${thisdir1}/" \
GCC_CFLAGS="$(GCC_CFLAGS)" incinstalldir=$${thisdir1}/include
-
+ touch objc-headers
+
+# Files related to the fixproto script.
+
+deduced.h: $(srcdir)/scan-types.sh
+ CC="$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) -nostdinc -Iinclude -I${SYSTEM_HEADER_DIR}"; \
+ export CC; \
+ $(srcdir)/scan-types.sh >tmp-deduced.h
+ mv tmp-deduced.h deduced.h
+
+gen-protos: gen-protos.o scan.o
+ ${HOST_CC} -o gen-protos gen-protos.o scan.o
+
+xsys-protos.h: $(srcdir)/sys-protos.h deduced.h gen-protos Makefile
+ cat deduced.h $(srcdir)/sys-protos.h > fixtmp.c
+ $(GCC_FOR_TARGET) fixtmp.c -E \
+ | sed -e 's/ / /g' -e 's/ *(/ (/g' -e 's/ [ ]*/ /g' -e 's/( )/()/' \
+ | ./gen-protos >xsys-protos.h
+ rm -rf fixtmp.c
+
+scan-decls: scan-decls.o scan.o
+ $(HOST_CC) -o scan-decls scan-decls.o scan.o
+
+patch-header: patch-header.o scan.o xsys-protos.h $(HOST_OBSTACK)
+ $(HOST_CC) -o patch-header patch-header.o scan.o $(HOST_OBSTACK)
+
+patch-header.o: xsys-protos.h
+
+stmp-fixproto: patch-header scan-decls xsys-protos.h
+ CPP="$(GCC_FOR_TARGET) -E"; export CPP; \
+ ${srcdir}/fixproto include include $(SYSTEM_HEADER_DIR)
+ touch stmp-fixproto
\f
# Remake the info files.
-doc: $(srcdir)/cpp.info $(srcdir)/gcc.info
+doc: info
+info: $(srcdir)/cpp.info $(srcdir)/gcc.info
$(srcdir)/cpp.info: cpp.texi
- $(MAKEINFO) `echo $(srcdir)/cpp.texi | sed 's,^\./,,'`
+ cd $(srcdir); $(MAKEINFO) cpp.texi
#$(srcdir)/gplus.info: gplus.texi
# $(MAKEINFO) `echo $(srcdir)/gplus.texi | sed 's,^\./,,'`
$(srcdir)/gcc.info: gcc.texi extend.texi install.texi invoke.texi \
md.texi rtl.texi tm.texi
- $(MAKEINFO) `echo $(srcdir)/gcc.texi | sed 's,^\./,,'`
+ cd $(srcdir); $(MAKEINFO) gcc.texi
+
+dvi: $(srcdir)/gcc.dvi $(srcdir)/cpp.dvi
# This works with GNU Make's default rule.
$(srcdir)/gcc.dvi: gcc.texi extend.texi install.texi invoke.texi \
md.texi rtl.texi tm.texi
+ $(TEXI2DVI) $<
# This works with GNU Make's default rule.
$(srcdir)/cpp.dvi: cpp.texi
+ $(TEXI2DVI) $<
$(srcdir)/INSTALL: install1.texi install.texi
$(MAKEINFO) -D INSTALLONLY --no-header `echo $(srcdir)/install1.texi | sed 's,^\./,,'`
-rm -f tmplibgcc* tmpcopy xlimits.h
for name in $(LIB1FUNCS); do rm -f $${name}.c; done
# Delete other temporary files.
- -rm -f tmp-float.h tmp-gcc.xtar.Z
+ -rm -f tmp-float.h tmp-gcc.xtar.gz
-rm -f tmp-foo1 tmp-foo2 tmp-proto.* tmp-unproto.1 tmp-SYSCALLS.s
# Delete the stamp files.
-rm -f stamp-* tmp-*
# Delete some files made during installation.
-rm -f specs gfloat.h float.h-* enquire SYSCALLS.c.X SYSCALLS.c
-rm -f collect collect2 ld mips-tfile mips-tdump alloca.s
+# Delete files generated for fixproto
+ -rm -rf patch-header scan-decls xsys-protos.h deduced.h tmp-deduced.h \
+ gen-protos fixproto.list fixtmp.?
# Delete unwanted output files from TeX.
-rm -f *.toc *.log *.vr *.fn *.cp *.tp *.ky *.pg
# Delete sorted indices we don't actually use.
-rm -f libgcc.a libgcc1.a libgcc2.a libgcc2.ready libgcc1.null
-rm -f *.dvi
# Delete the include directory.
- -rm -rf stmp-* include
+ -rm -rf stmp-* include objc-headers
# Delete all files that users would normally create
# while building and installing GCC.
-rm -f tm.h aux-output.c config.h md config.status tconfig.h hconfig.h
-rm -f Makefile *.oaux
-rm -fr stage1 stage2 stage3 stage4
+ -rm -f cp-parse.output
+ -rm -f objc-parse.output
+ -rm -f c-parse.output
# Delete anything likely to be found in the source directory
# that shouldn't be in the distribution.
extraclean: distclean
-rm -rf =* ./"#"* *~* config/=* config/"#"* config/*~*
-rm -f patch* *.orig *.rej config/patch* config/*.orig config/*.rej
- -rm -f *.dvi *.oaux *.d *.Z *.tar *.xtar *diff
- -rm -f *lose config/*lose
+ -rm -f config/*/=* config/*/"#"* config/*/*~*
+ -rm -f config/*/*.orig config/*/*.rej
+ -rm -f objc/=* objc/"#"* objc/*~*
+ -rm -f objc/*.orig objc/*.rej
+ -rm -f *.dvi *.oaux *.d *.[zZ] *.gz
+ -rm -f *.tar *.xtar *diff *.diff.* *.tar.* *.xtar.* *diffs
+ -rm -f *lose config/*lose config/*/*lose
-rm -f *.s *.s[0-9] *.i install1.texi config/ChangeLog
# Get rid of every file that's generated from some other file.
install: $(INSTALL_TARGET) ; @true
# Copy the compiler files into directories where they will be run.
-install-normal: install-common install-libgcc $(INSTALL_HEADERS) install-man
+install-normal: install-common $(INSTALL_HEADERS) $(INSTALL_LIBGCC) \
+ install-man install-info
# Do nothing while making gcc with a cross-compiler. The person who
# makes gcc for the target machine has to know how to put a complete
-if [ -d $(libdir)/gcc-lib/$(target)/$(version)/include ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target)/$(version)/include ; fi
-if [ -d $(bindir) ] ; then true ; else mkdir $(bindir) ; fi
-if [ -d $(includedir) ] ; then true ; else mkdir $(includedir) ; fi
- -if [ -f gcc-cross ] ; \
- then \
- if [ -d $(tooldir) ] ; then true ; else mkdir $(tooldir) ; fi ; \
- if [ -d $(assertdir) ] ; then true ; else mkdir $(assertdir) ; fi ; \
- else true; \
- fi
+ -if [ -d $(tooldir) ] ; then true ; else mkdir $(tooldir) ; fi
+ -if [ -d $(assertdir) ] ; then true ; else mkdir $(assertdir) ; fi
+ -if [ -d $(infodir) ] ; then true ; else mkdir $(infodir) ; fi
# We don't use mkdir -p to create the parents of mandir,
# because some systems don't support it.
# Instead, we use this technique to create the immediate parent of mandir.
# Install the compiler executables built during cross compilation.
# Deps on $(srcdir)/g++ $(srcdir)/c++ would be natural here,
# but the latter would get confused with the target `c++'.
-install-common: native install-dir xgcc $(EXTRA_PARTS)
+install-common: native install-dir xgcc g++ $(EXTRA_PARTS)
for file in $(COMPILERS); do \
if [ -f $$file ] ; then \
rm -f $(libsubdir)/$$file; \
rm -f $(tooldir)/bin/gcc; \
$(INSTALL_PROGRAM) gcc-cross $(tooldir)/bin/gcc; \
else true; fi; \
+ if [ -f cc1plus ] ; then \
+ rm -f $(bindir)/$(target)-g++; \
+ $(INSTALL_PROGRAM) g++-cross $(bindir)/$(target)-g++; \
+ chmod a+x $(bindir)/$(target)-g++; \
+ rm -f $(bindir)/$(target)-c++; \
+ ln $(bindir)/$(target)-g++ $(bindir)/$(target)-c++; \
+ fi ; \
else \
rm -f $(bindir)/gcc; \
$(INSTALL_PROGRAM) xgcc $(bindir)/gcc; \
chmod a-x $(libsubdir)/SYSCALLS.c.X; \
fi
-if [ -f cc1plus ] ; then \
- rm -f $(bindir)/c++ ; \
- $(INSTALL_PROGRAM) $(srcdir)/c++ $(bindir)/c++ ; \
- rm -f $(bindir)/g++ ; \
- $(INSTALL_PROGRAM) $(srcdir)/g++ $(bindir)/g++ ; \
+ rm -f $(bindir)/g++; \
+ $(INSTALL_PROGRAM) g++ $(bindir)/g++; \
+ chmod a+x $(bindir)/g++; \
+ rm -f $(bindir)/c++; \
+ ln $(bindir)/g++ $(bindir)/c++; \
fi
-rm -f $(libsubdir)/cpp
$(INSTALL_PROGRAM) cpp $(libsubdir)/cpp
+# Install the info files.
+install-info: doc
+ -rm -f $(infodir)/cpp.info* $(infodir)/gcc.info*
+ cd $(srcdir); for f in cpp.info* gcc.info*; \
+ do $(INSTALL_DATA) $$f $(infodir)/$$f; done
+ -chmod a-x $(infodir)/cpp.info* $(infodir)/gcc.info*
+
# Install the man pages.
install-man: install-dir $(srcdir)/gcc.1 $(srcdir)/cccp.1 $(srcdir)/g++.1
-rm -f $(mandir)/gcc$(manext)
-chmod a+rx $(libsubdir)/include
# Install the include directory using tar.
-install-headers-tar: stmp-headers install-include-dir
- cd include; tar cf - . | (cd $(libsubdir)/include; tar xpBf - )
+install-headers-tar: stmp-headers $(STMP_FIXPROTO) install-include-dir
+ cd include; \
+ (tar cf - .; exit 0) | (cd $(libsubdir)/include; tar $(TAROUTOPTS) - )
+# /bin/sh on some systems returns the status of the first tar,
+# and that can lose with GNU tar which always writes a full block.
+# So use `exit 0' to ignore its exit status.
# Install the include directory using cpio.
-install-headers-cpio: stmp-headers install-include-dir
+install-headers-cpio: stmp-headers $(STMP_FIXPROTO) install-include-dir
cd include; find . -print | cpio -pdum $(libsubdir)/include
-# Put assert.h in /usr/local/include, so it won't override GNU libc's assert.h.
-# Don't replace the assert.h already there if it is not from GCC.
-# This code would be simpler if it tested for -f ... && ! grep ...
-# but supposedly the ! operator is missing in sh on some systems.
+# Put assert.h where it won't override GNU libc's assert.h.
+# It goes in a dir that is searched after GNU libc's headers;
+# thus, the following conditionals are no longer needed.
+# But it's not worth deleting them now.
+## Don't replace the assert.h already there if it is not from GCC.
+## This code would be simpler if it tested for -f ... && ! grep ...
+## but supposedly the ! operator is missing in sh on some systems.
install-assert-h: assert.h install-dir
if [ -f $(assertdir)/assert.h ]; \
then \
rmdir temp
# Create the distribution tar file.
-#dist: gcc-$(version).tar.Z
-dist: gcc.xtar.Z
+#dist: gcc-$(version).tar.gz
+dist: gcc.xtar.gz
-gcc.xtar.Z: gcc.xtar
- compress < gcc.xtar > tmp-gcc.xtar.Z
- mv tmp-gcc.xtar.Z gcc.xtar.Z
+gcc.xtar.gz: gcc.xtar
+ gzip < gcc.xtar > tmp-gcc.xtar.gz
+ mv tmp-gcc.xtar.gz gcc.xtar.gz
-#gcc-$(version).tar.Z: gcc-$(version).tar
-# compress < gcc-$(version).tar > gcc-$(version).tar.Z
+#gcc-$(version).tar.gz: gcc-$(version).tar
+# gzip < gcc-$(version).tar > gcc-$(version).tar.gz
#gcc-$(version).tar:
gcc.xtar: distdir
done
cd config; \
for file in *[0-9a-zA-Z+]; do \
- ln $$file ../tmp/config >/dev/null 2>&1 || cp $$file ../tmp/config; \
+ if test -d $$file && test "$$file" != RCS; then \
+ mkdir ../tmp/config/$$file; \
+ cd $$file; \
+ for subfile in *[0-9a-zA-Z+]; do \
+ ln $$subfile ../../tmp/config/$$file >/dev/null 2>&1 \
+ || cp $$subfile ../../tmp/config/$$file; \
+ done; \
+ cd ..; \
+ else \
+ ln $$file ../tmp/config >/dev/null 2>&1 \
+ || cp $$file ../tmp/config; \
+ fi; \
done
cd objc; \
for file in *[0-9a-zA-Z+]; do \
# Compare the object files in the current directory with those in the
# stage2 directory.
+# ./ avoids bug in some versions of tail.
compare: force
for file in *.o; do \
- tail +16c $$file > tmp-foo1; \
+ tail +16c ./$$file > tmp-foo1; \
tail +16c stage2/$$file > tmp-foo2 2>/dev/null \
&& (cmp tmp-foo1 tmp-foo2 || echo $$file differs); \
done