home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 22 gnu / 22-gnu.zip / gnurx.zip / Makefile.in < prev    next >
Makefile  |  1995-12-31  |  10KB  |  337 lines

  1. #    Copyright (C) 1994,1995 Free Software Foundation, Inc.
  2. #
  3. # This program is free software; you can redistribute it and/or modify
  4. # it under the terms of the GNU General Public License as published by
  5. # the Free Software Foundation; either version 2, or (at your option)
  6. # any later version.
  7. #
  8. # This program is distributed in the hope that it will be useful,
  9. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  11. # GNU General Public License for more details.
  12. #
  13. # You should have received a copy of the GNU General Public License
  14. # along with this software; see the file COPYING.  If not, write to
  15. # the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  16.  
  17.  
  18. SHELL = /bin/sh
  19.  
  20. subdirs=@existingdirs@
  21.  
  22. localfiles =    ANNOUNCE \
  23.         COPYING \
  24.         INSTALL \
  25.         Makefile.in \
  26.         configure \
  27.         configure.in \
  28.         config.sub \
  29.         config.guess \
  30.         doc \
  31.         install-sh
  32.  
  33. localtreats = ANN.BX
  34.  
  35. # `all'
  36. #     Compile the entire program.  This should be the default target.
  37. #     This target need not rebuild any documentation files; info files
  38. #     should normally be included in the distribution, and DVI files
  39. #     should be made only when explicitly asked for.
  40. all:
  41.     @for dir in ${subdirs}; do \
  42.         cd $$dir; \
  43.         ${MAKE} all; \
  44.         cd .. ;\
  45.     done
  46.  
  47. #`install'
  48. #     Compile the program and copy the executables, libraries, and so on
  49. #     to the file names where they should reside for actual use.  If
  50. #     there is a simple test to verify that a program is properly
  51. #     installed then run that test.
  52. #
  53. #     Use `-' before any command for installing a man page, so that
  54. #     `make' will ignore any errors.  This is in case there are systems
  55. #     that don't have the Unix man page documentation system installed.
  56. #
  57. #     In the future, when we have a standard way of installing info
  58. #     files, `install' targets will be the proper place to do so.
  59. #
  60. # Cygnus extention:
  61. #    `install'
  62. #          Should *not* depend on the target `all'.  [feh!] If the program is
  63. #          not already built, `make install' should fail.  This allows
  64. #          you to install programs even when `make' would otherwise
  65. #          determine them to be out of date.  This can happen, for
  66. #          example, when the result of a `make all' is transported via
  67. #          tape to another machine for installation.
  68. #
  69. subdir-inst-target=install-nobuild
  70.  
  71. install: all
  72.     ${MAKE} subdir-inst-target=install install-nobuild
  73.  
  74. install-nobuild:
  75.     for dir in ${subdirs}; do \
  76.         cd $$dir; \
  77.         ${MAKE} ${subdir-inst-target}; \
  78.         cd ..  ;\
  79.     done
  80.  
  81. #`uninstall'
  82. #     Delete all the installed files that the `install' target would
  83. #     create (but not the noninstalled files such as `make all' would
  84. #     create).
  85. uninstall:
  86.     for dir in ${subdirs}; do \
  87.         cd $$dir; \
  88.         ${MAKE} uninstall; \
  89.         cd ..  ;\
  90.     done
  91.  
  92.  
  93. #`clean'
  94. #     Delete all files from the current directory that are normally
  95. #     created by building the program.  Don't delete the files that
  96. #     record the configuration.  Also preserve files that could be made
  97. #     by building, but normally aren't because the distribution comes
  98. #     with them.
  99. #
  100. #     Delete `.dvi' files here if they are not part of the distribution.
  101. #
  102. # Cygnus extention:
  103. #    `clean'
  104. #          Should remove any file that can be regenerated by the
  105. #          `Makefile', excepting only the `Makefile' itself, and any
  106. #          links created by `configure'.  That is, `make all clean'
  107. #          should return all directories to their original condition.
  108. #          If this is not done, then the command sequence
  109. #
  110. #               configure HOST1 ; make all install clean ;
  111. #               configure HOST2 ; make all install
  112. #
  113. #          will fail because of intermediate files intended for HOST1.
  114. clean:
  115.     for dir in ${subdirs}; do \
  116.         cd $$dir; \
  117.         ${MAKE} clean; \
  118.         cd ..  ;\
  119.     done
  120.  
  121. #`distclean'
  122. #     Delete all files from the current directory that are created by
  123. #     configuring or building the program.  If you have unpacked the
  124. #     source and built the program without creating any other files,
  125. #     `make distclean' should leave only the files that were in the
  126. #     distribution.
  127. distclean:
  128.     for dir in ${subdirs}; do \
  129.         cd $$dir; \
  130.         ${MAKE} distclean; \
  131.         cd ..  ;\
  132.     done
  133.  
  134.  
  135. #`mostlyclean'
  136. #     Like `clean', but may refrain from deleting a few files that people
  137. #     normally don't want to recompile.  For example, the `mostlyclean'
  138. #     target for GCC does not delete `libgcc.a', because recompiling it
  139. #     is rarely necessary and takes a lot of time.
  140. mostlyclean:
  141.     for dir in ${subdirs}; do \
  142.         cd $$dir; \
  143.         ${MAKE} mostlyclean; \
  144.         cd ..  ;\
  145.     done
  146.  
  147.  
  148. #`realclean'
  149. #     Delete everything from the current directory that can be
  150. #     reconstructed with this Makefile.  This typically includes
  151. #     everything deleted by distclean, plus more: C source files
  152. #     produced by Bison, tags tables, info files, and so on.
  153. #
  154. #     One exception, however: `make realclean' should not delete
  155. #     `configure' even if `configure' can be remade using a rule in the
  156. #     Makefile.  More generally, `make realclean' should not delete
  157. #     anything that needs to exist in order to run `configure' and then
  158. #     begin to build the program.
  159. realclean:
  160.     for dir in ${subdirs}; do \
  161.         cd $$dir; \
  162.         ${MAKE} realclean; \
  163.         cd ..  ;\
  164.     done
  165.  
  166.  
  167. #`TAGS'
  168. #     Update a tags table for this program.
  169. TAGS:
  170.     for dir in ${subdirs}; do \
  171.         cd $$dir; \
  172.         ${MAKE} TAGS; \
  173.         cd ..  ;\
  174.     done
  175.  
  176. #`info'
  177. #     Generate any info files needed.  The best way to write the rules
  178. #     is as follows:
  179. #
  180. #          info:  foo.info
  181. #          
  182. #          foo.info: $(srcdir)/foo.texi $(srcdir)/chap1.texi $(srcdir)/chap2.texi
  183. #                  $(MAKEINFO) $(srcdir)/foo.texi
  184. #
  185. #     You must define the variable `MAKEINFO' in the Makefile.  It
  186. #     should run the Makeinfo program, which is part of the Texinfo2
  187. #     distribution.
  188. info:
  189.     for dir in ${subdirs}; do \
  190.         cd $$dir; \
  191.         ${MAKE} info; \
  192.         cd ..  ;\
  193.     done
  194.  
  195.  
  196. #`dvi'
  197. #     Generate DVI files for all TeXinfo documentation.  For example:
  198. #
  199. #          dvi: foo.dvi
  200. #          
  201. #          foo.dvi: $(srcdir)/foo.texi $(srcdir)/chap1.texi $(srcdir)/chap2.texi
  202. #                  $(TEXI2DVI) $(srcdir)/foo.texi
  203. #
  204. #     You must define the variable `TEXI2DVI' in the Makefile.  It should
  205. #     run the program `texi2dvi', which is part of the Texinfo2
  206. #     distribution.  Alternatively, write just the dependencies, and
  207. #     allow GNU Make to provide the command.
  208. dvi:
  209.     for dir in ${subdirs}; do \
  210.         cd $$dir; \
  211.         ${MAKE} dvi; \
  212.         cd ..  ;\
  213.     done
  214.  
  215. #`dist'
  216. #     Create a distribution tar file for this program.  The tar file
  217. #     should be set up so that the file names in the tar file start with
  218. #     a subdirectory name which is the name of the package it is a
  219. #     distribution for.  This name can include the version number.
  220. #
  221. #     For example, the distribution tar file of GCC version 1.40 unpacks
  222. #     into a subdirectory named `gcc-1.40'.
  223. #
  224. #     The easiest way to do this is to create a subdirectory
  225. #     appropriately named, use `ln' or `cp' to install the proper files
  226. #     in it, and then `tar' that subdirectory.
  227. #
  228. #     The `dist' target should explicitly depend on all non-source files
  229. #     that are in the distribution, to make sure they are up to date in
  230. #     the distribution.  *Ref Making Releases: (standards)Releases.
  231. distname = brand-x
  232. distdir = $(distname)
  233. treats = $(localtreats)
  234. announcefile = ANN.BX
  235.  
  236. manifest-file:
  237.     rm -f MANIFEST
  238.     cp $(announcefile) ANNOUNCE
  239.     for treat in $(localfiles) $(treats) ; \
  240.       do echo $$treat >> MANIFEST ; \
  241.     done
  242.     for subdir in $(subdirs) ; do \
  243.       make -s -f $$subdir/Makefile.in SUBDIR=$$subdir manifest >> MANIFEST ; \
  244.     done
  245.     sed -e "s%^%$(distdir)/%" MANIFEST > M2
  246.     sed -e "/Entering dir/d" -e "/Leaving dir/d" M2 > MANIFEST
  247.     rm M2
  248.  
  249.  
  250. dist: manifest-file
  251.     mkdir $(distdir)
  252.     - cd $(distdir); \
  253.     for file in $(localfiles) $(treats) $(subdirs); do ln -s ../$$file; done; \
  254.     cd ..; \
  255.     tar -zhcvf $(distname).tar.gz --files-from MANIFEST
  256.     rm -rf $(distdir)
  257.  
  258. #`check'
  259. #     Perform self-tests (if any).  The user must build the program
  260. #     before running the tests, but need not install the program; you
  261. #     should write the self-tests so that they work when the program is
  262. #     built but not installed.
  263. check:
  264.     for dir in ${subdirs}; do \
  265.         cd $$dir; \
  266.         ${MAKE} check; \
  267.         cd ..  ;\
  268.     done
  269.  
  270.  
  271. #`installcheck'
  272. #     Perform installation tests (if any).  The user must build and
  273. #     install the program before running the tests.  You should not
  274. #     assume that `$(bindir)' is in the search path.
  275. installcheck:
  276.     for dir in ${subdirs}; do \
  277.         cd $$dir; \
  278.         ${MAKE} installcheck; \
  279.         cd ..  ;\
  280.     done
  281.  
  282.  
  283. #`installdirs'
  284. #     It's useful to add a target named `installdirs' to create the
  285. #     directories where files are installed, and their parent
  286. #     directories.  There is a script called `mkinstalldirs' which is
  287. #     convenient for this; find it in the Texinfo package.You can use a
  288. #     rule like this:
  289. #
  290. #          # Make sure all installation directories, e.g. $(bindir) actually exist by
  291. #          # making them if necessary.
  292. #          installdirs: mkinstalldirs
  293. #                  $(srcdir)/mkinstalldirs $(bindir) $(datadir) $(libdir) \
  294. #                                          $(infodir) $(mandir)
  295. installdirs:
  296.     for dir in ${subdirs}; do \
  297.         cd $$dir; \
  298.         ${MAKE} installdirs; \
  299.         cd ..  ;\
  300.     done
  301.  
  302.  
  303. # Cygnus extention:
  304. #    `install-info'
  305. #          Install all info files.
  306. install-info:
  307.     for dir in ${subdirs}; do \
  308.         cd $$dir; \
  309.         ${MAKE} install-info; \
  310.         cd ..  ;\
  311.     done
  312.  
  313.  
  314. # Cygnus extention:
  315. #    `clean-info'
  316. #          Remove all info files and any intermediate files that can be
  317. #          generated from texinfo source.
  318. clean-info:
  319.     for dir in ${subdirs}; do \
  320.         cd $$dir; \
  321.         ${MAKE} clean-info; \
  322.         cd ..  ;\
  323.     done
  324.  
  325.  
  326. # Cygnus extention:
  327. #    `Makefile'
  328. #          Calls `./config.status' to rebuild the `Makefile' in this
  329. #          directory.
  330. Makefile:
  331.     ${SHELL-/bin/sh} config.status
  332.