1 # Master Makefile for the GNU Concurrent Versions System.
2 # Copyright (C) 1986, 1988-1992, 1994 Free Software Foundation, Inc.
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)
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.
16 #### Start of system configuration section. ####
19 top_srcdir = @top_srcdir@
22 # If you use gcc, you should either run the fixincludes script that
23 # comes with it or else use gcc with the -traditional option. Otherwise
24 # ioctl calls will be compiled incorrectly on some systems.
30 # Set RANLIB = echo if your system doesn't have or need ranlib.
32 # Set YACC = bison or yacc, depending on which you have on your system
34 # Use cp if you don't have install.
36 INSTALL_DATA = @INSTALL_DATA@
37 INSTALL_PROGRAM = @INSTALL_PROGRAM@
42 INCLUDES = -I. -I../lib @includeopt@
50 exec_prefix = @exec_prefix@
52 # Where to install the executables.
53 bindir = $(exec_prefix)/bin
55 # Where to put the system-wide .cvsrc file
56 libdir = $(prefix)/lib
58 # Where to put the Info files
59 infodir = $(prefix)/info
61 # Where to put the manual pages.
62 mandir = $(prefix)/man
64 #### End of system configuration section. ####
70 LDFLAGS='$(LDFLAGS)' \
71 LIBPROGS='$(LIBPROGS)' \
74 MAKEINFO='$(MAKEINFO)' \
76 TEXI2DVI='$(TEXI2DVI)' \
79 infodir='$(infodir)' \
83 exec_prefix='$(exec_prefix)'
86 COPYING COPYING.LIB INSTALL README TODO PROJECTS \
87 BUGS MINOR-BUGS FAQ HACKING DEVEL-CVS TESTS \
88 README.VMS build.com \
89 ChangeLog NEWS ChangeLog.zoo \
90 configure configure.in stamp-h.in config.h.in Makefile.in acconfig.h \
91 cvs-format.el mkinstalldirs install-sh \
95 ### Subdirectories to run make in for the primary targets.
96 # Unix source subdirs, where we'll want to run lint and etags:
97 USOURCE_SUBDIRS = lib zlib diff src
99 SUBDIRS = ${USOURCE_SUBDIRS} man doc contrib tools \
100 windows-NT os2 emx macintosh vms
101 # Only make TAGS/tags files in these directories.
104 # Set default target.
107 .PHONY: all install uninstall installdirs
108 all install uninstall installdirs: config.h Makefile all-local
109 @for subdir in $(SUBDIRS); do \
110 echo "making $@ in $$subdir"; \
111 ( cd $$subdir && $(MAKE) $(FLAGS_TO_PASS) $@ ) || exit 1; \
114 installdirs: installdirs-local
116 install: all install-local install-info
121 .PHONY: info dvi clean-info install-info
122 info dvi clean-info install-info:
123 cd doc && $(MAKE) $(FLAGS_TO_PASS) $@ || exit 1
125 .PHONY: install-local
126 install-local: all-local
127 @: nothing to do locally
129 .PHONY: installdirs-local
130 installdirs-local: all-local
131 @: nothing to do locally
135 @for dir in $(TSUBDIRS); do echo making $@ in $$dir; cd $$dir && $(MAKE) $(FLAGS_TO_PASS) $@ || exit 1; cd ..; done
137 @ctags `for i in \`$(MAKE) SUBDIRS="$(TSUBDIRS)" ls\` ; do echo $(srcdir)/$$i ; done`
141 @for dir in $(TSUBDIRS); do echo making $@ in $$dir; cd $$dir && $(MAKE) $(FLAGS_TO_PASS) $@ || exit 1; cd ..; done
143 @etags `for i in \`$(MAKE) SUBDIRS="$(TSUBDIRS)" ls | grep -v 'make\[[0-9]\]'\` ; do echo $(srcdir)/$$i ; done`
148 @for dir in $(SUBDIRS); do \
149 for i in `cd $$dir && $(MAKE) $(FLAGS_TO_PASS) $@ | grep -v 'make\[[0-9]\]'` ; do \
156 @for dir in $(SUBDIRS); do echo making $@ in $$dir; cd $$dir && $(MAKE) $(FLAGS_TO_PASS) $@ || exit 1; cd ..; done
159 distclean: distclean-local
160 @for dir in $(SUBDIRS); do echo making $@ in $$dir; cd $$dir && $(MAKE) $(FLAGS_TO_PASS) $@ || exit 1; cd ..; done
164 realclean: realclean-local
165 @for dir in $(SUBDIRS); do echo making $@ in $$dir; cd $$dir && $(MAKE) $(FLAGS_TO_PASS) $@ || exit 1; cd ..; done
168 .PHONY: mostlyclean-local
173 clean-local: mostlyclean-local
175 .PHONY: distclean-local
176 distclean-local: clean-local
177 rm -f Makefile config.cache config.h config.log stamp-h
180 .PHONY: realclean-local
181 realclean-local: distclean-local
185 @for dir in $(SUBDIRS); do cd $$dir && $(MAKE) $(FLAGS_TO_PASS) $@ || exit 1; cd ..; done
189 cd lib ; $(MAKE) $(FLAGS_TO_PASS)
190 cd zlib ; $(MAKE) $(FLAGS_TO_PASS)
191 cd diff ; $(MAKE) $(FLAGS_TO_PASS)
192 cd src ; $(MAKE) $(FLAGS_TO_PASS) check
196 cd lib ; $(MAKE) $(FLAGS_TO_PASS)
197 cd zlib ; $(MAKE) $(FLAGS_TO_PASS)
198 cd diff ; $(MAKE) $(FLAGS_TO_PASS)
199 cd src ; $(MAKE) $(FLAGS_TO_PASS) remotecheck
203 cd lib ; $(MAKE) $(FLAGS_TO_PASS)
204 cd zlib ; $(MAKE) $(FLAGS_TO_PASS)
205 cd diff ; $(MAKE) $(FLAGS_TO_PASS)
206 cd src ; $(MAKE) $(FLAGS_TO_PASS) installcheck
210 @for dir in $(USOURCE_SUBDIRS); do cd $$dir && $(MAKE) $(FLAGS_TO_PASS) xlint || exit 1; cd ..; done
218 ${MAKE} dist-dir DISTDIR="`cat .fname`"
219 for dir in ${SUBDIRS}; do \
220 ( DISTDIR="../`cat .fname`/$${dir}"; \
222 ${MAKE} dist-dir DISTDIR="$${DISTDIR}" \
225 tar chf${TAR_VERBOSE} - `cat .fname` | ${GZIP} > "`cat .fname`.tar${GZIP_EXT}"
226 rm -rf `cat .fname` .fname .version
231 for i in ${DISTFILES}; do \
232 ln $(srcdir)/$${i} ${DISTDIR}; \
237 rm -f .version .fname
238 sed < $(srcdir)/src/version.c \
239 -e '/version_string/!d' \
240 -e 's/[^0-9.]*\([0-9.]*\).*/\1/' \
242 echo > .fname cvs-`cat .version`
243 rm -f `cat .fname`.spec
244 sed < $(top_srcdir)/cvs.spec \
245 -e 's/@VERSION@/'`cat .version`'/g' \
249 # For the justification of the following Makefile rules, see node
250 # `Automatic Remaking' in GNU Autoconf documentation.
251 Makefile: Makefile.in config.status
252 CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status
254 # Use @CFLAGS@ not $(CFLAGS) because it would be confusing for "make CFLAGS="
255 # to sometimes (i.e., if configure is modified) change the configured CFLAGS,
257 config.status: configure
258 CFLAGS="@CFLAGS@" ./config.status --recheck
260 # The rules to run autoconf and autoheader are commented out. This is because
261 # when the user unpacks a tarfile, configure.in might end up newer than
262 # configure, but the user might not have (and does not need to have) autoconf
264 #configure: configure.in #aclocal.m4
265 # cd $(srcdir); autoconf
269 # This used to do a ./config.status --recheck, to update config.status with
270 # any new #defines from config.h.in. The problem was that the rule itself
271 # depends on config.status, so that the --recheck would get run several
272 # times, which is bad if the user was trying to specify CFLAGS manually.
273 # It was a big pain in the neck.
274 stamp-h: config.h.in config.status
275 CONFIG_FILES=$@ CONFIG_HEADERS=config.h ./config.status
277 #config.h.in: stamp-h.in
278 #stamp-h.in: configure.in #aclocal.m4 acconfig.h
279 # cd $(srcdir); autoheader
280 # date > $(srcdir)/stamp-h.in
282 # Tell versions [3.59,3.63) of GNU make not to export all variables.
283 # Otherwise a system limit (for SysV at least) may be exceeded.