home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / gnu / djgpp / src / binutils.2 / binutils / makefile.in < prev    next >
Encoding:
Makefile  |  1993-05-30  |  15.0 KB  |  490 lines

  1. # Makefile for GNU binary-file utilities
  2. # Copyright (C) 1989-1992 Free Software Foundation, Inc.
  3.  
  4. # This file is part of GNU binutils.
  5.  
  6. # This program is free software; you can redistribute it and/or modify
  7. # it under the terms of the GNU General Public License as published by
  8. # the Free Software Foundation; either version 2 of the License, or
  9. # (at your option) any later version.
  10. # This program is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13. # GNU General Public License for more details.
  14. # You should have received a copy of the GNU General Public License
  15. # along with this program; if not, write to the Free Software
  16. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  17.  
  18. srcdir = .
  19.  
  20. prefix = /usr/local
  21.  
  22. program_transform_name =
  23. exec_prefix = $(prefix)
  24. bindir = $(exec_prefix)/bin
  25. libdir = $(exec_prefix)/lib
  26. tooldir = $(exec_prefix)/$(target_alias)
  27.  
  28. datadir = $(prefix)/lib
  29. mandir = $(prefix)/man
  30. man1dir = $(mandir)/man1
  31. man2dir = $(mandir)/man2
  32. man3dir = $(mandir)/man3
  33. man4dir = $(mandir)/man4
  34. man5dir = $(mandir)/man5
  35. man6dir = $(mandir)/man6
  36. man7dir = $(mandir)/man7
  37. man8dir = $(mandir)/man8
  38. man9dir = $(mandir)/man9
  39. infodir = $(prefix)/info
  40. includedir = $(prefix)/include
  41. docdir = $(datadir)/doc
  42.  
  43. SHELL = /bin/sh
  44.  
  45. INSTALL = install -c
  46. INSTALL_PROGRAM = $(INSTALL)
  47. INSTALL_DATA = $(INSTALL)
  48.  
  49. AR = ar
  50. AR_FLAGS = qv
  51. CFLAGS = -g
  52. MAKEINFO = makeinfo
  53. TEXI2DVI = texi2dvi
  54. RANLIB = ranlib
  55. BISONFLAGS = -d
  56. TEXI2ROFF=texi2roff
  57.  
  58. NM_FOR_TARGET = nm
  59. NM = $(NM_FOR_TARGET)
  60. SYMLINK = ln -s
  61.  
  62. BISON = `if [ -f ../byacc/byacc ] ; then echo ../byacc/byacc ; else echo byacc ; fi`
  63. # Comment these out if using lex.
  64. LEX_OPTIONS = -I -Cem 
  65. LEX = `if [ -f ../flex/flex ] ; then echo ../flex/flex ; else echo flex ; fi`
  66.  
  67. # Distribution version
  68. VERSION=2.2
  69. # Distribution name
  70. DIST_NAME=binutils-${VERSION}
  71.  
  72. version=`./../gcc/gcc -dumpversion`
  73.  
  74. # Where to find texinfo.tex to format docn with TeX
  75. TEXIDIR = $(srcdir)/../texinfo/fsf
  76.  
  77. MANPAGES= ar nm objdump ranlib size strip
  78.  
  79. #CC=gcc -Wall
  80. # these two are almost the same program
  81. AR_PROG=ar
  82. RANLIB_PROG=ranlib
  83.  
  84. # objcopy and strip should be the same program
  85. OBJCOPY_PROG=objcopy
  86. STRIP_PROG=strip
  87.  
  88. # These should all be the same program too.
  89. SIZE_PROG=size
  90. NM_PROG=nm
  91. OBJDUMP_PROG=objdump
  92.  
  93. # This is the demangler, as a standalone program.
  94. DEMANGLER_PROG=c++filt
  95.  
  96. PROGS = $(SIZE_PROG) $(OBJDUMP_PROG) $(NM_PROG) $(AR_PROG) $(STRIP_PROG) $(RANLIB_PROG) $(DEMANGLER_PROG) $(OBJCOPY_PROG)
  97. STAGESTUFF = $(PROGS) *.o
  98. # Files that can be generated, but should be in the distribution.
  99. DISTSTUFF=arparse.c arlex.c binutils.mm
  100.  
  101. BASEDIR = $(srcdir)/..
  102. LIBDIR  = ./../bfd
  103. OPCODEDIR = ./../opcodes
  104.  
  105. #### host and target dependant Makefile fragments come in here.
  106. ###
  107.  
  108. INCLUDES = -I. -I$(srcdir) -I$(BASEDIR)/include -I$(BASEDIR)/bfd
  109.  
  110. .c.o:
  111.     $(CC) -c $(CFLAGS) $(INCLUDES) $(HDEFINES) $(TDEFINES) $<
  112.  
  113. #
  114. ## Random definitions
  115. # Hopefully all these may be flushed once we get configuration down pat.
  116.  
  117. # alloca only needed for systems which don't have it and when cc != gcc.
  118. # ALLOCA = alloca.o
  119.  
  120. # nm tries to malloc enough space for the string table.  The old GNU malloc
  121. # rounds this up to a power of two (e.g. 5M becomes 8M), and so it might 
  122. # fail unnecessarily.  I've also seen some Unix malloc's fail, even when
  123. # there is enough memory.  So use the new GNU malloc.
  124. # MALLOC = gmalloc.o
  125.  
  126. # Use the GNU getopt unless you have problems with it.
  127. # The IRIS version could probably benefit from being assembled with
  128. # libmalloc rather than the ordinary malloc.
  129. LIBIBERTY_SRC_DIR = $(srcdir)/../libiberty
  130. LIBIBERTY_BIN_DIR = ./../libiberty
  131. LIBIBERTY = $(LIBIBERTY_BIN_DIR)/libiberty.a
  132.  
  133. # Code shared by all the binutils.
  134. BULIBS = bucomm.o version.o filemode.o
  135.  
  136. ADDL_LIBS = $(MALLOC) $(BULIBS) $(BFD) $(LIBIBERTY)
  137.  
  138. BFD = $(LIBDIR)/libbfd.a
  139. OPCODES = $(OPCODEDIR)/libopcodes.a
  140.  
  141. RUNTEST = runtest
  142. RUNTESTFLAGS = 
  143. FLAGS_TO_PASS = \
  144.     "RUNTEST=$(RUNTEST)" \
  145.     "RUNTESTFLAGS=$(RUNTESTFLAGS) \
  146.     SIZE=`if [ -f $$rootme/$(SIZE_PROG) ] ; then echo $$rootme/$(SIZE_PROG) ; else echo $(SIZE_PROG); fi` \
  147.     OBJCOPY=`if [ -f $$rootme/$(OBJCOPY_PROG) ] ; then echo $$rootme/$(OBJCOPY_PROG) ; else echo $(OBJCOPY_PROG); fi` \
  148.     NM=`if [ -f $$rootme/$(NM_PROG) ] ; then echo $$rootme/$(NM_PROG) ; else echo $(NM_PROG); fi` \
  149.     AR=`if [ -f $$rootme/$(AR_PROG) ] ; then echo $$rootme/$(AR_PROG) ; else echo $(AR_PROG); fi` \
  150.     OBJDUMP=`if [ -f $$rootme/$(OBJDUMP_PROG) ] ; then echo $$rootme/$(OBJDUMP_PROG) ; else echo $(OBJDUMP_PROG); fi` \
  151.     STRIP=`if [ -f $$rootme/$(STRIP_PROG) ] ; then echo $$rootme/$(STRIP_PROG) ; else echo $(STRIP_PROG); fi` \
  152.     RANLIB=`if [ -f $$rootme/$(RANLIB_PROG) ] ; then echo $$rootme/$(RANLIB_PROG) ; else echo $(RANLIB_PROG); fi` \
  153.     DEMANGLE=`if [ -f $$rootme/$(DEMANGLER_PROG) ] ; then echo $$rootme/$(DEMANGLER_PROG) ; else echo $(DEMANGLER_PROG); fi`"
  154.  
  155. #
  156. ## The rules
  157.  
  158. all: $(ADDL_LIBS) $(PROGS)
  159.  
  160. testsuite:
  161.     if [ -d testsuite ]; then \
  162.             (rootme=`pwd`/ ; export rootme ; \
  163.              rootsrc=`cd $(srcdir); pwd`/ ; export rootsrc ; \
  164.              cd testsuite; $(MAKE) FLAGS_TO_PASS=$(FLAGS_TO_PASS)); \
  165.     else true ; fi
  166.  
  167. check: force
  168.     rootme=`pwd`; export rootme; cd testsuite ; \
  169.     $(MAKE) check $(FLAGS_TO_PASS)
  170. #    /bin/sh $(srcdir)/sanity.sh .
  171.  
  172. installcheck:
  173.     /bin/sh $(srcdir)/sanity.sh $(bindir)
  174.  
  175. info: binutils.info
  176.  
  177. dvi: binutils.dvi
  178.  
  179. #$(BFD):$(LIBDIR)/../common/*.c
  180. #    (cd $(LIBDIR); make)
  181.  
  182. $(SIZE_PROG): $(ADDL_LIBS) size.o $(BFD)
  183.     $(CC) $(LDFLAGS) $(CFLAGS) -o $(SIZE_PROG) size.o $(ADDL_LIBS) $(LOADLIBES)
  184.  
  185. $(OBJCOPY_PROG): $(ADDL_LIBS) objcopy.o not-strip.o $(BFD)
  186.     $(CC) $(LDFLAGS) $(CFLAGS) -o $(OBJCOPY_PROG) objcopy.o not-strip.o $(ADDL_LIBS) $(LOADLIBES)
  187.  
  188. $(STRIP_PROG): $(ADDL_LIBS) objcopy.o is-strip.o $(BFD)
  189.     $(CC) $(LDFLAGS) $(CFLAGS) -o $(STRIP_PROG) objcopy.o is-strip.o $(ADDL_LIBS) $(LOADLIBES)
  190.  
  191. $(NM_PROG): $(ADDL_LIBS) nm.o $(BFD)
  192.     $(CC) $(LDFLAGS) $(CFLAGS) -o $(NM_PROG) nm.o $(ADDL_LIBS) $(LOADLIBES)
  193.  
  194. $(OBJDUMP_PROG): $(ADDL_LIBS) size.o objdump.o $(BFD) $(OPCODES)
  195.     $(CC) $(LDFLAGS) $(CFLAGS) -o $(OBJDUMP_PROG) objdump.o $(OPCODES) $(ADDL_LIBS) $(LOADLIBES)
  196.  
  197. underscore.c:
  198.     echo "int xxy_us_dummy;" >dummy.c
  199.     $(CC) -c dummy.c
  200.     echo '/*WARNING: This file is automatically generated!*/' >underscore.c
  201.     if [ "`$(NM) dummy.o | grep _xxy_us_dummy`" != "" ]; then \
  202.       echo "int prepends_underscore = 1;" >>underscore.c; \
  203.     else \
  204.       echo "int prepends_underscore = 0;" >>underscore.c; \
  205.     fi
  206.     -rm -f dummy.c dummy.o
  207.  
  208. cplus-dem.o: $(LIBIBERTY_SRC_DIR)/cplus-dem.c
  209.     $(CC) -c -DMAIN $(CFLAGS) $(INCLUDES) $(HDEFINES) $(TDEFINES) $(LIBIBERTY_SRC_DIR)/cplus-dem.c
  210.  
  211. $(DEMANGLER_PROG): cplus-dem.o $(LIBIBERTY) underscore.o
  212.     $(CC) $(LDFLAGS) $(CFLAGS) -o $(DEMANGLER_PROG) cplus-dem.o $(LIBIBERTY) $(LOADLIBES) underscore.o
  213.  
  214. arparse.c:arparse.y
  215.     $(BISON) $(BISONFLAGS)  $(srcdir)/arparse.y
  216.     -mv y.tab.c arparse.c
  217.     -mv y.tab.h arparse.h
  218.  
  219.  
  220. arlex.c: arlex.l
  221.     $(LEX) $(LEX_OPTIONS) $(srcdir)/arlex.l
  222.     mv lex.yy.c arlex.c
  223.  
  224. $(AR_PROG): $(ADDL_LIBS) ar.o arparse.o arlex.o not-ranlib.o $(BFD) arsup.o
  225.     $(CC) $(LDFLAGS) $(CFLAGS) -o $(AR_PROG) ar.o arparse.o arlex.o arsup.o not-ranlib.o $(ADDL_LIBS) $(LOADLIBES)
  226.  
  227. $(RANLIB_PROG): $(ADDL_LIBS) ar.o is-ranlib.o arparse.o arlex.o arsup.o $(BFD)
  228.     $(CC) $(LDFLAGS) $(CFLAGS) -o $(RANLIB_PROG) ar.o arparse.o arlex.o arsup.o is-ranlib.o $(ADDL_LIBS) $(LOADLIBES)
  229.  
  230. # This rule creates a single binary that switches between ar and ranlib
  231. # by looking at argv[0].  Use this kludge to save some disk space.
  232. # However, you have to install things by hand.
  233. # (That is after 'make install', replace the installed ranlib by a link to ar.)
  234.  
  235. # Alternatively, you can install ranlib.sh as ranlib.
  236.  
  237. ar_with_ranlib: $(ADDL_LIBS) ar.o maybe-ranlib.o $(BFD)
  238.     $(CC) $(LDFLAGS) $(CFLAGS) -o $(AR_PROG) ar.o maybe-ranlib.o $(ADDL_LIBS) $(LOADLIBES)
  239.     -rm -f $(RANLIB_PROG)
  240.     -ln $(AR_PROG) $(RANLIB_PROG)
  241.  
  242. # objcopy and strip in one binary that uses argv[0] to decide its action.
  243.  
  244. objcopy_with_strip: $(ADDL_LIBS) objcopy.o maybe-strip.o $(BFD)
  245.     $(CC) $(LDFLAGS) $(CFLAGS) -o $(OBJCOPY_PROG) objcopy.o maybe-strip.o $(ADDL_LIBS) $(LOADLIBES)
  246.     -rm -f $(STRIP_PROG)
  247.     -ln $(OBJCOPY_PROG) $(STRIP_PROG)
  248.  
  249. stage1: force
  250.     - mkdir stage1
  251.     - mv -f $(STAGESTUFF) stage1
  252.  
  253. stage2: force
  254.     - mkdir stage2
  255.     - mv -f $(STAGESTUFF) stage2
  256.  
  257. stage3: force
  258.     - mkdir stage3
  259.     - mv -f $(STAGESTUFF) stage3
  260.  
  261. against=stage2
  262.  
  263. comparison: force
  264.     for i in $(STAGESTUFF) ; do cmp $$i $(against)/$$i ; done
  265.  
  266. de-stage1: force
  267.     - (cd stage1 ; mv -f * ..)
  268.     - rmdir stage1
  269.  
  270. de-stage2: force
  271.     - (cd stage2 ; mv -f * ..)
  272.     - rmdir stage2
  273.  
  274. de-stage3: force
  275.     - (cd stage3 ; mv -f * ..)
  276.     - rmdir stage3
  277.  
  278. ######################################################################
  279. # DOCUMENTATION TARGETS
  280. # TeX output
  281. binutils.dvi: $(srcdir)/binutils.texi
  282.     $(TEXI2DVI) $(srcdir)/binutils.texi
  283.  
  284. # info file for online browsing
  285. binutils.info: $(srcdir)/binutils.texi
  286.     $(MAKEINFO) -o binutils.info $(srcdir)/binutils.texi
  287.  
  288. #   different targets for -ms, -mm, -me
  289. # Try to use a recent texi2roff.  v2 was put on prep in jan91.
  290. # If you want an index, see texi2roff doc for postprocessing 
  291. # and add -i to texi2roff invocations below.
  292. # Workarounds for texi2roff-2 (probably fixed in later texi2roff's, delete
  293. #    correspondint -e lines when later texi2roff's are current)
  294. # + @ifinfo's deleted explicitly due to texi2roff-2 bug w nested constructs.
  295. # + @c's deleted explicitly because texi2roff sees texinfo commands in them
  296. # + @   (that's at-BLANK) not recognized by texi2roff, turned into blank
  297. # + @alphaenumerate is ridiculously new, turned into @enumerate
  298.  
  299. # roff output (-ms)
  300. binutils.ms: $(srcdir)/binutils.texi
  301.     sed -e '/\\input texinfo/d' \
  302.         -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
  303.         -e '/^@ifinfo/,/^@end ifinfo/d' \
  304.         -e '/^@c/d' \
  305.         -e 's/{.*,,/{/' \
  306.         -e 's/@ / /g' \
  307.         -e 's/^@alphaenumerate/@enumerate/g' \
  308.         -e 's/^@end alphaenumerate/@end enumerate/g' \
  309.         $(srcdir)/binutils.texi | \
  310.     $(TEXI2ROFF) -ms | \
  311.     sed -e 's/---/\\(em/g' \
  312.     >binutils.ms 
  313.  
  314. # roff output (-mm)
  315. # '@noindent's removed due to texi2roff-2 mm bug; if yours is newer, 
  316. #   try leaving them in
  317. binutils.mm: $(srcdir)/binutils.texi
  318.     sed -e '/\\input texinfo/d' \
  319.         -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
  320.         -e '/^@ifinfo/,/^@end ifinfo/d' \
  321.         -e '/^@c/d' \
  322.         -e 's/{.*,,/{/' \
  323.         -e '/@noindent/d' \
  324.         -e 's/@ / /g' \
  325.         -e 's/^@alphaenumerate/@enumerate/g' \
  326.         -e 's/^@end alphaenumerate/@end enumerate/g' \
  327.         $(srcdir)/binutils.texi | \
  328.     $(TEXI2ROFF) -mm | \
  329.     sed -e 's/---/\\(em/g' \
  330.         >binutils.mm
  331.  
  332. # roff output (-me)
  333. binutils.me: $(srcdir)/binutils.texi
  334.     sed -e '/\\input texinfo/d' \
  335.         -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
  336.         -e '/^@ifinfo/,/^@end ifinfo/d' \
  337.         -e '/^@c/d' \
  338.         -e 's/{.*,,/{/' \
  339.         -e 's/@ / /g' \
  340.         -e 's/^@alphaenumerate/@enumerate/g' \
  341.         -e 's/^@end alphaenumerate/@end enumerate/g' \
  342.         $(srcdir)/binutils.texi | \
  343.     $(TEXI2ROFF) -me | \
  344.     sed -e 's/---/\\(em/g' \
  345.     >binutils.me 
  346.  
  347.  
  348. ######################################################################
  349.  
  350. mostlyclean:
  351.     -rm -f *.o *~ \#* core binutils.?? binutils.???
  352. clean: mostlyclean
  353.     -rm -f $(PROGS) underscore.c
  354. distclean: clean
  355.     -rm -f Makefile config.status sysdep.h
  356. realclean: distclean
  357.     -rm -f $(DISTSTUFF) TAGS
  358.  
  359. etags tags: TAGS
  360.  
  361. TAGS: force
  362.     etags $(INCDIR)/*.h $(BFDSRC)/*.[hc] *.[hc]
  363.  
  364. install: all
  365.     -parent=`echo $(bindir)|sed -e 's@/[^/]*$$@@'`; \
  366.     if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi
  367.     -if [ -d $(bindir) ] ; then true ; else mkdir $(bindir) ; fi
  368.     -for i in $(PROGS) ; do \
  369.         $(INSTALL_PROGRAM) $$i $(bindir)/`t='$(program_transform_name)'; echo $$i | sed -e "" $$t` ; \
  370.     done
  371.     -parent=`echo $(man1dir)|sed -e 's@/[^/]*$$@@'`; \
  372.     if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi
  373.     -if [ -d $(man1dir) ] ; then true ; else mkdir $(man1dir) ; fi
  374.     -for i in $(MANPAGES) ; do \
  375.         $(INSTALL_DATA) $(srcdir)/$$i.1 $(man1dir)/`t='$(program_transform_name)'; echo $$i | sed -e "" $$t`.1 ; \
  376.     done
  377.     -if [ -d $(tooldir) ]; then \
  378.        if [ -d $(tooldir)/bin ] ; then true ; else mkdir $(tooldir)/bin ; fi; \
  379.        for i in nm strip ; do \
  380.          rm -f $(tooldir)/bin/$$i; \
  381.          ln $(bindir)/`t='$(program_transform_name)'; echo $$i | sed -e "" $$t` $(tooldir)/bin/$$i \
  382.           || $(INSTALL_PROGRAM) $$i $(tooldir)/bin/$$i; \
  383.        done; \
  384.      else true; fi        
  385.  
  386. install-info: info
  387.     -parent=`echo $(infodir)|sed -e 's@/[^/]*$$@@'`; \
  388.     if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi
  389.     -if [ -d $(infodir) ] ; then true ; else mkdir $(infodir) ; fi
  390.     for i in *.info* ; do \
  391.         $(INSTALL_DATA) $$i $(infodir)/$$i ; \
  392.     done
  393.  
  394. clean-info:
  395.     -rm -rf *.info*
  396.  
  397. # Making a dist:
  398. # cvs rtag binutils-x-yy ld+utils
  399. # cvs co -r binutils-x-yy ld+utils
  400. # Sanitize
  401. # cd {HERE}; make dist [-f Makefile.in]
  402.  
  403. dist: $(DIST_NAME).tar.z
  404.  
  405. diststuff: $(DISTSTUFF)
  406.  
  407. $(DIST_NAME).tar.z:
  408.     cd ../..; rm -f $(DIST_NAME); ln -s devo $(DIST_NAME)
  409.     make diststuff -f Makefile.in
  410.     cd ../ld; make diststuff -f Makefile.in
  411.     cd ../gprof; make diststuff -f Makefile.in
  412.     cd ../texinfo; mv texinfo.tex ..; rm -rf *; mv ../texinfo.tex .
  413.     # Take out texinfo from configurable dirs
  414.     mv ../configure.in tmp; \
  415.       sed -e '/^host_tools=/s/texinfo //' <tmp >../configure.in; rm tmp
  416.     cd ..; chmod og=u `find . -print`
  417.     cd ../..; tar chf - $(DIST_NAME) | gzip >$(DIST_NAME).tar.z
  418.     rm -rf ../../$(DIST_NAME)
  419.  
  420. # These get around a bug in Sun Make in SunOS 4.1.1
  421. alloca.o:alloca.c
  422. ar.o: ar.c
  423. arsup.o: arsup.c
  424. bucomm.o: bucomm.c
  425. objcopy.o: objcopy.c
  426. filemode.o:filemode.c
  427. getopt.o:getopt.c
  428. getopt1.o:getopt1.c
  429. gmalloc.o:gmalloc.c
  430. is-ranlib.o:is-ranlib.c
  431. is-strip.o:is-strip.c
  432. maybe-ranlib.o:maybe-ranlib.c
  433. maybe-strip.o:maybe-strip.c
  434. nm.o: nm.c
  435. not-ranlib.o:not-ranlib.c
  436. not-strip.o:not-strip.c
  437. objdump.o: objdump.c
  438. size.o: size.c
  439. strip.o:strip.c
  440. version.o: $(srcdir)/version.c
  441.     $(CC) $(CFLAGS) $(INCLUDES) $(HDEFINES) $(TDEFINES) -DVERSION='"$(VERSION)"' -c $(srcdir)/version.c
  442.  
  443. #-----------------------------------------------------------------------------
  444. #        'STANDARD' GNU/960 TARGETS BELOW THIS POINT
  445. #
  446. # 'VERSION' file must be present and contain a string of the form "x.y"
  447. #-----------------------------------------------------------------------------
  448.  
  449. ver960.c: FORCE
  450.     rm -f ver960.c
  451.     echo "char ${TARG}_ver[]= \"${TARG} `cat VERSION`, `date`\";" > ver960.c
  452.  
  453.  
  454. # Dummy target to force execution of dependent targets.
  455. #
  456. force:
  457.  
  458. # Target to uncomment host-specific lines in this makefile.  Such lines must
  459. # have the following string beginning in column 1: #__<hostname>__#
  460. # Original Makefile is backed up as 'Makefile.old'.
  461. #
  462. # Invoke with:  make make HOST=xxx
  463. #
  464. make:
  465.     -@if test $(HOST)x = x ; then \
  466.         echo 'Specify "make make HOST=???"'; \
  467.         exit 1; \
  468.     fi ; \
  469.     grep -s "^#The next line was generated by 'make make'" Makefile; \
  470.     if test $$? = 0 ; then    \
  471.         echo "Makefile has already been processed with 'make make'";\
  472.         exit 1; \
  473.     fi ; \
  474.     mv -f Makefile Makefile.old; \
  475.     echo "#The next line was generated by 'make make'"     >Makefile ; \
  476.     echo "HOST=$(HOST)"                    >>Makefile ; \
  477.     echo                            >>Makefile ; \
  478.     sed "s/^#__$(HOST)__#//" < Makefile.old            >>Makefile
  479.  
  480. Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
  481.     $(SHELL) ./config.status
  482.  
  483. ### Local Variables: ***
  484. ### mode:fundamental ***
  485. ### page-delimiter: "^# " ***
  486. ### End: ***
  487. ### end of file
  488.