xref: /netbsd-src/external/gpl2/rcs/dist/src/Makefile.in (revision 7bdc26784bf54dccf8e31c40b2af54b918f70f81)
1# Make RCS.
2
3#	Id: Makefile.in,v 5.26 1995/06/16 06:19:24 eggert Exp
4
5# Copyright 1982, 1988, 1989 Walter Tichy
6# Copyright 1990, 1991, 1992, 1993, 1994, 1995 Paul Eggert
7#   Distributed under license by the Free Software Foundation, Inc.
8#
9# This file is part of RCS.
10#
11# RCS is free software; you can redistribute it and/or modify
12# it under the terms of the GNU General Public License as published by
13# the Free Software Foundation; either version 2, or (at your option)
14# any later version.
15#
16# RCS is distributed in the hope that it will be useful,
17# but WITHOUT ANY WARRANTY; without even the implied warranty of
18# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19# GNU General Public License for more details.
20#
21# You should have received a copy of the GNU General Public License
22# along with RCS; see the file COPYING.
23# If not, write to the Free Software Foundation,
24# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25#
26# Report problems and direct all questions to:
27#
28#    rcs-bugs@cs.purdue.edu
29
30
31# default target
32default :: all
33
34# See the file INSTALL.RCS for more information on the configuration section.
35# ----- start of configuration section -----
36
37#(Unix
38
39srcdir = @srcdir@
40VPATH = @srcdir@
41prefix = @prefix@
42exec_prefix = @exec_prefix@
43
44CC = @CC@
45CPPFLAGS = @CPPFLAGS@
46CFLAGS = @CFLAGS@
47DEFS = @DEFS@
48DIFF = @DIFF@
49DIFF3 = @DIFF3@
50DIFF3_BIN = @DIFF3_BIN@
51DIFFFLAGS = @DIFFFLAGS@
52DIFF_L = @DIFF_L@
53DIFF_FAILURE = @DIFF_FAILURE@
54DIFF_SUCCESS = @DIFF_SUCCESS@
55DIFF_TROUBLE = @DIFF_TROUBLE@
56ED = @ED@
57INSTALL = @INSTALL@
58INSTALL_DATA = @INSTALL_DATA@
59INSTALL_PROGRAM = @INSTALL_PROGRAM@
60LDFLAGS = @LDFLAGS@
61LIBS = @LIBS@
62SENDMAIL = @SENDMAIL@
63
64
65# The following definitions can be tailored by hand;
66# this shouldn't be needed for ordinary installations.
67
68 bindir = $(exec_prefix)/bin
69
70 ALL_CFLAGS = $(CPPFLAGS) -Dhas_conf_h $(DEFS) -I. -I$(srcdir) $(CFLAGS)
71
72 COMPAT2 = 0
73#COMPAT2 = 1
74
75 LIBOBJS =
76
77 LINK = $(CC) $(LDFLAGS) $(CFLAGS)
78
79 LINT = lint -abchx# traditional and BSD lint
80#LINT = lint# System V lint
81
82#RCSPREFIX should end in `/' if it is not empty.
83 RCSPREFIX = $(bindir)/
84
85 REMOVE = rm -f
86
87 o = .o
88#o = .s# Minix/PC with ACK cc
89
90 x =
91
92#)
93# On non-Unix hosts you must manually create and edit conf.h from conf.heg.
94
95# ----- end of configuration section -----
96# You shouldn't have to change anything past this point.
97
98
99# Avoid brain damage in some versions of 'make'.
100SHELL = /bin/sh
101
102PROGRAMS = ci$x co$x ident$x merge$x \
103	rcs$x rcsclean$x rcsdiff$x rcsmerge$x rlog$x
104
105all :: $(PROGRAMS)
106
107.SUFFIXES :
108.SUFFIXES : .c $o
109.c$o :
110	$(CC) -c $(ALL_CFLAGS) $<
111
112installdirs :: ../mkinstalldirs
113	$(srcdir)/../mkinstalldirs $(bindir)
114
115install :: all installdirs
116	for p in $(PROGRAMS); do \
117	  $(INSTALL_PROGRAM) $$p $(bindir)/$$p; \
118	done
119
120uninstall ::
121	for p in $(PROGRAMS); do \
122	  $(REMOVE) $(bindir)/$$p; \
123	done
124
125# Install RCS and (if applicable) GNU diff before running these tests.
126# To test RCS before installing it, see the file INSTALL.RCS.
127RCSTEST = \
128	ALL_CFLAGS='$(ALL_CFLAGS)' CC='$(CC)' DIFF='$(DIFF)' \
129	LDFLAGS='$(LDFLAGS)' LIBS='$(LIBS)' \
130	PATH=$(bindir):$$PATH \
131	sh $(srcdir)/rcstest
132installcheck ::
133	$(RCSTEST)
134installdebug ::
135	$(RCSTEST) -v
136
137clean ::
138	$(REMOVE) a.* RCS/a.*
139	$(REMOVE) *$o
140	$(REMOVE) $(PROGRAMS)
141	$(REMOVE) conf.err core core.* *.core
142
143mostlyclean :: clean
144
145distclean :: mostlyclean
146	$(REMOVE) conf.h Makefile
147
148maintainer-clean :: distclean
149	@echo "This command is intended for maintainers to use;"
150	@echo "it deletes files that may require special tools to rebuild."
151	$(REMOVE) TAGS
152
153#(Unix
154conf.h : conf.sh Makefile
155	$(REMOVE) a.*
156	ALL_CFLAGS='$(ALL_CFLAGS)' \
157	CC='$(CC)' \
158	COMPAT2='$(COMPAT2)' \
159	DIFF3='$(DIFF3)' DIFF3_BIN='$(DIFF3_BIN)' \
160	DIFF='$(DIFF)' DIFFFLAGS='$(DIFFFLAGS)' DIFF_L='$(DIFF_L)' \
161	DIFF_SUCCESS='$(DIFF_SUCCESS)' \
162	DIFF_FAILURE='$(DIFF_FAILURE)' \
163	DIFF_TROUBLE='$(DIFF_TROUBLE)' \
164	ED='$(ED)' \
165	LDFLAGS='$(LDFLAGS)' LIBS='$(LIBS)' \
166	RCSPREFIX='$(RCSPREFIX)' \
167	SENDMAIL='$(SENDMAIL)' \
168	$(SHELL) -x $(srcdir)/conf.sh 3>&1 >a.h 2>conf.err
169	mv a.h $@
170	$(REMOVE) a.* core core.* *.core
171#)
172
173ci = ci$o rcslex$o rcssyn$o rcsgen$o rcsedit$o rcskeys$o rcsmap$o \
174	rcsrev$o rcsutil$o rcsfnms$o maketime$o partime$o rcstime$o rcskeep$o \
175	rcsfcmp$o version$o $(LIBOBJS)
176ci$x : $(ci)
177	$(LINK) $(ci) -o $@ $(LIBS)
178
179co = co$o rcslex$o rcssyn$o rcsgen$o rcsedit$o rcskeys$o rcsmap$o \
180	rcsrev$o rcsutil$o rcsfnms$o maketime$o partime$o rcstime$o rcskeep$o \
181	version$o $(LIBOBJS)
182co$x : $(co)
183	$(LINK) $(co) -o $@ $(LIBS)
184
185ident = ident$o rcsmap$o version$o $(LIBOBJS)
186ident$x : $(ident)
187	$(LINK) $(ident) -o $@ $(LIBS)
188
189merge = merge$o merger$o rcsfnms$o rcslex$o \
190	rcsmap$o rcsrev$o rcssyn$o rcsutil$o \
191	rcskeep$o rcskeys$o maketime$o partime$o rcstime$o version$o \
192	$(LIBOBJS)
193merge$x : $(merge)
194	$(LINK) $(merge) -o $@ $(LIBS)
195
196rlog = rlog$o rcslex$o rcsmap$o rcssyn$o rcsrev$o rcsutil$o \
197	maketime$o partime$o rcstime$o rcsfnms$o rcskeep$o rcskeys$o \
198	version$o $(LIBOBJS)
199rlog$x : $(rlog)
200	$(LINK) $(rlog) -o $@ $(LIBS)
201
202rcs = rcs$o rcslex$o rcssyn$o rcsrev$o rcsutil$o rcsgen$o \
203	rcsedit$o rcskeys$o rcsmap$o rcsfnms$o rcskeep$o \
204	maketime$o partime$o rcstime$o version$o $(LIBOBJS)
205rcs$x : $(rcs)
206	$(LINK) $(rcs) -o $@ $(LIBS)
207
208rcsclean = rcsclean$o rcsedit$o rcsfcmp$o rcsfnms$o rcsgen$o rcskeys$o \
209	rcslex$o rcsmap$o rcsrev$o rcssyn$o rcsutil$o rcskeep$o \
210	maketime$o partime$o rcstime$o version$o $(LIBOBJS)
211rcsclean$x : $(rcsclean)
212	$(LINK) $(rcsclean) -o $@ $(LIBS)
213
214rcsdiff = rcsdiff$o rcsutil$o rcsfnms$o rcsmap$o rcsrev$o rcssyn$o \
215	rcslex$o maketime$o partime$o rcstime$o rcskeep$o rcskeys$o \
216	version$o $(LIBOBJS)
217rcsdiff$x : $(rcsdiff)
218	$(LINK) $(rcsdiff) -o $@ $(LIBS)
219
220rcsmerge = rcsmerge$o merger$o rcsutil$o rcsfnms$o rcsmap$o rcsrev$o \
221	rcssyn$o rcslex$o rcskeep$o rcskeys$o \
222	maketime$o partime$o rcstime$o version$o $(LIBOBJS)
223rcsmerge$x : $(rcsmerge)
224	$(LINK) $(rcsmerge) -o $@ $(LIBS)
225
226SOURCE=	ci.c co.c ident.c maketime.c merge.c merger.c partime.c rcs.c \
227	rcsclean.c rcsdiff.c rcsedit.c rcsfcmp.c rcsfnms.c rcsgen.c \
228	rcskeep.c rcskeys.c rcslex.c rcsmap.c rcsmerge.c rcsrev.c rcssyn.c \
229	rcstime.c rcsutil.c rlog.c version.c
230OBJECT=	ci$o co$o ident$o maketime$o merge$o merger$o partime$o rcs$o \
231	rcsclean$o rcsdiff$o rcsedit$o rcsfcmp$o rcsfnms$o rcsgen$o \
232	rcskeep$o rcskeys$o rcslex$o rcsmap$o rcsmerge$o rcsrev$o rcssyn$o \
233	rcstime$o rcsutil$o rlog$o version$o
234
235lint :: conf.h
236	$(LINT) -DRCS_lint=1 $(ALL_CFLAGS) $(SOURCE)
237
238TAGS : $(SOURCE)
239	etags $(SOURCE)
240
241dvi info ::
242
243conf_h = conf.h
244$(OBJECT) : $(conf_h) rcsbase.h
245maketime$o partime$o rcstime$o : partime.h
246maketime$o rcstime$o : maketime.h
247