From 40e16078da164325314446b72150581b4135a8cf Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Wed, 31 Mar 1993 01:31:10 +0000 Subject: [PATCH] Build gas tar file, based on gdb code: * Makefile.in (setup-dirs-gdb): Renamed from setup-dirs. (gdb.tar.Z): Adjusted. * Makefile.in (setup-dirs, taz): New targets; should be general enough to adapt for gdb sometime. Build only .z file. (gas.tar.z): New target. --- Makefile.in | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 71 insertions(+), 4 deletions(-) diff --git a/Makefile.in b/Makefile.in index ea6efdd..068bf38 100644 --- a/Makefile.in +++ b/Makefile.in @@ -64,6 +64,7 @@ RANLIB = ranlib NM = nm GZIP = gzip +# BISON: This line sed'ed to BISON = bison -y for FSF releases, don't remove. BISON = `if [ -f $${rootme}/byacc/byacc ] ; \ then echo $${rootme}/byacc/byacc ; \ else echo byacc ; \ @@ -1590,13 +1591,13 @@ ETC_SUPPORT= Makefile.in cfg-paper.texi configure.in configure.man \ GDB_SUPPORT_DIRS= bfd include libiberty mmalloc opcodes readline glob sim GDB_SUPPORT_FILES= $(GDB_SUPPORT_DIRS) -setup-dirs: force +setup-dirs-gdb: force ./configure sun4 $(MAKE) clean ./configure -rm sun4 chmod og=u `find etc $(DEVO_SUPPORT) $(GDB_SUPPORT_FILES) -print` -gdb.tar.Z: setup-dirs +gdb.tar.Z: setup-dirs-gdb (cd gdb; $(MAKE) -f Makefile.in make-proto-gdb.dir BISON="byacc") $(MAKE) $(MFLAGS) -f Makefile.in make-gdb.tar.Z @@ -1628,8 +1629,8 @@ make-gdb.tar.Z: $(DEVO_SUPPORT) $(GDB_SUPPORT_DIRS) gdb texinfo/texinfo.tex rm proto-toplev/Makefile.in sed -e '/^all\.normal: /s/\all-texinfo //' \ -e '/^ install-texinfo /d' \ - -e '\/^BISON =/,\/^$$/c\ - BISON = bison -y' \ + -e '/^BISON = /,/^$$/d' \ + -e '/^# BISON:/s/.*/BISON = bison -y/' \ proto-toplev/Makefile.in mkdir proto-toplev/texinfo @@ -1643,4 +1644,70 @@ make-gdb.tar.Z: $(DEVO_SUPPORT) $(GDB_SUPPORT_DIRS) gdb texinfo/texinfo.tex | compress -v >gdb-$$VER.tar.Z) $(GZIP) -d gdb-$$VER.tar.z +# When you use `make setup-dirs' or `make taz' you should always redefine +# this macro. +SUPPORT_FILES = list-of-support-files-for-tool-in-question +# Directories that might want `make proto-dir' run. +PROTODIRS= gdb + +setup-dirs: force + ./configure sun4 + $(MAKE) clean + ./configure -rm sun4 + chmod og=u `find etc $(DEVO_SUPPORT) $(SUPPORT_FILES) -print` + for d in .. $(PROTODIRS) ; do \ + if [ $$d != ".." ] && [ -d $$d ]; then \ + (cd $$d ; $(MAKE) -f Makefile.in proto-dir) ; \ + else true ; fi ; \ + done + +taz: $(DEVO_SUPPORT) $(SUPPORT_FILES) texinfo/texinfo.tex + rm -rf proto-toplev; mkdir proto-toplev + for d in .. $(PROTODIRS) ; do \ + if [ $$d != .. ]; then \ + if [ -d $$d ]; then \ + ln -s ../$$d/proto-$$d.dir proto-toplev/$$d ; \ + else true ; fi ; \ + else true ; fi ; \ + done + (cd proto-toplev; for i in $(DEVO_SUPPORT) $(SUPPORT_FILES); do \ + if [ ! -d $$i ]; then ln -s ../$$i . ; else true ; fi ; \ + done) + mkdir proto-toplev/etc + (cd proto-toplev/etc; for i in $(ETC_SUPPORT); do \ + ln -s ../../etc/$$i . ; \ + done) + # Put only one copy (four hard links) of COPYING in the tar file. + ## FIX ME LATER + + # Take out texinfo and glob from configurable dirs + rm proto-toplev/configure.in + sed -e '/^host_tools=/s/texinfo //' \ + -e '/^host_libs=/s/glob //' \ + proto-toplev/configure.in + + # Take out texinfo from a few places; make simple BISON=bison line. + rm proto-toplev/Makefile.in + sed -e '/^all\.normal: /s/\all-texinfo //' \ + -e '/^ install-texinfo /d' \ + -e '/^BISON = /,/^$$/d' \ + -e '/^# BISON:/s/.*/BISON = bison -y/' \ + proto-toplev/Makefile.in + + mkdir proto-toplev/texinfo + ln -s ../../texinfo/texinfo.tex proto-toplev/texinfo/ + ln -s ../../texinfo/tex3patch proto-toplev/texinfo/ + chmod og=u `find proto-toplev -print` + (VER=`sed <$(TOOL)/Makefile.in -n 's/VERSION *= *//p'`; \ + echo "==> Making $(TOOL)-$$VER.tar.z"; \ + ln -s proto-toplev $(TOOL)-$$VER; \ + tar cfh - $(TOOL)-$$VER \ + | $(GZIP) -v >$(TOOL)-$$VER.tar.z) + +GAS_SUPPORT_DIRS= bfd include libiberty opcodes + +gas.tar.z: $(DEVO_SUPPORT) $(GAS_SUPPORT_DIRS) gas texinfo/texinfo.tex + $(MAKE) -f Makefile.in setup-dirs SUPPORT_FILES="$(GAS_SUPPORT_DIRS)" + $(MAKE) -f Makefile.in taz SUPPORT_FILES="$(GAS_SUPPORT_DIRS)" TOOL=gas + # end of Makefile.in -- 2.7.4