home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / libg++-2.7.1-base.tgz / libg++-2.7.1-src.tar / fsf / libg++ / Makefile.in < prev    next >
Makefile  |  1995-11-12  |  37KB  |  1,260 lines

  1. #
  2. # Makefile for directory with subdirs to build.
  3. #   Copyright (C) 1990, 1991, 1992, 1993 Free Software Foundation
  4. #
  5. # This file is free software; you can redistribute it and/or modify
  6. # it under the terms of the GNU General Public License as published by
  7. # the Free Software Foundation; either version 2 of the License, or
  8. # (at your option) any later version.
  9. # This program is distributed in the hope that it will be useful,
  10. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12. # GNU General Public License for more details.
  13. # You should have received a copy of the GNU General Public License
  14. # along with this program; if not, write to the Free Software
  15. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
  16. #
  17.  
  18. srcdir = .
  19.  
  20. prefix = /usr/local
  21.  
  22. exec_prefix = $(prefix)
  23. bindir = $(exec_prefix)/bin
  24. libdir = $(exec_prefix)/lib
  25. tooldir = $(exec_prefix)/$(target)
  26.  
  27. program_transform_name =
  28.  
  29. datadir = $(prefix)/lib
  30. mandir = $(prefix)/man
  31. man1dir = $(mandir)/man1
  32. man2dir = $(mandir)/man2
  33. man3dir = $(mandir)/man3
  34. man4dir = $(mandir)/man4
  35. man5dir = $(mandir)/man5
  36. man6dir = $(mandir)/man6
  37. man7dir = $(mandir)/man7
  38. man8dir = $(mandir)/man8
  39. man9dir = $(mandir)/man9
  40. infodir = $(prefix)/info
  41. includedir = $(prefix)/include
  42. docdir = $(datadir)/doc
  43. GDB_NLM_DEPS = 
  44.  
  45. SHELL = /bin/sh
  46.  
  47. INSTALL = $${srcroot}/install.sh -c
  48. INSTALL_PROGRAM = $(INSTALL)
  49. INSTALL_DATA = $(INSTALL) -m 644
  50. INSTALL_XFORM = $(INSTALL) -t='$(program_transform_name)'
  51.  
  52. INSTALL_DOSREL = install-dosrel-fake
  53.  
  54. AS = as
  55. AR = ar
  56. AR_FLAGS = rc
  57. CC = cc
  58.  
  59. # Special variables passed down in EXTRA_GCC_FLAGS.  They are defined
  60. # here so that they can be overridden by Makefile fragments.
  61. HOST_CC = $(CC_FOR_BUILD)
  62. HOST_PREFIX = 
  63. HOST_PREFIX_1 = loser-
  64.  
  65. # We don't specify -g -O because many compilers don't support -g -O,
  66. # and/or -O is broken in and of itself.
  67. CFLAGS = -g
  68. LIBCFLAGS = $(CFLAGS)
  69. CFLAGS_FOR_TARGET = $(CFLAGS)
  70. LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
  71. PICFLAG = 
  72. PICFLAG_FOR_TARGET = 
  73.  
  74. CXX = gcc
  75.  
  76. # Use -O2 to stress test the compiler.
  77. CXXFLAGS = -g -O2
  78. LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
  79. CXXFLAGS_FOR_TARGET = $(CXXFLAGS)
  80. LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
  81.  
  82. RANLIB = ranlib
  83. NM = nm
  84. # Not plain GZIP, since gzip looks there for extra command-line options.
  85. GZIPPROG = gzip
  86.  
  87. BISON = bison -y
  88. LEX = `if [ -f $$r/flex/flex ] ; \
  89.     then echo $$r/flex/flex ; \
  90.     else echo flex ; fi`
  91.  
  92. M4 = `if [ -f $$r/m4/m4 ] ; \
  93.     then echo $$r/m4/m4 ; \
  94.     else echo m4 ; fi`
  95.  
  96. MAKEINFO = `if [ -f $$r/texinfo/makeinfo/makeinfo ] ; \
  97.     then echo $$r/texinfo/makeinfo/makeinfo ; \
  98.     else echo makeinfo ; fi`
  99.  
  100. # This just becomes part of the MAKEINFO definition passed down to
  101. # sub-makes.  It lets flags be given on the command line while still
  102. # using the makeinfo from the object tree.
  103. MAKEINFOFLAGS =
  104.  
  105. EXPECT = `if [ -f $$r/expect/expect ] ; \
  106.     then echo $$r/expect/expect ; \
  107.     else echo expect ; fi`
  108.  
  109. RUNTEST = `if [ -f $${srcroot}/dejagnu/runtest ] ; \
  110.     then echo $${srcroot}/dejagnu/runtest ; \
  111.     else echo runtest ; fi`
  112.  
  113.  
  114. # compilers to use to create programs which must be run in the build
  115. # environment.
  116. CC_FOR_BUILD = $(CC)
  117. CXX_FOR_BUILD = $(CXX)
  118.  
  119. SUBDIRS = "this is set via configure, don't edit this"
  120. OTHERS = 
  121.  
  122. # This is set by the configure script to the list of directories which
  123. # should be built using the target tools.
  124. TARGET_CONFIGDIRS = libiberty libgloss newlib libio librx libstdc++ libg++ winsup
  125.  
  126. # Target libraries are put under this directory:
  127. TARGET_SUBDIR = . # Changed by configure to $(target_alias) if cross.
  128.  
  129. # This is set by the configure script to the arguments passed to configure.
  130. CONFIG_ARGUMENTS = 
  131.  
  132. ALL = all.normal
  133. INSTALL_TARGET = install-dirs \
  134.     $(INSTALL_MODULES) \
  135.     $(INSTALL_TARGET_MODULES) \
  136.     $(INSTALL_X11_MODULES) \
  137.     install-gcc \
  138.     $(INSTALL_DOSREL)
  139.  
  140.  
  141. CC_FOR_TARGET = ` \
  142.   if [ -f $$r/gcc/Makefile ] ; then \
  143.     if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \
  144.       echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $${srcroot}/newlib/libc/include -nostdinc; \
  145.     else \
  146.       echo $$r/gcc/xgcc -B$$r/gcc/; \
  147.     fi; \
  148.   else \
  149.     if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
  150.       echo $(CC); \
  151.     else \
  152.       t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \
  153.     fi; \
  154.   fi`
  155.  
  156.  
  157. CXX_FOR_TARGET = ` \
  158.   if [ -f $$r/gcc/Makefile ] ; then \
  159.     if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \
  160.       echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $${srcroot}/newlib/libc/include -nostdinc; \
  161.     else \
  162.       echo $$r/gcc/xgcc -B$$r/gcc/; \
  163.     fi; \
  164.   else \
  165.     if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
  166.       echo $(CXX); \
  167.     else \
  168.       t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \
  169.     fi; \
  170.   fi`
  171.  
  172. AS_FOR_TARGET = ` \
  173.   if [ -f $$r/gas/as.new ] ; then \
  174.     echo $$r/gas/as.new ; \
  175.   else \
  176.     if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
  177.       echo $(AS); \
  178.     else \
  179.        t='$(program_transform_name)'; echo as | sed -e 's/x/x/' $$t ; \
  180.     fi; \
  181.   fi`
  182.  
  183. LD_FOR_TARGET = ` \
  184.   if [ -f $$r/ld/ld.new ] ; then \
  185.     echo $$r/ld/ld.new ; \
  186.   else \
  187.     if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
  188.       echo $(LD); \
  189.     else \
  190.        t='$(program_transform_name)'; echo ld | sed -e 's/x/x/' $$t ; \
  191.     fi; \
  192.   fi`
  193.  
  194. DLLTOOL_FOR_TARGET = ` \
  195.   if [ -f $$r/binutils/dlltool ] ; then \
  196.     echo $$r/binutils/dlltool ; \
  197.   else \
  198.     if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
  199.       echo $(DLLTOOL); \
  200.     else \
  201.        t='$(program_transform_name)'; echo dlltool | sed -e 's/x/x/' $$t ; \
  202.     fi; \
  203.   fi`
  204.  
  205. AR_FOR_TARGET = ` \
  206.   if [ -f $$r/binutils/ar ] ; then \
  207.     echo $$r/binutils/ar ; \
  208.   else \
  209.     if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
  210.       echo $(AR); \
  211.     else \
  212.        t='$(program_transform_name)'; echo ar | sed -e 's/x/x/' $$t ; \
  213.     fi; \
  214.   fi`
  215.  
  216. RANLIB_FOR_TARGET = ` \
  217.   if [ -f $$r/binutils/ranlib ] ; then \
  218.     echo $$r/binutils/ranlib ; \
  219.   else \
  220.     if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
  221.       echo $(RANLIB); \
  222.     else \
  223.        t='$(program_transform_name)'; echo ranlib | sed -e 's/x/x/' $$t ; \
  224.     fi; \
  225.   fi`
  226.  
  227. NM_FOR_TARGET = ` \
  228.   if [ -f $$r/binutils/nm.new ] ; then \
  229.     echo $$r/binutils/nm.new ; \
  230.   else \
  231.     if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
  232.       echo $(NM); \
  233.     else \
  234.        t='$(program_transform_name)'; echo nm | sed -e 's/x/x/' $$t ; \
  235.     fi; \
  236.   fi`
  237.  
  238. #### host and target specific makefile fragments come in here.
  239. ###
  240.  
  241. # Flags to pass down to all sub-makes.
  242. # Please keep these in alphabetical order.
  243. BASE_FLAGS_TO_PASS = \
  244.     "AR_FLAGS=$(AR_FLAGS)" \
  245.     "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
  246.     "AS_FOR_TARGET=$(AS_FOR_TARGET)" \
  247.     "BISON=$(BISON)" \
  248.     "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
  249.     "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
  250.     "CFLAGS=$(CFLAGS)" \
  251.     "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
  252.     "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
  253.     "CXXFLAGS=$(CXXFLAGS)" \
  254.     "CXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET)" \
  255.     "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
  256.     "DLLTOOL_FOR_TARGET=$(DLLTOOL_FOR_TARGET)" \
  257.     "GCC_FOR_TARGET=$(CC_FOR_TARGET)" \
  258.     "INSTALL=$(INSTALL)" \
  259.     "INSTALL_DATA=$(INSTALL_DATA)" \
  260.     "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
  261.     "INSTALL_XFORM=$(INSTALL_XFORM)" \
  262.     "LDFLAGS=$(LDFLAGS)" \
  263.     "LEX=$(LEX)" \
  264.     "LD_FOR_TARGET=$(LD_FOR_TARGET)" \
  265.     "LIBCFLAGS=$(LIBCFLAGS)" \
  266.     "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
  267.     "LIBCXXFLAGS=$(LIBCXXFLAGS)" \
  268.     "LIBCXXFLAGS_FOR_TARGET=$(LIBCXXFLAGS_FOR_TARGET)" \
  269.     "M4=$(M4)" \
  270.     "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
  271.     "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
  272.     "PICFLAG=$(PICFLAG)" \
  273.     "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
  274.     "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
  275.     "SHELL=$(SHELL)" \
  276.     "EXPECT=$(EXPECT)" \
  277.     "RUNTEST=$(RUNTEST)" \
  278.     "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
  279.     "YACC=$(BISON)" \
  280.     "exec_prefix=$(exec_prefix)" \
  281.     "prefix=$(prefix)" \
  282.     "tooldir=$(tooldir)" 
  283.  
  284. # Flags to pass down to most sub-makes, in which we're building with
  285. # the host environment.
  286. # If any variables are added here, they must be added to do-*, below.
  287. EXTRA_HOST_FLAGS = \
  288.     'AR=$(AR)' \
  289.     'AS=$(AS)' \
  290.     'CC=$(CC)' \
  291.     'CXX=$(CXX)' \
  292.     'NM=$(NM)' \
  293.     'RANLIB=$(RANLIB)'
  294.  
  295. FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)
  296.  
  297. # Flags that are concerned with the location of the X11 include files
  298. # and library files
  299. #
  300. # NOTE: until the top-level is getting the values via autoconf, it only
  301. # causes problems to have this top-level Makefile overriding the autoconf-set
  302. # values in child directories.  Only variables that don't conflict with
  303. # autoconf'ed ones should be passed by X11_FLAGS_TO_PASS for now.
  304. #
  305. X11_FLAGS_TO_PASS = \
  306.     'X11_EXTRA_CFLAGS=$(X11_EXTRA_CFLAGS)' \
  307.     'X11_EXTRA_LIBS=$(X11_EXTRA_LIBS)'
  308.  
  309. # Flags to pass down to makes which are built with the target environment.
  310. # The double $ decreases the length of the command line; the variables
  311. # are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them.
  312. # If any variables are added here, they must be added to do-*, below.
  313. EXTRA_TARGET_FLAGS = \
  314.     'AR=$$(AR_FOR_TARGET)' \
  315.     'AS=$$(AS_FOR_TARGET)' \
  316.     'CC=$$(CC_FOR_TARGET)' \
  317.     'CFLAGS=$$(CFLAGS_FOR_TARGET)' \
  318.     'CXX=$$(CXX_FOR_TARGET)' \
  319.     'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \
  320.     'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
  321.     'LD=$$(LD_FOR_TARGET)' \
  322.     'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
  323.     'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \
  324.     'NM=$$(NM_FOR_TARGET)' \
  325.     'PICFLAG=$$(PICFLAG_FOR_TARGET)' \
  326.     'RANLIB=$$(RANLIB_FOR_TARGET)'
  327.  
  328. TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS)
  329.  
  330. # Flags to pass down to gcc.  gcc builds a library, libgcc.a, so it
  331. # unfortunately needs the native compiler and the target ar and
  332. # ranlib.
  333. # If any variables are added here, they must be added to do-*, below.
  334. # The HOST_* variables are a special case, which are used for the gcc
  335. # cross-building scheme.
  336. EXTRA_GCC_FLAGS = \
  337.     'AR=$$(AR_FOR_TARGET)' \
  338.     'AS=$(AS)' \
  339.     'CC=$(CC)' \
  340.     'CXX=$(CXX)' \
  341.     'HOST_CC=$(CC_FOR_BUILD)' \
  342.     'HOST_PREFIX=$(HOST_PREFIX)' \
  343.     'HOST_PREFIX_1=$(HOST_PREFIX_1)' \
  344.     'NM=$(NM)' \
  345.     'RANLIB=$$(RANLIB_FOR_TARGET)'
  346.  
  347. GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS)
  348.  
  349. # This is a list of the targets for all of the modules which are compiled
  350. # using $(FLAGS_TO_PASS).
  351. ALL_MODULES = \
  352.     all-autoconf \
  353.     all-bfd \
  354.     all-binutils \
  355.     all-byacc \
  356.     all-cvs \
  357.     all-dejagnu \
  358.     all-diff \
  359.     all-dosutils \
  360.     all-etc \
  361.     all-fileutils \
  362.     all-find \
  363.     all-flex \
  364.     all-gas \
  365.     all-gawk \
  366.     all-gprof \
  367.     all-grep \
  368.     all-gzip \
  369.     all-hello \
  370.     all-indent \
  371.     all-ispell \
  372.     all-ld \
  373.     all-libiberty \
  374.     all-m4 \
  375.     all-make \
  376.     all-mmalloc \
  377.     all-opcodes \
  378.     all-patch \
  379.     all-prms \
  380.     all-rcs \
  381.     all-readline \
  382.     all-release \
  383.     all-recode \
  384.     all-sed \
  385.     all-send-pr \
  386.     all-shellutils \
  387.     all-sim \
  388.     all-tar \
  389.     all-tcl \
  390.     all-texinfo \
  391.     all-textutils \
  392.     all-tgas \
  393.     all-time \
  394.     all-uudecode \
  395.     all-wdiff 
  396.  
  397. # This is a list of the check targets for all of the modules which are
  398. # compiled using $(FLAGS_TO_PASS).
  399. # This is a list of the check targets for all of the modules which are
  400. # compiled using $(FLAGS_TO_PASS).
  401. #
  402. # The list is in two parts.  The first lists those tools which
  403. # are tested as part of the host's native tool-chain, and not
  404. # tested in a cross configuration.
  405. NATIVE_CHECK_MODULES = \
  406.     check-byacc \
  407.     check-flex
  408.  
  409. CROSS_CHECK_MODULES = \
  410.     check-autoconf \
  411.     check-bfd \
  412.     check-binutils \
  413.     check-cvs \
  414.     check-dejagnu \
  415.     check-diff \
  416.     check-etc \
  417.     check-fileutils \
  418.     check-find \
  419.     check-gas \
  420.     check-gawk \
  421.     check-gprof \
  422.     check-grep \
  423.     check-gzip \
  424.     check-hello \
  425.     check-indent \
  426.     check-ispell \
  427.     check-ld \
  428.     check-libiberty \
  429.     check-m4 \
  430.     check-make \
  431.     check-mmcheckoc \
  432.     check-opcodes \
  433.     check-patch \
  434.     check-prms \
  435.     check-rcs \
  436.     check-readline \
  437.     check-recode \
  438.     check-sed \
  439.     check-send-pr \
  440.     check-shellutils \
  441.     check-sim \
  442.     check-tar \
  443.     check-tcl \
  444.     check-texinfo \
  445.     check-textutils \
  446.     check-tgas \
  447.     check-time \
  448.     check-uudecode \
  449.     check-wdiff
  450.  
  451. CHECK_MODULES=$(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES)
  452.  
  453. # This is a list of the install targets for all of the modules which are
  454. # compiled using $(FLAGS_TO_PASS).
  455. INSTALL_MODULES = \
  456.     install-autoconf \
  457.     install-bfd \
  458.     install-binutils \
  459.     install-byacc \
  460.     install-cvs \
  461.     install-dejagnu \
  462.     install-diff \
  463.     install-dosutils \
  464.     install-etc \
  465.     install-fileutils \
  466.     install-find \
  467.     install-flex \
  468.     install-gas \
  469.     install-gawk \
  470.     install-gprof \
  471.     install-grep \
  472.     install-gzip \
  473.     install-hello \
  474.     install-indent \
  475.     install-ispell \
  476.     install-ld \
  477.     install-libiberty \
  478.     install-m4 \
  479.     install-make \
  480.     install-mmalloc \
  481.     install-opcodes \
  482.     install-patch \
  483.     install-prms \
  484.     install-rcs \
  485.     install-readline \
  486.     install-recode \
  487.     install-sed \
  488.     install-send-pr \
  489.     install-shellutils \
  490.     install-sim \
  491.     install-tar \
  492.     install-tcl \
  493.     install-textutils \
  494.     install-tgas \
  495.     install-time \
  496.     install-uudecode \
  497.     install-wdiff
  498.  
  499. # This is a list of the targets for all of the modules which are compiled
  500. # using $(X11_FLAGS_TO_PASS).
  501. ALL_X11_MODULES = \
  502.     all-emacs \
  503.     all-emacs19 \
  504.     all-gdb \
  505.     all-expect \
  506.     all-gash \
  507.     all-tclX \
  508.     all-tk
  509.  
  510. # This is a list of the check targets for all of the modules which are
  511. # compiled using $(X11_FLAGS_TO_PASS).
  512. CHECK_X11_MODULES = \
  513.     check-emacs \
  514.     check-gdb \
  515.     check-expect \
  516.     check-gash \
  517.     check-tclX \
  518.     check-tk
  519.  
  520. # This is a list of the install targets for all the modules which are
  521. # compiled using $(X11_FLAGS_TO_PASS).
  522. INSTALL_X11_MODULES = \
  523.     install-emacs \
  524.     install-emacs19 \
  525.     install-gdb \
  526.     install-expect \
  527.     install-gash \
  528.     install-tclX \
  529.     install-tk
  530.  
  531. # This is a list of the targets for all of the modules which are compiled
  532. # using $(TARGET_FLAGS_TO_PASS).
  533. ALL_TARGET_MODULES = \
  534.     all-target-libio \
  535.     all-target-libstdc++ \
  536.     all-target-librx \
  537.     all-target-libg++ \
  538.     all-target-newlib \
  539.     all-target-winsup \
  540.     all-target-libgloss \
  541.     all-target-libiberty
  542.  
  543. # This is a list of the configure targets for all of the modules which
  544. # are compiled using the target tools.
  545. CONFIGURE_TARGET_MODULES = \
  546.     configure-target-libio \
  547.     configure-target-libstdc++ \
  548.     configure-target-librx \
  549.     configure-target-libg++ \
  550.     configure-target-newlib \
  551.     configure-target-winsup \
  552.     configure-target-libgloss \
  553.     configure-target-libiberty
  554.  
  555. # This is a list of the check targets for all of the modules which are
  556. # compiled using $(TARGET_FLAGS_TO_PASS).
  557. CHECK_TARGET_MODULES = \
  558.     check-target-libio \
  559.     check-target-libstdc++ \
  560.     check-target-libg++ \
  561.     check-target-newlib \
  562.     check-target-winsup \
  563.     check-target-libiberty
  564.  
  565. # This is a list of the install targets for all of the modules which are
  566. # compiled using $(TARGET_FLAGS_TO_PASS).
  567. INSTALL_TARGET_MODULES = \
  568.     install-target-libio \
  569.     install-target-libstdc++ \
  570.     install-target-libg++ \
  571.     install-target-newlib \
  572.     install-target-winsup \
  573.     install-target-libgloss \
  574.     install-target-libiberty
  575.  
  576. # The first rule in the file had better be this one.  Don't put any above it.
  577. all: all.normal
  578. .PHONY: all
  579.  
  580. # The target built for a native build.
  581. .PHONY: all.normal
  582. all.normal: \
  583.     $(ALL_MODULES) \
  584.     $(ALL_TARGET_MODULES) \
  585.     $(ALL_X11_MODULES) \
  586.     all-gcc
  587.  
  588. # Do a target for all the subdirectories.  A ``make do-X'' will do a
  589. # ``make X'' in all subdirectories (because, in general, there is a
  590. # dependency (below) of X upon do-X, a ``make X'' will also do this,
  591. # but it may do additional work as well).
  592. # This target ensures that $(BASE_FLAGS_TO_PASS) appears only once,
  593. # because it is so large that it can easily overflow the command line
  594. # length limit on some systems.
  595. DO_X = \
  596.     do-clean \
  597.     do-distclean \
  598.     do-dvi \
  599.     do-info \
  600.     do-install-info \
  601.     do-installcheck \
  602.     do-mostlyclean \
  603.     do-maintainer-clean \
  604.     do-TAGS
  605. .PHONY: $(DO_X)
  606. $(DO_X):
  607.     @target=`echo $@ | sed -e 's/^do-//'`; \
  608.     r=`pwd`; export r; \
  609.     srcroot=`cd $(srcdir); pwd`; export srcroot; \
  610.     for i in $(SUBDIRS) -dummy-; do \
  611.       if [ -f ./$$i/Makefile ]; then \
  612.         case $$i in \
  613.         gcc) \
  614.           for flag in $(EXTRA_GCC_FLAGS); do \
  615.         eval `echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \
  616.           done; \
  617.           ;; \
  618.         *) \
  619.           for flag in $(EXTRA_HOST_FLAGS); do \
  620.         eval `echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \
  621.           done; \
  622.           ;; \
  623.         esac ; \
  624.         export AR AS CC CXX NM RANLIB; \
  625.         if (cd ./$$i; \
  626.             $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
  627.             "CC=$${CC}" "CXX=$${CXX}" "NM=$${NM}" \
  628.             "RANLIB=$${RANLIB}" \
  629.             $${target}); \
  630.         then true; else exit 1; fi; \
  631.       else true; fi; \
  632.     done
  633.     @target=`echo $@ | sed -e 's/^do-//'`; \
  634.     r=`pwd`; export r; \
  635.     srcroot=`cd $(srcdir); pwd`; export srcroot; \
  636.     for i in $(TARGET_CONFIGDIRS) -dummy-; do \
  637.       if [ -f $(TARGET_SUBDIR)/$$i/Makefile ]; then \
  638.         for flag in $(EXTRA_TARGET_FLAGS); do \
  639.         eval `echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \
  640.         done; \
  641.         export AR AS CC CXX NM RANLIB; \
  642.         if (cd $(TARGET_SUBDIR)/$$i; \
  643.             $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
  644.             "CC=$${CC}" "CXX=$${CXX}" "NM=$${NM}" \
  645.             "RANLIB=$${RANLIB}" \
  646.             $${target}); \
  647.         then true; else exit 1; fi; \
  648.       else true; fi; \
  649.     done
  650.  
  651. # Here are the targets which correspond to the do-X targets.
  652.  
  653. .PHONY: info installcheck dvi install-info
  654. .PHONY: clean distclean mostlyclean maintainer-clean realclean
  655. .PHONY: local-clean local-distclean local-maintainer-clean
  656. info: do-info
  657. installcheck: do-installcheck
  658. dvi: do-dvi
  659.  
  660. install-info: do-install-info dir.info
  661.     srcroot=`cd $(srcdir); pwd`; export srcroot; \
  662.     if [ -f dir.info ] ; then \
  663.       $(INSTALL_DATA) dir.info $(infodir)/dir.info ; \
  664.     else true ; fi
  665.  
  666. local-clean:
  667.     -rm -f *.a TEMP errs core *.o *~ \#* TAGS *.E
  668.  
  669. local-distclean:
  670.     -rm -f Makefile config.status
  671.  
  672. local-maintainer-clean:
  673.     @echo "This command is intended for maintainers to use;"
  674.     @echo "it deletes files that may require special tools to rebuild."
  675.  
  676. clean: do-clean local-clean
  677. mostlyclean: do-mostlyclean local-clean
  678. distclean: do-distclean local-clean local-distclean
  679. maintainer-clean: local-maintainer-clean do-maintainer-clean local-clean 
  680. maintainer-clean: local-distclean
  681. realclean: maintainer-clean
  682.  
  683. # Check target.
  684.  
  685. .PHONY: check
  686. check: $(CHECK_MODULES) \
  687.     $(CHECK_TARGET_MODULES) \
  688.     $(CHECK_X11_MODULES) \
  689.     check-gcc
  690.  
  691. # Installation targets.
  692.  
  693. .PHONY: install uninstall source-vault binary-vault vault-install
  694. install: $(INSTALL_TARGET) 
  695.  
  696. uninstall:
  697.     @echo "the uninstall target is not supported in this tree"
  698.  
  699. source-vault:
  700.     $(MAKE) -f ./release/Build-A-Release \
  701.         host=$(host_alias) source-vault
  702.  
  703. binary-vault:
  704.     $(MAKE) -f ./release/Build-A-Release \
  705.         host=$(host_alias) target=$(target_alias)
  706.  
  707. vault-install:
  708.     @if [ -f ./release/vault-install ] ; then \
  709.       ./release/vault-install $(host_alias) $(target_alias) ; \
  710.     else \
  711.       true ; \
  712.     fi
  713.  
  714. .PHONY: install.all
  715. install.all: install-no-fixedincludes
  716.     @if [ -f ./gcc/Makefile ] ; then \
  717.         r=`pwd` ; export r ; \
  718.         (cd ./gcc; \
  719.         $(MAKE) $(FLAGS_TO_PASS) install-headers) ; \
  720.     else \
  721.         true ; \
  722.     fi
  723.  
  724. # install-no-fixedincludes is used because Cygnus can not distribute
  725. # the fixed header files.
  726. .PHONY: install-no-fixedincludes
  727. install-no-fixedincludes: \
  728.     install-dirs \
  729.     $(INSTALL_MODULES) \
  730.     $(INSTALL_TARGET_MODULES) \
  731.     $(INSTALL_X11_MODULES) \
  732.     gcc-no-fixedincludes 
  733.  
  734. # Install the gcc headers files, but not the fixed include files,
  735. # which Cygnus is not allowed to distribute.  This rule is very
  736. # dependent on the workings of the gcc Makefile.in.
  737. .PHONY: gcc-no-fixedincludes
  738. gcc-no-fixedincludes:
  739.     @if [ -f ./gcc/Makefile ]; then \
  740.       rm -rf gcc/tmp-include; \
  741.       mv gcc/include gcc/tmp-include 2>/dev/null; \
  742.       mkdir gcc/include; \
  743.       cp $(srcdir)/gcc/gsyslimits.h gcc/include/syslimits.h; \
  744.       touch gcc/stmp-fixinc gcc/include/fixed; \
  745.       rm -f gcc/stmp-headers gcc/stmp-int-hdrs; \
  746.       r=`pwd`; export r; \
  747.       srcroot=`cd $(srcdir); pwd` ; export srcroot; \
  748.       (cd ./gcc; \
  749.        $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
  750.       rm -rf gcc/include; \
  751.       mv gcc/tmp-include gcc/include 2>/dev/null; \
  752.     else true; fi
  753.  
  754. # This rule is used to build the modules which use FLAGS_TO_PASS.  To
  755. # build a target all-X means to cd to X and make all.
  756. #
  757. # all-gui, and all-libproc are handled specially because
  758. # they are still experimental, and if they fail to build, that
  759. # shouldn't stop "make all".
  760. .PHONY: $(ALL_MODULES) all-gui all-libproc
  761. $(ALL_MODULES) all-gui all-libproc:
  762.     @dir=`echo $@ | sed -e 's/all-//'`; \
  763.     if [ -f ./$${dir}/Makefile ] ; then \
  764.       r=`pwd`; export r; \
  765.       srcroot=`cd $(srcdir); pwd`; export srcroot; \
  766.       (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) all); \
  767.     else \
  768.       true; \
  769.     fi
  770.  
  771. # These rules are used to check the modules which use FLAGS_TO_PASS.
  772. # To build a target check-X means to cd to X and make check.  Some
  773. # modules are only tested in a native toolchain.
  774.  
  775. .PHONY: $(CHECK_MODULES) $(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES)
  776. $(NATIVE_CHECK_MODULES):
  777.     @if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
  778.       dir=`echo $@ | sed -e 's/check-//'`; \
  779.       if [ -f ./$${dir}/Makefile ] ; then \
  780.         r=`pwd`; export r; \
  781.         srcroot=`cd $(srcdir); pwd`; export srcroot; \
  782.         (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \
  783.       else \
  784.         true; \
  785.       fi; \
  786.     fi
  787.  
  788. $(CROSS_CHECK_MODULES):
  789.     @dir=`echo $@ | sed -e 's/check-//'`; \
  790.     if [ -f ./$${dir}/Makefile ] ; then \
  791.       r=`pwd`; export r; \
  792.       srcroot=`cd $(srcdir); pwd`; export srcroot; \
  793.       (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \
  794.     else \
  795.       true; \
  796.     fi
  797.  
  798. # This rule is used to install the modules which use FLAGS_TO_PASS.
  799. # To build a target install-X means to cd to X and make install.
  800. .PHONY: $(INSTALL_MODULES)
  801. $(INSTALL_MODULES): install-dirs
  802.     @dir=`echo $@ | sed -e 's/install-//'`; \
  803.     if [ -f ./$${dir}/Makefile ] ; then \
  804.       r=`pwd`; export r; \
  805.       srcroot=`cd $(srcdir); pwd`; export srcroot; \
  806.       (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \
  807.     else \
  808.       true; \
  809.     fi
  810.  
  811. # This rule is used to configure the modules which are built with the
  812. # target tools.
  813. .PHONY: $(CONFIGURE_TARGET_MODULES)
  814. $(CONFIGURE_TARGET_MODULES):
  815.     @dir=`echo $@ | sed -e 's/configure-target-//'`; \
  816.     if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
  817.       true; \
  818.     elif echo " $(TARGET_CONFIGDIRS) " | grep " $${dir} " >/dev/null 2>&1; then \
  819.       if [ -d $(srcdir)/$${dir} ]; then \
  820.         [ -d $(TARGET_SUBDIR)/$${dir} ] || mkdir $(TARGET_SUBDIR)/$${dir};\
  821.         r=`pwd`; export r; \
  822.         srcroot=`cd $(srcdir); pwd`; export srcroot; \
  823.         AR="$(AR_FOR_TARGET)"; export AR; \
  824.         AS="$(AS_FOR_TARGET)"; export AS; \
  825.         CC="$(CC_FOR_TARGET)"; export CC; \
  826.         CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
  827.         CXX="$(CXX_FOR_TARGET)"; export CXX; \
  828.         CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
  829.         LD="$(LD_FOR_TARGET)"; export LD; \
  830.         NM="$(NM_FOR_TARGET)"; export NM; \
  831.         RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
  832.         echo Configuring in $(TARGET_SUBDIR)/$${dir}; \
  833.         cd $(TARGET_SUBDIR)/$${dir}; \
  834.         if [ -f $${srcroot}/$${dir}/configure ] ; then \
  835.           $${srcroot}/$${dir}/configure \
  836.         $(CONFIG_ARGUMENTS) --srcdir=$${srcroot}/$${dir}; \
  837.         else \
  838.           $${srcroot}/configure \
  839.         $(CONFIG_ARGUMENTS) --srcdir=$${srcroot}/$${dir}; \
  840.         fi; \
  841.       else \
  842.         true; \
  843.       fi \
  844.     else \
  845.       true; \
  846.     fi
  847.  
  848. # This rule is used to build the modules which use TARGET_FLAGS_TO_PASS.
  849. # To build a target all-X means to cd to X and make all.
  850. .PHONY: $(ALL_TARGET_MODULES)
  851. $(ALL_TARGET_MODULES):
  852.     @dir=`echo $@ | sed -e 's/all-target-//'`; \
  853.     if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
  854.       r=`pwd`; export r; \
  855.       srcroot=`cd $(srcdir); pwd`; export srcroot; \
  856.       (cd $(TARGET_SUBDIR)/$${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) all); \
  857.     else \
  858.       true; \
  859.     fi
  860.  
  861. # This rule is used to check the modules which use TARGET_FLAGS_TO_PASS.
  862. # To build a target install-X means to cd to X and make install.
  863. .PHONY: $(CHECK_TARGET_MODULES)
  864. $(CHECK_TARGET_MODULES):
  865.     @dir=`echo $@ | sed -e 's/check-target-//'`; \
  866.     if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
  867.       r=`pwd`; export r; \
  868.       srcroot=`cd $(srcdir); pwd`; export srcroot; \
  869.       (cd $(TARGET_SUBDIR)/$${dir};$(MAKE) $(TARGET_FLAGS_TO_PASS) check);\
  870.     else \
  871.       true; \
  872.     fi
  873.  
  874. # This rule is used to install the modules which use
  875. # TARGET_FLAGS_TO_PASS.  To build a target install-X means to cd to X
  876. # and make install.
  877. .PHONY: $(INSTALL_TARGET_MODULES)
  878. $(INSTALL_TARGET_MODULES): install-dirs
  879.     @dir=`echo $@ | sed -e 's/install-target-//'`; \
  880.     if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
  881.       r=`pwd`; export r; \
  882.       srcroot=`cd $(srcdir); pwd`; export srcroot; \
  883.       (cd $(TARGET_SUBDIR)/$${dir}; \
  884.         $(MAKE) $(TARGET_FLAGS_TO_PASS) install); \
  885.     else \
  886.       true; \
  887.     fi
  888.  
  889. # This rule is used to build the modules which use X11_FLAGS_TO_PASS.
  890. # To build a target all-X means to cd to X and make all.
  891. .PHONY: $(ALL_X11_MODULES)
  892. $(ALL_X11_MODULES):
  893.     @dir=`echo $@ | sed -e 's/all-//'`; \
  894.     if [ -f ./$${dir}/Makefile ] ; then \
  895.       r=`pwd`; export r; \
  896.       srcroot=`cd $(srcdir); pwd`; export srcroot; \
  897.       (cd $${dir}; \
  898.        $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all); \
  899.     else \
  900.       true; \
  901.     fi
  902.  
  903. # This rule is used to check the modules which use X11_FLAGS_TO_PASS.
  904. # To build a target check-X means to cd to X and make all.
  905. .PHONY: $(CHECK_X11_MODULES)
  906. $(CHECK_X11_MODULES):
  907.     @dir=`echo $@ | sed -e 's/check-//'`; \
  908.     if [ -f ./$${dir}/Makefile ] ; then \
  909.       r=`pwd`; export r; \
  910.       srcroot=`cd $(srcdir); pwd`; export srcroot; \
  911.       (cd $${dir}; \
  912.        $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check); \
  913.     else \
  914.       true; \
  915.     fi
  916.  
  917. # This rule is used to install the modules which use X11_FLAGS_TO_PASS.
  918. # To build a target install-X means to cd to X and make install.
  919. .PHONY: $(INSTALL_X11_MODULES)
  920. $(INSTALL_X11_MODULES):
  921.     @dir=`echo $@ | sed -e 's/install-//'`; \
  922.     if [ -f ./$${dir}/Makefile ] ; then \
  923.       r=`pwd`; export r; \
  924.       srcroot=`cd $(srcdir); pwd`; export srcroot; \
  925.       (cd $${dir}; \
  926.        $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install); \
  927.     else \
  928.       true; \
  929.     fi
  930.  
  931. # gcc is the only module which uses GCC_FLAGS_TO_PASS.
  932. .PHONY: all-gcc
  933. all-gcc:
  934.     @if [ -f ./gcc/Makefile ] ; then \
  935.       r=`pwd`; export r; \
  936.       srcroot=`cd $(srcdir); pwd`; export srcroot; \
  937.       (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) all); \
  938.     else \
  939.       true; \
  940.     fi
  941.  
  942. .PHONY: check-gcc
  943. check-gcc:
  944.     @if [ -f ./gcc/Makefile ] ; then \
  945.       r=`pwd`; export r; \
  946.       srcroot=`cd $(srcdir); pwd`; export srcroot; \
  947.       (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) check); \
  948.     else \
  949.       true; \
  950.     fi
  951.  
  952. .PHONY: install-gcc
  953. install-gcc:
  954.     @if [ -f ./gcc/Makefile ] ; then \
  955.       r=`pwd`; export r; \
  956.       srcroot=`cd $(srcdir); pwd`; export srcroot; \
  957.       (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
  958.     else \
  959.       true; \
  960.     fi
  961.  
  962.  
  963. # EXPERIMENTAL STUFF
  964. # This rule is used to install the modules which use FLAGS_TO_PASS.
  965. # To build a target install-X means to cd to X and make install.
  966. .PHONY: install-dosrel
  967. install-dosrel: install-dirs info
  968.     @dir=`echo $@ | sed -e 's/install-//'`; \
  969.     if [ -f ./$${dir}/Makefile ] ; then \
  970.       r=`pwd`; export r; \
  971.       srcroot=`cd $(srcdir); pwd`; export srcroot; \
  972.       (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \
  973.     else \
  974.       true; \
  975.     fi
  976.  
  977. install-dosrel-fake:
  978.  
  979.  
  980. # This is a list of inter-dependencies among modules.
  981. all-autoconf: all-m4
  982. all-bfd:
  983. all-binutils: all-libiberty all-opcodes all-bfd all-flex all-byacc
  984. all-byacc:
  985. all-cvs:
  986. all-dejagnu: all-tcl all-expect all-tk
  987. all-diff: all-libiberty
  988. all-emacs:
  989. all-emacs19: all-byacc
  990. all-etc:
  991. all-expect: all-tcl all-tk
  992. all-fileutils: all-libiberty
  993. all-find:
  994. all-flex: all-libiberty all-byacc
  995. all-gas: all-libiberty all-opcodes all-bfd
  996. all-gash: all-tcl
  997. all-gawk:
  998. ALL_GCC = all-gcc
  999. all-gcc: all-libiberty all-byacc all-binutils all-gas all-ld
  1000. all-gdb: all-libiberty all-opcodes all-bfd all-mmalloc all-readline all-byacc all-sim $(gdbnlmrequirements)
  1001. all-gprof: all-libiberty all-bfd
  1002. all-grep: all-libiberty
  1003. all-gui: all-gdb all-libproc all-target-librx
  1004. all-gzip: all-libiberty
  1005. all-hello: all-libiberty
  1006. all-indent:
  1007. all-ispell: all-emacs19
  1008. all-ld: all-libiberty all-bfd all-byacc all-flex
  1009. configure-target-libg++: $(ALL_GCC)
  1010. all-target-libg++: configure-target-libg++ all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio all-target-librx all-target-libstdc++
  1011. configure-target-libgloss: $(ALL_GCC)
  1012. all-target-libgloss: configure-target-libgloss
  1013. configure-target-libio: $(ALL_GCC)
  1014. all-target-libio: configure-target-libio all-gas all-ld all-gcc all-target-libiberty all-target-newlib
  1015. all-libiberty:
  1016. configure-target-librx: $(ALL_GCC) configure-target-newlib
  1017. all-target-librx: configure-target-librx
  1018. configure-target-libstdc++: $(ALL_GCC)
  1019. all-target-libstdc++: configure-target-libstdc++ all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio
  1020. all-m4: all-libiberty
  1021. all-make: all-libiberty
  1022. all-mmalloc:
  1023. configure-target-newlib: $(ALL_GCC)
  1024. all-target-newlib: configure-target-newlib all-binutils all-gas all-gcc
  1025. all-opcodes: all-bfd
  1026. all-patch: all-libiberty
  1027. all-prms: all-libiberty
  1028. all-rcs:
  1029. all-readline:
  1030. all-recode: all-libiberty
  1031. all-sed: all-libiberty
  1032. all-send-pr: all-prms
  1033. all-shellutils:
  1034. all-sim: all-libiberty all-bfd
  1035. all-tar: all-libiberty
  1036. all-tcl:
  1037. all-tclX: all-tcl all-tk
  1038. all-tk: all-tcl
  1039. all-texinfo: all-libiberty
  1040. all-textutils:
  1041. all-tgas: all-libiberty all-bfd
  1042. all-time:
  1043. all-wdiff:
  1044. all-target-winsup: all-target-newlib  configure-target-winsup 
  1045. configure-target-winsup: configure-target-newlib
  1046. all-uudecode: all-libiberty
  1047. configure-target-libiberty: $(ALL_GCC)
  1048. all-target-libiberty: configure-target-libiberty all-gcc all-ld all-target-newlib
  1049.  
  1050. ### other supporting targets
  1051.  
  1052. MAKEDIRS= \
  1053.     $(prefix) \
  1054.     $(exec_prefix) \
  1055.     $(tooldir)
  1056.  
  1057. .PHONY: install-dirs
  1058. install-dirs:
  1059.     @for i in $(MAKEDIRS) ; do \
  1060.         echo Making $$i... ; \
  1061.         parent=`echo $$i | sed -e 's@/[^/]*$$@@' | sed -e 's@^$$@/@'`; \
  1062.         if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi ; \
  1063.         if [ ! -d $$i ] ; then \
  1064.             if mkdir $$i ; then \
  1065.                 true ; \
  1066.             else \
  1067.                 exit 1 ; \
  1068.             fi ; \
  1069.         else \
  1070.             true ; \
  1071.         fi ; \
  1072.     done
  1073.  
  1074.  
  1075. dir.info: do-install-info
  1076.     if [ -f $(srcdir)/texinfo/gen-info-dir ] ; then \
  1077.       $(srcdir)/texinfo/gen-info-dir $(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new ; \
  1078.       mv -f dir.info.new dir.info ; \
  1079.     else true ; \
  1080.     fi
  1081.  
  1082. dist:
  1083.     @echo "Building a full distribution of this tree isn't done"
  1084.     @echo "via 'make dist'.  Check out the etc/ subdirectory" 
  1085.  
  1086. etags tags: TAGS
  1087.  
  1088. # Right now this just builds TAGS in each subdirectory.  emacs19 has the
  1089. # ability to use several tags files at once, so there is probably no need
  1090. # to combine them into one big TAGS file (like CVS 1.3 does).  We could
  1091. # (if we felt like it) have this Makefile write a piece of elisp which
  1092. # the user could load to tell emacs19 where all the TAGS files we just
  1093. # built are.
  1094. TAGS: do-TAGS
  1095.  
  1096. # with the gnu make, this is done automatically.
  1097.  
  1098. Makefile: Makefile.in configure.in $(host_makefile_frag) $(target_makefile_frag)
  1099.     $(SHELL) ./config.status
  1100.  
  1101. #
  1102. # Support for building net releases
  1103.  
  1104. # Files in devo used in any net release.
  1105. # ChangeLog omitted because it may refer to files which are not in this
  1106. # distribution (perhaps it would be better to include it anyway).
  1107. DEVO_SUPPORT= README Makefile.in configure configure.in \
  1108.     config.guess config.sub config move-if-change \
  1109.     mpw-README mpw-build.in mpw-config.in mpw-configure \
  1110.     COPYING COPYING.LIB install.sh cfg-ml-com.in cfg-ml-pos.in
  1111.  
  1112. # Files in devo/etc used in any net release.
  1113. # ChangeLog omitted because it may refer to files which are not in this
  1114. # distribution (perhaps it would be better to include it anyway).
  1115. ETC_SUPPORT= Makefile.in cfg-paper.texi configure.in configure.man \
  1116.     configure.texi standards.texi make-stds.texi \
  1117.     configure.info* standards.info* cfg-paper.info*
  1118.  
  1119. # When you use `make setup-dirs' or `make taz' you should always redefine
  1120. # this macro.
  1121. SUPPORT_FILES = list-of-support-files-for-tool-in-question
  1122. # Files where "byacc" (Cygnus version) should be changed to "bison -y" (FSF).
  1123. DISTBISONFILES= binutils/Makefile.in gas/Makefile.in gdb/Makefile.in
  1124.  
  1125. .PHONY: taz
  1126.  
  1127. taz: $(DEVO_SUPPORT) $(SUPPORT_FILES) \
  1128.   texinfo/texinfo.tex texinfo/gpl.texinfo texinfo/lgpl.texinfo
  1129.     # Make sure "diststuff" files get built properly.
  1130.     for f in $(DISTBISONFILES) ; do \
  1131.       if [ -r $$f ]; then \
  1132.         sed '/^BISON *=.*$$/s/.*/BISON = bison -y/' <$$f >tmp ; \
  1133.         mv -f tmp $$f ; \
  1134.       else true; fi ; \
  1135.     done
  1136.     # Take out texinfo from a few places; make simple BISON=bison line.
  1137.     sed -e '/^all\.normal: /s/\all-texinfo //' \
  1138.         -e '/^    install-texinfo /d' \
  1139.         -e '/^BISON = /,/^$$/d' \
  1140.         -e '/^# BISON:/s/.*/BISON = bison -y/' \
  1141.     <Makefile.in >tmp
  1142.     mv -f tmp Makefile.in
  1143.     #
  1144.     ./configure sun4
  1145.     [ -z "$(CONFIGURE_TARGET_MODULES)" ] \
  1146.       || $(MAKE) $(CONFIGURE_TARGET_MODULES) ALL_GCC="" \
  1147.         CC_FOR_TARGET="$(CC) CXX_FOR_TARGET="$(CXX)"
  1148.     # Make links, and run "make diststuff" or "make info" when needed.
  1149.     rm -rf proto-toplev ; mkdir proto-toplev
  1150.     set -e ; dirs="$(TOOL) $(DEVO_SUPPORT) $(SUPPORT_FILES)" ; \
  1151.     for d in $$dirs ; do \
  1152.       if [ -d $$d ]; then \
  1153.         if [ ! -f $$d/Makefile ] ; then true ; \
  1154.         elif grep '^diststuff:' $$d/Makefile >/dev/null ; then \
  1155.         (cd $$d ; $(MAKE) diststuff ) || exit 1 ; \
  1156.         elif grep '^info:' $$d/Makefile >/dev/null ; then \
  1157.             (cd $$d ; $(MAKE) info ) || exit 1 ; \
  1158.         fi ; \
  1159.         if [ -d $$d/proto-$$d.dir ]; then \
  1160.           ln -s ../$$d/proto-$$d.dir proto-toplev/$$d ; \
  1161.         else \
  1162.           ln -s ../$$d proto-toplev/$$d ; \
  1163.         fi ; \
  1164.       else ln -s ../$$d proto-toplev/$$d ; fi ; \
  1165.     done
  1166.     cd etc ; $(MAKE) info
  1167.     $(MAKE) distclean
  1168.     #
  1169.     mkdir proto-toplev/etc
  1170.     (cd proto-toplev/etc; \
  1171.      for i in $(ETC_SUPPORT); do \
  1172.         ln -s ../../etc/$$i . ; \
  1173.      done)
  1174.     #
  1175.     # Take out texinfo from configurable dirs
  1176.     rm proto-toplev/configure.in
  1177.     sed -e '/^host_tools=/s/texinfo //' \
  1178.         <configure.in >proto-toplev/configure.in
  1179.     #
  1180.     mkdir proto-toplev/texinfo
  1181.     ln -s ../../texinfo/texinfo.tex proto-toplev/texinfo/
  1182.     ln -s ../../texinfo/gpl.texinfo proto-toplev/texinfo/
  1183.     ln -s ../../texinfo/lgpl.texinfo proto-toplev/texinfo/
  1184.     ln -s ../../texinfo/tex3patch   proto-toplev/texinfo/
  1185.     chmod og=u `find . -print`
  1186.     (VER=`sed <$(TOOL)/Makefile.in -n 's/^VERSION *= *//p'`; \
  1187.         echo "==> Making $(TOOL)-$$VER.tar.gz"; \
  1188.         rm -f $(TOOL)-$$VER; ln -s proto-toplev $(TOOL)-$$VER; \
  1189.         tar cfh - $(TOOL)-$$VER \
  1190.         | $(GZIPPROG) -v -9 >$(TOOL)-$$VER.tar.gz )
  1191.  
  1192. TEXINFO_SUPPORT= texinfo/texinfo.tex texinfo/gpl.texinfo texinfo/lgpl.texinfo
  1193. DIST_SUPPORT= $(DEVO_SUPPORT) $(TEXINFO_SUPPORT)
  1194.  
  1195. .PHONY: gas.tar.gz
  1196. GAS_SUPPORT_DIRS= bfd include libiberty opcodes
  1197. gas.tar.gz: $(DIST_SUPPORT) $(GAS_SUPPORT_DIRS) gas
  1198.     $(MAKE) -f Makefile.in taz TOOL=gas \
  1199.         SUPPORT_FILES="$(GAS_SUPPORT_DIRS)"
  1200.  
  1201. # The FSF "binutils" release includes gprof and ld.
  1202. .PHONY: binutils.tar.gz
  1203. BINUTILS_SUPPORT_DIRS= bfd gas include libiberty opcodes ld gprof
  1204. binutils.tar.gz: $(DIST_SUPPORT) $(BINUTILS_SUPPORT_DIRS) binutils
  1205.     $(MAKE) -f Makefile.in taz TOOL=binutils \
  1206.         SUPPORT_FILES="$(BINUTILS_SUPPORT_DIRS) makeall.bat configure.bat"
  1207.  
  1208. .PHONY: gas+binutils.tar.gz
  1209. GASB_SUPPORT_DIRS= $(GAS_SUPPORT_DIRS) binutils ld gprof
  1210. gas+binutils.tar.gz: $(DIST_SUPPORT) $(GASB_SUPPORT_DIRS) gas
  1211.     $(MAKE) -f Makefile.in taz TOOL=gas \
  1212.         SUPPORT_FILES="$(GASB_SUPPORT_DIRS) makeall.bat configure.bat"
  1213.  
  1214. .PHONY: libg++.tar.gz
  1215. LIBGXX_SUPPORT_DIRS=include libstdc++ libio librx libiberty
  1216. libg++.tar.gz: $(DIST_SUPPORT) libg++
  1217.     $(MAKE) -f Makefile.in taz TOOL=libg++ \
  1218.         SUPPORT_FILES="$(LIBGXX_SUPPORT_DIRS)"
  1219.  
  1220. GNATS_SUPPORT_DIRS=include libiberty send-pr
  1221. gnats.tar.gz: $(DIST_SUPPORT) $(GNATS_SUPPORT_DIRS) gnats
  1222.     $(MAKE) -f  Makefile.in taz TOOL=gnats \
  1223.         SUPPORT_FILES="$(GNATS_SUPPORT_DIRS)"
  1224.  
  1225. .PHONY: gdb.tar.gz
  1226. GDB_SUPPORT_DIRS= bfd include libiberty mmalloc opcodes readline sim utils
  1227. GDBTK_SUPPORT_DIRS= `if [ -d tcl -a -d tk ] ; then echo tcl tk ; fi`
  1228. gdb.tar.gz: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb
  1229.     $(MAKE) -f Makefile.in taz TOOL=gdb \
  1230.         SUPPORT_FILES="$(GDB_SUPPORT_DIRS) $(GDBTK_SUPPORT_DIRS)"
  1231.  
  1232. .PHONY: newlib.tar.gz
  1233. NEWLIB_SUPPORT_DIRS=libgloss
  1234. # taz configures for the sun4 target which won't configure newlib.
  1235. # We need newlib configured so that the .info files are made.
  1236. # Unfortunately, it is not enough to just configure newlib separately:
  1237. # taz will build the .info files but since SUBDIRS won't contain newlib,
  1238. # distclean won't be run (leaving Makefile, config.status, and the tmp files
  1239. # used in building the .info files, eg: *.def, *.ref).
  1240. # Compensate here by configuring newlib for a simple (no multilib support)
  1241. # cross target (sparc64), building the info files, and doing make distclean
  1242. # ourselves.
  1243. newlib.tar.gz: $(DIST_SUPPORT) $(NEWLIB_SUPPORT_DIRS) newlib
  1244.     rootme=`pwd` ; \
  1245.       cd newlib && ../configure --srcdir $$rootme/newlib \
  1246.         --host sun4 --target sparc64-elf
  1247.     cd newlib ; make info
  1248.     cd newlib ; make distclean
  1249.     $(MAKE) -f Makefile.in taz TOOL=newlib \
  1250.         SUPPORT_FILES="$(NEWLIB_SUPPORT_DIRS)" \
  1251.         DEVO_SUPPORT="$(DEVO_SUPPORT) COPYING.NEWLIB" newlib
  1252.  
  1253. .NOEXPORT:
  1254. MAKEOVERRIDES=
  1255.  
  1256.  
  1257. # end of Makefile.in
  1258.