1 # Makefile for GNU CVS program.
2 # Do not use this makefile directly, but only from `../Makefile'.
3 # Copyright (C) 1986, 1988-1990 Free Software Foundation, Inc.
5 # This program 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, or (at your option)
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.
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 # $CVSid: @(#)Makefile.in 1.19 94/09/29 $
24 top_srcdir = @top_srcdir@
28 exec_prefix = @exec_prefix@
30 # Where to install the executables.
31 bindir = $(exec_prefix)/bin
33 # Where to put the system-wide .cvsrc file
34 libdir = $(prefix)/lib
36 # Where to put the manual pages.
37 mandir = $(prefix)/man
39 # Use cp if you don't have install.
41 INSTALL_DATA = @INSTALL_DATA@
42 INSTALL_PROGRAM = @INSTALL_PROGRAM@
46 SOURCES = add.c admin.c checkin.c checkout.c classify.c client.c commit.c \
47 create_adm.c cvsrc.c diff.c edit.c entries.c error.c expand_path.c \
48 fileattr.c find_names.c hash.c history.c ignore.c import.c \
49 lock.c log.c login.c logmsg.c main.c mkmodules.c modules.c myndbm.c no_diff.c \
50 parseinfo.c patch.c rcs.c rcscmds.c recurse.c release.c remove.c repos.c \
51 root.c rtag.c scramble.c server.c status.c subr.c filesubr.c run.c \
52 tag.c update.c watch.c wrapper.c vers_ts.c version.c
54 OBJECTS = add.o admin.o checkin.o checkout.o classify.o client.o commit.o \
55 create_adm.o cvsrc.o diff.o edit.o entries.o expand_path.o \
56 fileattr.o find_names.o hash.o history.o ignore.o import.o \
57 lock.o log.o login.o logmsg.o main.o mkmodules.o modules.o myndbm.o no_diff.o \
58 parseinfo.o patch.o rcs.o rcscmds.o recurse.o release.o remove.o repos.o \
59 root.o rtag.o scramble.o server.o status.o tag.o update.o \
60 watch.o wrapper.o vers_ts.o \
61 subr.o filesubr.o run.o version.o error.o
63 HEADERS = cvs.h rcs.h hash.h myndbm.h \
64 update.h server.h client.h error.h fileattr.h edit.h watch.h
66 TAGFILES = $(HEADERS) options.h.in $(SOURCES)
68 DISTFILES = .cvsignore Makefile.in ChangeLog ChangeLog-9395 ChangeLog-9194 \
70 sanity.sh cvsbug.sh $(TAGFILES)
74 DEFS = @DEFS@ @includeopt@
81 INCLUDES = -I. -I.. -I$(srcdir) -I$(top_srcdir)/lib
83 $(CC) $(CPPFLAGS) $(INCLUDES) $(DEFS) $(CFLAGS) -c $<
85 all: Makefile $(PROGS)
89 @cd ..; $(MAKE) saber SUBDIRS=src
92 @cd ..; $(MAKE) lint SUBDIRS=src
94 # CYGNUS LOCAL: Do not depend upon installdirs
96 @for prog in $(PROGS); do \
97 echo Installing $$prog in $(bindir); \
98 $(INSTALL) $$prog $(bindir)/$$prog ; \
102 $(SHELL) $(top_srcdir)/mkinstalldirs $(bindir)
104 .PHONY: install installdirs
107 RCSBIN=$(bindir) ; export RCSBIN ; $(SHELL) $(srcdir)/sanity.sh $(bindir)/cvs
111 if [ -x ../../rcs/src/rcs ] ; then \
112 RCSBIN=`pwd`/../../rcs/src ; \
115 $(SHELL) $(srcdir)/sanity.sh `pwd`/cvs
118 # I'm not sure there is any remaining reason for this to be separate from
121 $(SHELL) $(srcdir)/sanity.sh -r `pwd`/cvs
128 etags `for i in $(TAGFILES); do echo $(srcdir)/$$i; done`
135 /bin/rm -f $(PROGS) *.o core check.log check.plog
139 rm -f tags TAGS Makefile options.h
147 for i in ${DISTFILES}; do \
148 ln $(srcdir)/$${i} ${DISTDIR}; \
154 $(PROGS): ../lib/libcvs.a
157 $(CC) $(OBJECTS) ../lib/libcvs.a $(LIBS) $(LDFLAGS) -o $@
161 for i in $(SOURCES) ; do \
162 files="$$files $(srcdir)/$$i" ; \
164 sh -c "lint $(DEFS) $(INCLUDES) $$files | grep -v \"possible pointer alignment problem\" \
165 | grep -v \"argument closure unused\""
168 # load $(CFLAGS) $(SOURCES)
169 # load ../lib/libcvs.a $(LIBS)
173 cvs-`sed < $(srcdir)/version.c \
174 -e '/version_string/!d' \
175 -e 's/[^0-9.]*\([0-9.]*\).*/\1/' \
177 sed -e 's,xLIBDIRx,$(libdir)/cvs,g' \
178 -e "s,xVERSIONx,`cat .fname`,g" $(srcdir)/$@.sh > $@-t
185 $(OBJECTS): $(HEADERS) options.h
188 Makefile: ../config.status Makefile.in
189 cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
191 options.h: ../config.status options.h.in
192 cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
194 #../config.status: ../configure
195 # cd .. ; $(SHELL) config.status --recheck
197 #../configure: ../configure.in
198 # cd $(top_srcdir) ; autoconf