blob: f02edf26101ea5068167bcf12caa12e21631f3b2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
|
# Makefile for GNU CVS program.
# Do not use this makefile directly, but only from `../Makefile'.
# Copyright (C) 1986, 1988-1990 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
SHELL = /bin/sh
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
# Where to install the executables.
bindir = $(exec_prefix)/bin
# Where to put the system-wide .cvsrc file
libdir = $(prefix)/lib
# Where to put the manual pages.
mandir = $(prefix)/man
# Use cp if you don't have install.
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
LIBS = @LIBS@
SOURCES = add.c admin.c buffer.c checkin.c checkout.c classify.c client.c \
commit.c create_adm.c cvsrc.c diff.c edit.c entries.c error.c expand_path.c \
fileattr.c find_names.c hash.c history.c ignore.c import.c \
lock.c log.c login.c logmsg.c main.c mkmodules.c modules.c myndbm.c no_diff.c \
parseinfo.c patch.c rcs.c rcscmds.c recurse.c release.c remove.c repos.c \
root.c rtag.c scramble.c server.c status.c subr.c filesubr.c run.c \
tag.c update.c watch.c wrapper.c vers_ts.c version.c zlib.c
OBJECTS = add.o admin.o buffer.o checkin.o checkout.o classify.o client.o \
commit.o create_adm.o cvsrc.o diff.o edit.o entries.o expand_path.o \
fileattr.o find_names.o hash.o history.o ignore.o import.o \
lock.o log.o login.o logmsg.o main.o mkmodules.o modules.o myndbm.o no_diff.o \
parseinfo.o patch.o rcs.o rcscmds.o recurse.o release.o remove.o repos.o \
root.o rtag.o scramble.o server.o status.o tag.o update.o \
watch.o wrapper.o vers_ts.o \
subr.o filesubr.o run.o version.o error.o zlib.o
HEADERS = buffer.h cvs.h rcs.h hash.h myndbm.h \
update.h server.h client.h error.h fileattr.h edit.h watch.h
TAGFILES = $(HEADERS) options.h.in $(SOURCES)
DISTFILES = .cvsignore Makefile.in \
ChangeLog ChangeLog-96 ChangeLog-9395 ChangeLog-9194 \
sanity.sh cvsbug.sh $(TAGFILES) build_src.com
PROGS = cvs cvsbug
DEFS = @DEFS@ @includeopt@
CC = @CC@
CFLAGS = @CFLAGS@
CPPFLAGS =
LDFLAGS = @LDFLAGS@
INCLUDES = -I. -I.. -I$(srcdir) -I$(top_srcdir)/lib
.c.o:
$(CC) $(CPPFLAGS) $(INCLUDES) $(DEFS) $(CFLAGS) -c $<
all: Makefile $(PROGS)
.PHONY: all
saber_cvs:
@cd ..; $(MAKE) saber SUBDIRS=src
lint:
@cd ..; $(MAKE) lint SUBDIRS=src
install: installdirs
@for prog in $(PROGS); do \
echo Installing $$prog in $(bindir); \
$(INSTALL) $$prog $(bindir)/$$prog ; \
done
installdirs:
$(SHELL) $(top_srcdir)/mkinstalldirs $(bindir)
.PHONY: install installdirs
installcheck:
RCSBIN=$(bindir) ; export RCSBIN ; $(SHELL) $(srcdir)/sanity.sh $(bindir)/cvs
.PHONY: installcheck
check: all
if [ -x ../../rcs/src/rcs ] ; then \
RCSBIN=`pwd`/../../rcs/src ; \
export RCSBIN ; \
fi ; \
$(SHELL) $(srcdir)/sanity.sh `pwd`/cvs
.PHONY: check
# I'm not sure there is any remaining reason for this to be separate from
# `make check'.
remotecheck: all
$(SHELL) $(srcdir)/sanity.sh -r `pwd`/cvs
.PHONY: remotecheck
tags: $(TAGFILES)
ctags $(TAGFILES)
TAGS: $(TAGFILES)
etags `for i in $(TAGFILES); do echo $(srcdir)/$$i; done`
ls:
@echo $(DISTFILES)
.PHONY: ls
clean:
/bin/rm -f $(PROGS) *.o core check.log check.plog
.PHONY: clean
distclean: clean
rm -f tags TAGS Makefile options.h
.PHONY: distclean
realclean: distclean
.PHONY: realclean
dist-dir:
mkdir ${DISTDIR}
for i in ${DISTFILES}; do \
ln $(srcdir)/$${i} ${DISTDIR}; \
done
.PHONY: dist-dir
# Linking rules.
$(PROGS): ../lib/libcvs.a ../zlib/libz.a
cvs: $(OBJECTS)
$(CC) $(OBJECTS) ../lib/libcvs.a ../zlib/libz.a $(LIBS) $(LDFLAGS) -o $@
xlint: $(SOURCES)
files= ; \
for i in $(SOURCES) ; do \
files="$$files $(srcdir)/$$i" ; \
done ; \
sh -c "lint $(DEFS) $(INCLUDES) $$files | grep -v \"possible pointer alignment problem\" \
| grep -v \"argument closure unused\""
saber: $(SOURCES)
# load $(CFLAGS) $(SOURCES)
# load ../lib/libcvs.a $(LIBS)
cvsbug: cvsbug.sh $(srcdir)/version.c
echo > .fname \
cvs-`sed < $(srcdir)/version.c \
-e '/version_string/!d' \
-e 's/[^0-9.]*\([0-9.]*\).*/\1/' \
-e q`
sed -e 's,xLIBDIRx,$(libdir)/cvs,g' \
-e "s,xVERSIONx,`cat .fname`,g" $(srcdir)/$@.sh > $@-t
rm -f .fname
mv $@-t $@
chmod a+x $@
# Compilation rules.
$(OBJECTS): $(HEADERS) options.h
zlib.o: zlib.c
$(CC) $(CPPFLAGS) $(INCLUDES) -I$(top_srcdir)/zlib $(DEFS) $(CFLAGS) -c $(srcdir)/zlib.c
subdir = src
Makefile: ../config.status Makefile.in
cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
options.h: ../config.status options.h.in
cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
#../config.status: ../configure
# cd .. ; $(SHELL) config.status --recheck
#../configure: ../configure.in
# cd $(top_srcdir) ; autoconf
|