INSTALL_DATA = $(INSTALL)
AR = ar
-AR_FLAGS = qv
+AR_FLAGS = qc
RANLIB = ranlib
BISON = `if [ -d $(unsubdir)/../bison ] ; \
then echo \`pwd\`/$(unsubdir)/../bison$(subdir)/bison -L \`pwd\`/$(unsubdir)/../bison$(subdir)/ -y ; \
- else echo yacc ; fi`
+ else echo bison -y ; fi`
MAKEINFO = makeinfo
FRESHMAKEINFO = `if [ -d $(unsubdir)/../texinfo/C ] ; \
else echo echo ; fi`
#\`(cd $(srcdir)/bison ; \\`pwd\\`)\`
-SUBDIRS = libiberty glob readline bfd gdb binutils ld gas gcc gnulib clib
+SUBDIRS = libiberty glob readline bfd gdb binutils ld gas gcc libg++ gnulib clib
OTHERS =
ALL = all.normal
### for debugging
#GCCVERBOSE=-v
-\f
+
#### host and target specific makefile fragments come in here.
###
install-info: install-info-dirs force
$(MAKE) subdir_do DO=install-info "DODIRS=$(SUBDIRS)"
$(INSTALL_DATA) cfg-paper.info $(infodir)/cfg-paper.info
+ $(INSTALL_DATA) configure.info $(infodir)/configure.info
$(MAKE) dir.info install-dir.info
install-dir.info:
$(INSTALL_DATA) dir.info $(infodir)/dir.info
# clib prms
-all.normal: all-texinfo all-bison all-byacc all-flex all-ld all-gnulib \
- all-gdb all-make all-cvs all-emacs all-ispell
+# all-gnulib
+all.normal: all-texinfo all-bison all-byacc all-flex all-ld \
+ all-gcc all-gas all-binutils \
+ all-libg++ all-gdb all-make all-cvs all-patch all-emacs all-ispell all-fileutils
all.cross: all-bison all-ld all-gnulib all-gdb
# $(MAKE) subdir_do DO=all "DODIRS=$(SUBDIRS) $(OTHERS)"
clean-bison clean-byacc clean-flex clean-ld clean-gas \
clean-gcc clean-gnulib clean-readline clean-glob clean-gdb \
clean-make clean-diff clean-grep clean-rcs clean-gdbm \
- clean-cvs clean-emacs clean-ispell
+ clean-cvs clean-patch clean-emacs clean-ispell clean-fileutils
rm -rf *.a TEMP errs core *.o *~ \#* TAGS *.E
-install: $(INSTALL_TARGET)
- $(INSTALL_DATA) configure.man $(man1dir)/configure.1
+install: $(INSTALL_TARGET) $(srcdir)/configure.man
+ $(INSTALL_DATA) $(srcdir)/configure.man $(man1dir)/configure.1
install.all: install-dirs install-libiberty install-texinfo \
install-binutils install-bison install-byacc install-flex \
install-ld install-gas install-gcc install-gnulib \
install-readline install-glob install-gdb install-make \
- install-cvs install-emacs install-ispell
+ install-cvs install-patch install-emacs install-ispell install-fileutils
install.cross: install-dirs install-libiberty install-binutils install-bison \
install-byacc install-ld install-gas install-gnulib \
install-readline install-glob install-gdb
-\f
+
### libiberty
.PHONY: all-libiberty just-libiberty
all-libiberty: just-libiberty
else \
true ; \
fi
-\f
+
### texinfo
.PHONY: all-texinfo just-texinfo
all-texinfo: just-texinfo
else \
true ; \
fi
-\f
+
### bfd
.PHONY: all-bfd just-bfd
all-bfd: just-bfd
else \
true ; \
fi
-\f
+
### binutils
.PHONY: all-binutils just-binutils
all-binutils: just-binutils
else \
true ; \
fi
-\f
+
### byacc
.PHONY: all-byacc just-byacc
all-byacc: just-byacc
else \
true ; \
fi
-\f
+
### bison
.PHONY: all-bison just-bison
all-bison: just-bison
else \
true ; \
fi
-\f
+
### gcc
.PHONY: all-gcc just-gcc
all-gcc: just-gcc
-just-gcc: just-libiberty just-bison just-gnulib1 force
+#just-gcc: just-libiberty just-bison just-gnulib1 force
+just-gcc: just-libiberty just-bison force
if [ -d $(unsubdir)/gcc ] ; then \
(cd $(unsubdir)/gcc$(subdir); \
$(MAKE) \
else \
true ; \
fi
-\f
+
### readline
.PHONY: all-readline just-readline
all-readline: just-readline
else \
true ; \
fi
-\f
+
### glob
.PHONY: all-glob just-glob
all-glob: just-glob
else \
true ; \
fi
-\f
+
### gas
.PHONY: all-gas just-gas
all-gas: just-gas
else \
true ; \
fi
-\f
+
### ld
.PHONY: all-ld just-ld
all-ld: just-ld
else \
true ; \
fi
-\f
+
### gnulib (and gnulib1)
.PHONY: all-gnulib just-gnulib1 just-gnulib
just-gnulib1: all-gas all-binutils force
all-gnulib: just-gnulib
just-gnulib: all-gcc all-gas all-binutils force
+ true
if [ -d $(unsubdir)/gnulib ] ; then \
(cd $(unsubdir)/gnulib$(subdir); \
$(MAKE) \
else \
true ; \
fi
-\f
+
### gdb
.PHONY: all-gdb just-gdb
all-gdb: just-gdb
else \
true ; \
fi
-\f
+
### make
.PHONY: all-make just-make
all-make: just-make
else \
true ; \
fi
-\f
+
### diff
.PHONY: all-diff just-diff
all-diff: just-diff
else \
true ; \
fi
-\f
+
### grep
.PHONY: all-grep just-grep
all-grep: just-grep
else \
true ; \
fi
-\f
+
### rcs
.PHONY: all-rcs just-rcs
all-rcs: just-rcs
else \
true ; \
fi
-\f
+
### gdbm
.PHONY: all-gdbm just-gdbm
all-gdbm: just-gdbm
else \
true ; \
fi
-\f
+
### cvs
.PHONY: all-cvs just-cvs
all-cvs: just-cvs just-rcs just-grep just-diff
true ; \
fi
-clean-cvs: force
+clean-cvs: clean-gdbm force
if [ -d $(unsubdir)/cvs ] ; then \
(cd $(unsubdir)/cvs$(subdir); \
$(MAKE) \
if [ -d $(unsubdir)/cvs ] ; then \
(cd $(unsubdir)/cvs$(subdir); \
$(MAKE) \
+ "bindir=$(bindir)" \
+ "mandir=$(man1dir)" \
"against=$(against)" \
"AR=$(AR)" \
"AR_FLAGS=$(AR_FLAGS)" \
else \
true ; \
fi
-\f
+
+### patch
+.PHONY: all-patch just-patch
+all-patch: just-patch
+just-patch: force
+ if [ -d $(unsubdir)/patch ] ; then \
+ (cd $(unsubdir)/patch$(subdir); \
+ $(MAKE) \
+ "against=$(against)" \
+ "AR=$(AR)" \
+ "AR_FLAGS=$(AR_FLAGS)" \
+ "CC=$(CC)" \
+ "RANLIB=$(RANLIB)" \
+ "LOADLIBES=$(LOADLIBES)" \
+ "LDFLAGS=$(LDFLAGS)" \
+ "BISON=$(BISON)" \
+ "MAKEINFO=$(MAKEINFO)" \
+ all) ; \
+ else \
+ true ; \
+ fi
+
+clean-patch: force
+ if [ -d $(unsubdir)/patch ] ; then \
+ (cd $(unsubdir)/patch$(subdir); \
+ $(MAKE) \
+ "against=$(against)" \
+ "AR=$(AR)" \
+ "AR_FLAGS=$(AR_FLAGS)" \
+ "CC=$(CC)" \
+ "RANLIB=$(RANLIB)" \
+ "LOADLIBES=$(LOADLIBES)" \
+ "LDFLAGS=$(LDFLAGS)" \
+ "BISON=$(BISON)" \
+ "MAKEINFO=$(MAKEINFO)" \
+ clean) ; \
+ else \
+ true ; \
+ fi
+
+install-patch: force
+ if [ -d $(unsubdir)/patch ] ; then \
+ (cd $(unsubdir)/patch$(subdir); \
+ $(MAKE) \
+ bindir=$(bindir) \
+ man1dir=$(man1dir) \
+ "AR=$(AR)" \
+ "AR_FLAGS=$(AR_FLAGS)" \
+ "CC=$(CC)" \
+ "RANLIB=$(RANLIB)" \
+ "LOADLIBES=$(LOADLIBES)" \
+ "LDFLAGS=$(LDFLAGS)" \
+ "BISON=$(BISON)" \
+ "MAKEINFO=$(MAKEINFO)" \
+ install) ; \
+ else \
+ true ; \
+ fi
+
### emacs
.PHONY: all-emacs just-emacs
all-emacs: just-emacs
else \
true ; \
fi
-\f
+
### ispell
.PHONY: all-ispell just-ispell
all-ispell: just-ispell
else \
true ; \
fi
-\f
+
### flex
.PHONY: all-flex just-flex
all-flex: just-flex
else \
true ; \
fi
-\f
+
+### fileutils
+.PHONY: all-fileutils just-fileutils
+all-fileutils: just-fileutils
+just-fileutils: force
+ if [ -d $(unsubdir)/fileutils ] ; then \
+ (cd $(unsubdir)/fileutils$(subdir); \
+ $(MAKE) \
+ "prefix=$(prefix)" \
+ "datadir=$(datadir)" \
+ "mandir=$(mandir)" \
+ "against=$(against)" \
+ "AR=$(AR)" \
+ "AR_FLAGS=$(AR_FLAGS)" \
+ "CC=$(CC)" \
+ "RANLIB=$(RANLIB)" \
+ "LOADLIBES=$(LOADLIBES)" \
+ "LDFLAGS=$(LDFLAGS)" \
+ "BISON=$(BISON)" \
+ "MAKEINFO=$(MAKEINFO)" \
+ all) ; \
+ else \
+ true ; \
+ fi
+
+clean-fileutils: force
+ if [ -d $(unsubdir)/fileutils ] ; then \
+ (cd $(unsubdir)/fileutils$(subdir); \
+ $(MAKE) \
+ "prefix=$(prefix)" \
+ "datadir=$(datadir)" \
+ "mandir=$(mandir)" \
+ "against=$(against)" \
+ "AR=$(AR)" \
+ "AR_FLAGS=$(AR_FLAGS)" \
+ "CC=$(CC)" \
+ "RANLIB=$(RANLIB)" \
+ "LOADLIBES=$(LOADLIBES)" \
+ "LDFLAGS=$(LDFLAGS)" \
+ "BISON=$(BISON)" \
+ "MAKEINFO=$(MAKEINFO)" \
+ clean) ; \
+ else \
+ true ; \
+ fi
+
+install-fileutils: force
+ if [ -d $(unsubdir)/fileutils ] ; then \
+ (cd $(unsubdir)/fileutils$(subdir); \
+ $(MAKE) \
+ "prefix=$(prefix)" \
+ "datadir=$(datadir)" \
+ "mandir=$(mandir)" \
+ "against=$(against)" \
+ "AR=$(AR)" \
+ "AR_FLAGS=$(AR_FLAGS)" \
+ "CC=$(CC)" \
+ "RANLIB=$(RANLIB)" \
+ "LOADLIBES=$(LOADLIBES)" \
+ "LDFLAGS=$(LDFLAGS)" \
+ "BISON=$(BISON)" \
+ "MAKEINFO=$(MAKEINFO)" \
+ install) ; \
+ else \
+ true ; \
+ fi
+
+### libg++
+.PHONY: all-libg++ just-libg++
+all-libg++: just-gcc just-libg++
+# NOTE! We have added GXX= and XTRAFLAGS to the $(MAKE) line!!!
+# and CC == GXX
+# Do not clone this one.
+just-libg++: force
+ if [ -d $(unsubdir)/libg++ ] ; then \
+ (cd $(unsubdir)/libg++$(subdir); \
+ $(MAKE) \
+ GXX=`cd $(unsubdir)/..$(subdir); pwd`"/gcc/gcc -B"`cd $(unsubdir)/..$(subdir);pwd`"/gcc/" \
+ "XTRAFLAGS=-I"`cd $(unsubdir)/..$(subdir); pwd`/gcc/include\
+ "prefix=$(prefix)" \
+ "datadir=$(datadir)" \
+ "mandir=$(mandir)" \
+ "against=$(against)" \
+ "AR=$(AR)" \
+ "AR_FLAGS=$(AR_FLAGS)" \
+ CC=`cd $(unsubdir)/..$(subdir); pwd`"/gcc/gcc -B"`cd $(unsubdir)/..$(subdir);pwd`"/gcc/" \
+ "RANLIB=$(RANLIB)" \
+ "LOADLIBES=$(LOADLIBES)" \
+ "LDFLAGS=$(LDFLAGS)" \
+ "BISON=$(BISON)" \
+ "MAKEINFO=$(MAKEINFO)" \
+ all) ; \
+ else \
+ true ; \
+ fi
+
+clean-libg++: force
+ if [ -d $(unsubdir)/libg++ ] ; then \
+ (cd $(unsubdir)/libg++$(subdir); \
+ $(MAKE) \
+ "prefix=$(prefix)" \
+ "datadir=$(datadir)" \
+ "mandir=$(mandir)" \
+ "against=$(against)" \
+ "AR=$(AR)" \
+ "AR_FLAGS=$(AR_FLAGS)" \
+ "CC=$(CC)" \
+ "RANLIB=$(RANLIB)" \
+ "LOADLIBES=$(LOADLIBES)" \
+ "LDFLAGS=$(LDFLAGS)" \
+ "BISON=$(BISON)" \
+ "MAKEINFO=$(MAKEINFO)" \
+ clean) ; \
+ else \
+ true ; \
+ fi
+
+install-libg++: force
+ if [ -d $(unsubdir)/libg++ ] ; then \
+ (cd $(unsubdir)/libg++$(subdir); \
+ $(MAKE) \
+ "prefix=$(prefix)" \
+ "datadir=$(datadir)" \
+ "mandir=$(mandir)" \
+ "against=$(against)" \
+ "AR=$(AR)" \
+ "AR_FLAGS=$(AR_FLAGS)" \
+ "CC=$(CC)" \
+ "RANLIB=$(RANLIB)" \
+ "LOADLIBES=$(LOADLIBES)" \
+ "LDFLAGS=$(LDFLAGS)" \
+ "BISON=$(BISON)" \
+ "MAKEINFO=$(MAKEINFO)" \
+ install) ; \
+ else \
+ true ; \
+ fi
+
### other supporting targets
# this is a bad hack.
all.xclib: all.normal
#
# Build GDB distributions that contain BFD, Include, Libiberty, Readline, etc
-DEVO_SUPPORT= README DOC.configure Makefile.in configure configure.in \
- config.sub config
+DEVO_SUPPORT= README cfg-paper.texi Makefile.in configure configure.in \
+ config.sub config configure.man
GDB_SUPPORT_DIRS= bfd include libiberty readline glob
GDB_SUPPORT_FILES= $(GDB_SUPPORT_DIRS) texinfo/fsf/texinfo.tex
(cd proto-toplev; for i in $(DEVO_SUPPORT) $(GDB_SUPPORT_DIRS); do \
ln -s ../$$i . ; \
done)
+ # Put only one copy (four hard links) of COPYING in the tar file.
+ rm proto-toplev/bfd/COPYING
+ ln proto-toplev/gdb/COPYING proto-toplev/bfd/COPYING
+ rm proto-toplev/include/COPYING
+ ln proto-toplev/gdb/COPYING proto-toplev/include/COPYING
+ rm proto-toplev/readline/COPYING
+ ln proto-toplev/gdb/COPYING proto-toplev/readline/COPYING
# Take out texinfo from configurable dirs
rm proto-toplev/configure.in
sed '/^configdirs=/s/texinfo //' <configure.in >proto-toplev/configure.in
# Take out glob from buildable dirs
rm proto-toplev/Makefile.in
sed '/^SUBDIRS =/s/glob //' <Makefile.in >proto-toplev/Makefile.in
+ # Take out texinfo from buildable dirs
+ cp proto-toplev/Makefile.in temp.$$
+ sed '/^all\.normal: /s/all-texinfo //' <temp.$$ >temp1.$$
+ sed '/^clean: /s/clean-texinfo //' <temp1.$$ >temp.$$
+ sed '/^install\.all: /s/install-texinfo //' <temp.$$ >proto-toplev/Makefile.in
+ rm temp.$$ temp1.$$
mkdir proto-toplev/texinfo
mkdir proto-toplev/texinfo/fsf
ln -s ../../../texinfo/fsf/texinfo.tex proto-toplev/texinfo/fsf/