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.
###
all: $(ALL)
-info: doc.info
+info: cfg-paper.info
$(MAKE) subdir_do DO=info "DODIRS=$(SUBDIRS)"
-doc.info: doc.texi
- $(MAKEINFO) -o doc.info $(srcdir)/doc.texi
+clean-info:
+ $(MAKE) subdir_do DO=clean-info "DODIRS=$(SUBDIRS)"
+ rm -f cfg-paper.info
+
+cfg-paper.info: cfg-paper.texi
+ $(MAKEINFO) -o cfg-paper.info $(srcdir)/cfg-paper.texi
+
+configure.info: configure.texi
+ $(MAKEINFO) -o configure.info $(srcdir)/configure.texi
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-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: clean-libiberty clean-texinfo clean-bfd clean-binutils clean-bison \
- clean-byacc 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: clean-libiberty clean-texinfo clean-bfd clean-binutils \
+ 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-patch clean-emacs clean-ispell clean-fileutils
rm -rf *.a TEMP errs core *.o *~ \#* TAGS *.E
-install: $(INSTALL_TARGET)
+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-ld install-gas install-gcc install-gnulib \
- install-readline install-glob install-gdb install-make install-cvs \
- install-emacs install-ispell
+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-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 force
if [ -d $(unsubdir)/gcc ] ; then \
(cd $(unsubdir)/gcc$(subdir); \
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
-.PHONY: all-gnulib just-gnulib
+
+### gnulib (and gnulib1)
+.PHONY: all-gnulib just-gnulib1 just-gnulib
+just-gnulib1: all-gas all-binutils force
+ if [ -d $(unsubdir)/gnulib ] ; then \
+ (cd $(unsubdir)/gnulib$(subdir); \
+ $(MAKE) \
+ "against=$(against)" \
+ "AR=$(AR)" \
+ "AR_FLAGS=$(AR_FLAGS)" \
+ "CC=$(CC)" \
+ "RANLIB=$(RANLIB)" \
+ "LOADLIBES=$(LOADLIBES)" \
+ "LDFLAGS=$(LDFLAGS)" \
+ "BISON=$(BISON)" \
+ "MAKEINFO=$(MAKEINFO)" \
+ gnulib1.a) ; \
+ else \
+ true ; \
+ fi
+
+clean-gnulib1: force
+ if [ -d $(unsubdir)/gnulib ] ; then \
+ (cd $(unsubdir)/gnulib$(subdir); \
+ $(MAKE) \
+ "against=$(against)" \
+ "AR=$(AR)" \
+ "AR_FLAGS=$(AR_FLAGS)" \
+ "CC=$(CC)" \
+ "RANLIB=$(RANLIB)" \
+ "LOADLIBES=$(LOADLIBES)" \
+ "LDFLAGS=$(LDFLAGS)" \
+ "BISON=$(BISON)" \
+ "MAKEINFO=$(MAKEINFO)" \
+ clean-gnulib1) ; \
+ else \
+ true ; \
+ fi
+
+install-gnulib1: force
+ echo gnulib1 is a component, not an installable target
+
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) \
install-cvs: install-rcs install-gdbm force
if [ -d $(unsubdir)/cvs ] ; then \
(cd $(unsubdir)/cvs$(subdir); \
+ $(MAKE) \
+ "bindir=$(bindir)" \
+ "mandir=$(man1dir)" \
+ "against=$(against)" \
+ "AR=$(AR)" \
+ "AR_FLAGS=$(AR_FLAGS)" \
+ "CC=$(CC)" \
+ "RANLIB=$(RANLIB)" \
+ "LOADLIBES=$(LOADLIBES)" \
+ "LDFLAGS=$(LDFLAGS)" \
+ "BISON=$(BISON)" \
+ "MAKEINFO=$(MAKEINFO)" \
+ install) ; \
+ else \
+ true ; \
+ fi
+
+### 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)" \
"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
-\f
+
### 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
+just-flex: force
+ if [ -d $(unsubdir)/flex ] ; then \
+ (cd $(unsubdir)/flex$(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-flex: force
+ if [ -d $(unsubdir)/flex ] ; then \
+ (cd $(unsubdir)/flex$(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-flex: force
+ if [ -d $(unsubdir)/flex ] ; then \
+ (cd $(unsubdir)/flex$(subdir); \
+ $(MAKE) \
+ "against=$(against)" \
+ "AR=$(AR)" \
+ "AR_FLAGS=$(AR_FLAGS)" \
+ "CC=$(CC)" \
+ "RANLIB=$(RANLIB)" \
+ "LOADLIBES=$(LOADLIBES)" \
+ "LDFLAGS=$(LDFLAGS)" \
+ "BISON=$(BISON)" \
+ "MAKEINFO=$(MAKEINFO)" \
+ install) ; \
+ else \
+ true ; \
+ fi
+
+### 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/