1 ## Process this file with automake to produce Makefile.in
2 # Makefile for library files used by GNU CVS.
4 # Copyright (C) 1986-2005 The Free Software Foundation, Inc.
6 # Portions Copyright (C) 1998-2005 Derek Price, Ximbiot <http://ximbiot.com>,
9 # This program is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation; either version 2, or (at your option)
14 # This program is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 # GNU General Public License for more details.
19 noinst_LIBRARIES = libcvs.a
21 # Should look into unifying regular expression matching in CVS
22 # with the diff library (perhaps to have the caller, CVS, do the
30 ## Because @LIBOBJS@ is included below and AC_LIBOBJ is sometimes called on
31 ## these files from configure.in, automake automatically knows about many of
32 ## the *.c files in this directory.
38 ## Zero some variables so Automake will allow us to use += on them.
42 MAINTAINERCLEANFILES =
56 ## begin gnulib module alloca
59 libcvs_a_LIBADD += @ALLOCA@
60 ## end gnulib module alloca
62 ## begin gnulib module alloca-opt
64 BUILT_SOURCES += $(ALLOCA_H)
65 EXTRA_DIST += alloca_.h
67 # We need the following in order to create <alloca.h> when the system
68 # doesn't have one that works with the given compiler.
70 cp $(srcdir)/alloca_.h $@-t
72 MOSTLYCLEANFILES += alloca.h alloca.h-t
74 ## end gnulib module alloca-opt
76 ## begin gnulib module allocsa
78 libcvs_a_SOURCES += allocsa.h allocsa.c
79 EXTRA_DIST += allocsa.valgrind
81 ## end gnulib module allocsa
83 ## begin gnulib module cycle-check
85 libcvs_a_SOURCES += cycle-check.c cycle-check.h dev-ino.h
87 ## end gnulib module cycle-check
89 ## begin gnulib module dirname
91 libcvs_a_SOURCES += basename.c stripslash.c
93 ## end gnulib module dirname
95 ## For GNULIB's error module.
97 ## This module isn't fully imported since GNULIB's error.c would conflict with
98 ## src/error.c (which knows how to send error messages over the network). We
99 ## don't compile error.c into libcvs on purpose. It can get compiled later as
100 ## part of the getdate test program,
101 libcvs_a_SOURCES += error.h
103 ## begin gnulib module exit
105 libcvs_a_SOURCES += exit.h
107 ## end gnulib module exit
109 ## begin gnulib module fnmatch
111 BUILT_SOURCES += $(FNMATCH_H)
112 EXTRA_DIST += fnmatch_.h fnmatch_loop.c
114 # We need the following in order to create <fnmatch.h> when the system
115 # doesn't have one that supports the required API.
116 fnmatch.h: fnmatch_.h
117 cp $(srcdir)/fnmatch_.h $@-t
119 MOSTLYCLEANFILES += fnmatch.h fnmatch.h-t
121 ## end gnulib module fnmatch
123 ## begin gnulib module getaddrinfo
125 libcvs_a_SOURCES += getaddrinfo.h
127 ## end gnulib module getaddrinfo
129 ## begin gnulib module getdate
131 ## CVS test scripts for getdate.
132 TESTS += test-getdate.sh
133 MOSTLYCLEANFILES += getdate-expected getdate-got getdate.diff
134 DISTCLEANFILES += getdate.log
135 # Program required by test-getdate.sh for testing getdate.y.
136 check_PROGRAMS += getdate
140 ## This source file was added only for the getdate test program when compiled
141 ## with GNULIB's error.c.
144 getdate_CPPFLAGS = -DTEST
146 $(noinst_LIBRARIES) \
147 $(LIB_CLOCK_GETTIME) \
150 BUILT_SOURCES += getdate.c
151 MAINTAINERCLEANFILES += getdate.c
152 EXTRA_DIST += getdate.c
154 ## end gnulib module getdate
156 ## begin gnulib module getndelim2
158 EXTRA_DIST += getndelim2.h getndelim2.c
160 ## end gnulib module getndelim2
162 ## begin gnulib module getnline
164 libcvs_a_SOURCES += getnline.h getnline.c
166 ## end gnulib module getnline
168 ## begin gnulib module getopt
170 BUILT_SOURCES += $(GETOPT_H)
171 EXTRA_DIST += getopt_.h getopt_int.h
173 # We need the following in order to create <getopt.h> when the system
174 # doesn't have one that works with the given compiler.
176 cp $(srcdir)/getopt_.h $@-t
178 MOSTLYCLEANFILES += getopt.h getopt.h-t
180 ## end gnulib module getopt
182 ## begin gnulib module gettext-h
184 libcvs_a_SOURCES += gettext.h
186 ## end gnulib module gettext-h
188 ## begin gnulib module glob
190 BUILT_SOURCES += $(GLOB_H)
192 # We need the following in order to create an <getopt.h> when the system
193 # doesn't have one that works with the given compiler.
194 all-local $(libcvs_a_OBJECTS): $(GLOB_H)
196 cp $(srcdir)/glob_.h $@-t
198 MOSTLYCLEANFILES += glob.h glob.h-t
200 ## end gnulib module glob.c
202 ## begin gnulib module mbuiter
204 libcvs_a_SOURCES += mbuiter.h
206 ## end gnulib module mbuiter
208 ## begin gnulib module minmax
210 libcvs_a_SOURCES += minmax.h
212 ## end gnulib module minmax
214 ## begin gnulib module setenv
216 libcvs_a_SOURCES += setenv.h
218 ## end gnulib module setenv
220 ## begin gnulib module size_max
222 libcvs_a_SOURCES += size_max.h
224 ## end gnulib module size_max
226 ## begin gnulib module stdbool
228 BUILT_SOURCES += $(STDBOOL_H)
229 EXTRA_DIST += stdbool_.h
231 # We need the following in order to create <stdbool.h> when the system
232 # doesn't have one that works.
233 stdbool.h: stdbool_.h
234 sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' \
235 < $(srcdir)/stdbool_.h > $@-t
237 MOSTLYCLEANFILES += stdbool.h stdbool.h-t
239 ## end gnulib module stdbool
241 ## begin gnulib module stdint
243 BUILT_SOURCES += $(STDINT_H)
244 EXTRA_DIST += stdint_.h
246 # We need the following in order to create <stdint.h> when the system
247 # doesn't have one that works with the given compiler.
249 sed -e 's/@''HAVE_LONG_64BIT''@/$(HAVE_LONG_64BIT)/g;s/@''HAVE_LONG_LONG_64BIT@/$(HAVE_LONG_LONG_64BIT)/g' < $(srcdir)/stdint_.h > $@-t
251 MOSTLYCLEANFILES += stdint.h stdint.h-t
253 ## end gnulib module stdint
255 ## begin gnulib module strcase
257 libcvs_a_SOURCES += strcase.h
259 ## end gnulib module strcase
261 ## begin gnulib module strnlen1
263 libcvs_a_SOURCES += strnlen1.h strnlen1.c
265 ## end gnulib module strnlen1
267 ## begin gnulib module strstr
269 libcvs_a_SOURCES += strstr.h
271 ## end gnulib module strstr
273 ## begin gnulib module time_r
275 libcvs_a_SOURCES += time_r.h
277 ## end gnulib module time_r
279 ## begin gnulib module vasnprintf
281 libcvs_a_SOURCES += printf-args.h printf-parse.h vasnprintf.h
283 ## end gnulib module vasnprintf
285 ## begin gnulib module vasprintf
287 libcvs_a_SOURCES += vasprintf.h
289 ## end gnulib module vasprintf
291 ## begin gnulib module xalloc-die
293 libcvs_a_SOURCES += xalloc-die.c
295 ## end gnulib module xalloc-die
297 ## begin gnulib module xgethostname
299 libcvs_a_SOURCES += xgethostname.h xgethostname.c
301 ## end gnulib module xgethostname
303 ## begin gnulib module xreadlink
305 libcvs_a_SOURCES += xreadlink.h xreadlink.c
307 ## end gnulib module xreadlink
309 ## begin gnulib module xsize
311 libcvs_a_SOURCES += xsize.h
313 ## end gnulib module xsize
315 # Until Automake gets its act together
319 # for backwards compatibility with the old makefiles
320 realclean: maintainer-clean