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 ; \
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
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/' \
<Makefile.in >proto-toplev/Makefile.in
mkdir proto-toplev/texinfo
| compress -v >gdb-$$VER.tar.Z)
$(GZIP) -d <gdb-$$VER.tar.Z | $(GZIP) -9 -v >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 //' \
+ <configure.in >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/' \
+ <Makefile.in >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