1# Make RCS.
2
3# Copyright (C) 2010-2020 Thien-Thi Nguyen
4#
5# This file is part of GNU RCS.
6#
7# GNU RCS is free software: you can redistribute it and/or modify it
8# under the terms of the GNU General Public License as published by
9# the Free Software Foundation, either version 3 of the License, or
10# (at your option) any later version.
11#
12# GNU RCS is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty
14# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15# See the GNU General Public License for more details.
16#
17# You should have received a copy of the GNU General Public License
18# along with this program.  If not, see <http://www.gnu.org/licenses/>.
19
20# This is for the gnulib headers when srcdir != builddir.
21# Hmmm, shouldn't gnulib or automake handle this automagically?
22AM_CPPFLAGS = -I'$(top_srcdir)/lib'
23
24subs = ci co rcsclean rcsdiff rcsmerge rlog
25bin_SCRIPTS = $(subs)
26
27$(subs): sub.TEMPLATE
28	sed 's/SUB/$@/;s/VERSION/$(VERSION)/' $(srcdir)/sub.TEMPLATE > $@
29	chmod +x $@
30
31noinst_LIBRARIES = libparts.a
32libparts_a_SOURCES = \
33  b-complain.h b-divvy.h b-esds.h b-excwho.h b-fb.h b-feph.h b-fro.h \
34  b-grok.h b-isr.h b-kwxout.h b-merger.h b-peer.h b-yacmd.h \
35  base.h gnu-h-v.h maketime.h partime.h \
36  b-anchor.c \
37  b-complain.c b-divvy.c b-esds.c b-excwho.c b-fb.c b-feph.c b-fro.c \
38  b-grok.c b-isr.c b-kwxout.c b-peer.c \
39  gnu-h-v.c \
40  maketime.c merger.c partime.c rcsedit.c rcsfcmp.c rcsfnms.c \
41  rcsgen.c rcskeep.c rcsmap.c rcsrev.c \
42  rcstime.c rcsutil.c
43
44executables = ident merge rcs
45
46bin_PROGRAMS = $(executables)
47
48BUILT_SOURCES = $(subs:=.help) $(executables:=.help) super.help
49
50rcs_SOURCES = rcs.c $(subs:=.c) super.c
51
52LDADD = libparts.a -L$(top_builddir)/lib -lgnu
53LDADD += $(LIB_CLOCK_GETTIME)
54
55## This is segregated in case we want to conditionalize, later.
56LDADD += $(LIBTHREAD)
57
58CLEANFILES = $(BUILT_SOURCES) $(subs)
59
60EXTRA_DIST = sub.TEMPLATE
61
62.c.help:
63	$(top_srcdir)/build-aux/extract-help -o $@ $<
64	@ test -n $@ || { echo ERROR: $@ empty ; exit 1 ; }
65
66clean-local:
67	rm -rf RCS
68	rm -f a.*
69
70# Makefile.am ends here
71