home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / cvs-1.8.7-src.tgz / tar.out / fsf / cvs / Makefile.in < prev    next >
Makefile  |  1996-09-28  |  8KB  |  291 lines

  1. # Master Makefile for the GNU Concurrent Versions System.
  2. # Copyright (C) 1986, 1988-1992, 1994 Free Software Foundation, Inc.
  3.  
  4. # This program is free software; you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation; either version 2, or (at your option)
  7. # any later version.
  8.  
  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.  
  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. # $CVSid: @(#)Makefile.in 1.30 94/10/22 $
  19.  
  20. SHELL = /bin/sh
  21.  
  22. #### Start of system configuration section. ####
  23.  
  24. srcdir = @srcdir@
  25. top_srcdir = @top_srcdir@
  26. VPATH = @srcdir@
  27.  
  28. # If you use gcc, you should either run the fixincludes script that
  29. # comes with it or else use gcc with the -traditional option.  Otherwise
  30. # ioctl calls will be compiled incorrectly on some systems.
  31. CC = @CC@
  32. AR = @AR@
  33.  
  34. @SET_MAKE@
  35.  
  36. # Set RANLIB = echo if your system doesn't have or need ranlib.
  37. RANLIB = @RANLIB@
  38. # Set YACC = bison or yacc, depending on which you have on your system
  39. YACC = @YACC@
  40. # Use cp if you don't have install.
  41. INSTALL = @INSTALL@
  42. INSTALL_DATA = @INSTALL_DATA@
  43. INSTALL_PROGRAM = @INSTALL_PROGRAM@
  44.  
  45. DEFS = @DEFS@
  46. LIBS = @LIBS@
  47.  
  48. INCLUDES = -I. -I../lib @includeopt@
  49. CFLAGS = @CFLAGS@
  50. LDFLAGS = @LDFLAGS@
  51.  
  52. MAKEINFO = makeinfo
  53. TEXI2DVI = texi2dvi
  54. DVIPS = dvips
  55.  
  56. prefix = @prefix@
  57. exec_prefix = @exec_prefix@
  58.  
  59. # Where to install the executables.
  60. bindir = $(exec_prefix)/bin
  61.  
  62. # Where to put the system-wide .cvsrc file
  63. libdir = $(prefix)/lib
  64.  
  65. # Where to put the Info files
  66. infodir = $(prefix)/info
  67.  
  68. # Where to put the guide files
  69. guidedir = $(prefix)/guide
  70.  
  71. # Where to put the manual pages.
  72. mandir = $(prefix)/man
  73.  
  74. #### End of system configuration section. ####
  75.  
  76. FLAGS_TO_PASS = \
  77.     AR='$(AR)' \
  78.     CC='$(CC)' \
  79.     CFLAGS='$(CFLAGS)' \
  80.     LDFLAGS='$(LDFLAGS)' \
  81.     LIBPROGS='$(LIBPROGS)' \
  82.     LIBS='$(LIBS)' \
  83.     MAKE='$(MAKE)' \
  84.     MAKEINFO='$(MAKEINFO)' \
  85.     RANLIB='$(RANLIB)' \
  86.     TEXI2DVI='$(TEXI2DVI)' \
  87.     DVIPS='$(DVIPS)' \
  88.     YACC='$(YACC)' \
  89.     bindir='$(bindir)' \
  90.     infodir='$(infodir)' \
  91.     guidedir='$(guidedir)'\
  92.     libdir='$(libdir)' \
  93.     mandir='$(mandir)' \
  94.     prefix='$(prefix)' \
  95.     exec_prefix='$(exec_prefix)'
  96.  
  97. DISTFILES = \
  98.     COPYING COPYING.LIB INSTALL README TODO PROJECTS \
  99.     BUGS MINOR-BUGS FAQ HACKING TESTS \
  100.     ChangeLog NEWS ChangeLog.zoo \
  101.     configure configure.in stamp-h.in config.h.in Makefile.in acconfig.h \
  102.     cvs-format.el mkinstalldirs install-sh \
  103.     cvsnt.mak \
  104.     .cvsignore cvs.spec
  105.  
  106. ### Subdirectories to run make in for the primary targets.
  107. # Unix source subdirs, where we'll want to run lint and etags:
  108. USOURCE_SUBDIRS = lib zlib src
  109. # All other subdirs:
  110. SUBDIRS = ${USOURCE_SUBDIRS} man doc contrib tools windows-NT os2 macintosh
  111. # Only make TAGS/tags files in these directories, in this order
  112. #    [Why in this order?  If we didn't have to stick to this order, we
  113. #    could make "TSUBDIRS = ${USOURCE_SUBDIRS}".  -Karl]
  114. TSUBDIRS= src lib
  115.  
  116. # Set default target.
  117. all:
  118.  
  119. .PHONY: all install uninstall installdirs
  120. all install uninstall installdirs: config.h Makefile all-local
  121.     @for subdir in $(SUBDIRS); do \
  122.       echo "making $@ in $$subdir"; \
  123.       ( cd $$subdir && $(MAKE) $(FLAGS_TO_PASS) $@ ) || exit 1; \
  124.     done
  125.  
  126. installdirs: installdirs-local
  127.  
  128. install: all install-local install-info
  129.  
  130. .PHONY: all-local
  131. all-local:
  132.  
  133. .PHONY: info guide dvi clean-info install-info install-guide
  134. info guide dvi clean-info install-info install-guide:
  135.     cd doc && $(MAKE) $(FLAGS_TO_PASS) $@ || exit 1
  136.  
  137. .PHONY: install-local
  138. install-local: all-local
  139.     @: nothing to do locally
  140.  
  141. .PHONY: installdirs-local
  142. installdirs-local: all-local
  143.     @: nothing to do locally
  144.  
  145. .PHONY: tags
  146. tags:
  147.     @for dir in $(TSUBDIRS); do echo making $@ in $$dir; cd $$dir && $(MAKE) $(FLAGS_TO_PASS) $@ || exit 1; cd ..; done
  148.     @echo making $@ in .
  149.     @ctags `for i in \`$(MAKE) SUBDIRS="$(TSUBDIRS)" ls\` ; do echo $(srcdir)/$$i ; done`
  150.  
  151. .PHONY: TAGS
  152. TAGS:
  153.     @for dir in $(TSUBDIRS); do echo making $@ in $$dir; cd $$dir && $(MAKE) $(FLAGS_TO_PASS) $@ || exit 1; cd ..; done
  154.     @echo making $@ in .
  155.     @etags `for i in \`$(MAKE) SUBDIRS="$(TSUBDIRS)" ls | grep -v 'make\[[0-9]\]'\` ; do echo $(srcdir)/$$i ; done`
  156.  
  157. .PHONY: ls
  158. ls:
  159.     @echo $(DISTFILES)
  160.     @for dir in $(SUBDIRS); do \
  161.         for i in `cd $$dir && $(MAKE) $(FLAGS_TO_PASS) $@ | grep -v 'make\[[0-9]\]'` ; do \
  162.             echo $$dir/$$i ; \
  163.         done ; \
  164.     done
  165.  
  166. .PHONY: clean
  167. clean: clean-local
  168.     @for dir in $(SUBDIRS); do echo making $@ in $$dir; cd $$dir && $(MAKE) $(FLAGS_TO_PASS) $@ || exit 1; cd ..; done
  169.  
  170. .PHONY: distclean
  171. distclean: distclean-local
  172.     @for dir in $(SUBDIRS); do echo making $@ in $$dir; cd $$dir && $(MAKE) $(FLAGS_TO_PASS) $@ || exit 1; cd ..; done
  173.     rm -f config.status
  174.  
  175. .PHONY: realclean
  176. realclean: realclean-local
  177.     @for dir in $(SUBDIRS); do echo making $@ in $$dir; cd $$dir && $(MAKE) $(FLAGS_TO_PASS) $@ || exit 1; cd ..; done
  178.     rm -f config.status
  179.  
  180. .PHONY: mostlyclean-local
  181. mostlyclean-local:
  182.     rm -f *~
  183.  
  184. .PHONY: clean-local
  185. clean-local: mostlyclean-local
  186.  
  187. .PHONY: distclean-local
  188. distclean-local: clean-local
  189.     rm -f Makefile config.cache config.h config.log stamp-h
  190.     rm -f tags TAGS
  191.  
  192. .PHONY: realclean-local
  193. realclean-local: distclean-local
  194.  
  195. .PHONY: saber
  196. saber:
  197.     @for dir in $(SUBDIRS); do cd $$dir && $(MAKE) $(FLAGS_TO_PASS) $@ || exit 1; cd ..; done
  198.  
  199. .PHONY: check
  200. check:
  201.     cd lib ; $(MAKE) $(FLAGS_TO_PASS)
  202.     cd src ; $(MAKE) $(FLAGS_TO_PASS) check
  203.  
  204. .PHONY: remotecheck
  205. remotecheck:
  206.     cd lib ; $(MAKE) $(FLAGS_TO_PASS)
  207.     cd src ; $(MAKE) $(FLAGS_TO_PASS) remotecheck
  208.  
  209. .PHONY: installcheck
  210. installcheck:
  211.     cd lib ; $(MAKE) $(FLAGS_TO_PASS)
  212.     cd src ; $(MAKE) $(FLAGS_TO_PASS) installcheck
  213.  
  214. .PHONY: lint
  215. lint:
  216.     @for dir in $(USOURCE_SUBDIRS); do cd $$dir && $(MAKE) $(FLAGS_TO_PASS) xlint || exit 1; cd ..; done
  217.  
  218. .PHONY: dist
  219. GZIP=gzip --best
  220. GZIP_EXT=.gz
  221. TAR_VERBOSE=
  222. dist: spec
  223.     rm -rf `cat .fname`
  224.     ${MAKE} dist-dir DISTDIR="`cat .fname`"
  225.     for dir in ${SUBDIRS}; do \
  226.       ( DISTDIR="../`cat .fname`/$${dir}"; \
  227.             cd $${dir} && \
  228.         ${MAKE} dist-dir DISTDIR="$${DISTDIR}" \
  229.       ); \
  230.     done
  231.     tar chf${TAR_VERBOSE} - `cat .fname` | ${GZIP} > "`cat .fname`.tar${GZIP_EXT}"
  232.     rm -rf `cat .fname` .fname .version
  233.  
  234. .PHONY: dist-dir
  235. dist-dir:
  236.     mkdir ${DISTDIR}
  237.     for i in ${DISTFILES}; do \
  238.       ln $(srcdir)/$${i} ${DISTDIR}; \
  239.     done
  240.  
  241. .PHONY: spec
  242. spec:
  243.     rm -f .version .fname
  244.     sed < $(srcdir)/src/version.c \
  245.         -e '/version_string/!d' \
  246.         -e 's/[^0-9.]*\([0-9.]*\).*/\1/' \
  247.         -e q > .version
  248.     echo > .fname cvs-`cat .version`
  249.     rm -f `cat .fname`.spec
  250.     sed < $(top_srcdir)/cvs.spec \
  251.         -e 's/@VERSION@/'`cat .version`'/' \
  252.         > `cat .fname`.spec
  253.  
  254.  
  255. # For the justification of the following Makefile rules, see node
  256. # `Automatic Remaking' in GNU Autoconf documentation.
  257. Makefile: Makefile.in config.status
  258.     CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status
  259.  
  260. # Use @CFLAGS@ not $(CFLAGS) because it would be confusing for "make CFLAGS="
  261. # to sometimes (i.e., if configure is modified) change the configured CFLAGS,
  262. # and sometimes not.
  263. config.status: configure
  264.     CFLAGS="@CFLAGS@" ./config.status --recheck
  265.  
  266. # The rules to run autoconf and autoheader are commented out.  This is because
  267. # when the user unpacks a tarfile, configure.in might end up newer than 
  268. # configure, but the user might not have (and does not need to have) autoconf
  269. # installed.
  270. #configure: configure.in #aclocal.m4
  271. #    cd $(srcdir); autoconf
  272.  
  273. config.h: stamp-h
  274.  
  275. # This used to do a ./config.status --recheck, to update config.status with
  276. # any new #defines from config.h.in.  The problem was that the rule itself
  277. # depends on config.status, so that the --recheck would get run several
  278. # times, which is bad if the user was trying to specify CFLAGS manually.
  279. # It was a big pain in the neck.
  280. stamp-h: config.h.in config.status
  281.     CONFIG_FILES=$@ CONFIG_HEADERS=config.h ./config.status
  282.  
  283. #config.h.in: stamp-h.in
  284. #stamp-h.in: configure.in #aclocal.m4 acconfig.h
  285. #    cd $(srcdir); autoheader
  286. #    date > $(srcdir)/stamp-h.in
  287.  
  288. # Tell versions [3.59,3.63) of GNU make not to export all variables.
  289. # Otherwise a system limit (for SysV at least) may be exceeded.
  290. .NOEXPORT:
  291.