source: main/trunk/greenstone2/common-src/packages/gdbm/gdbm-1.8.3/Makefile.in@ 28113

Last change on this file since 28113 was 28113, checked in by ak19, 11 years ago

The Linux gdbm.h file, which gets re-generated during compilation, was wrong after yesterday's changes to gdbmerrno.h. The gdbm.h file is composed of 3 static files including gdbmerrno.h. The Makefile is what puts them together. But it was using a grep on underscores instead of a plain cat to stream the contents of gdbmerrno.h into the constructed gdbm.h. The filter on underscore left out the newly added hash-endif lines, so the Makefile now resorts to just cat-ing the contents of gdbmerrno.h.

File size: 8.8 KB
Line 
1#### Start of system configuration section. ####
2
3srcdir = @srcdir@
4top_builddir = .
5VPATH = @srcdir@
6
7CC = @CC@
8LIBTOOL = @LIBTOOL@
9
10# GDBM 1.8.3 builds shared libraries version 3.0
11SHLIB_VER = 3 0 0
12
13INSTALL = @INSTALL@
14INSTALL_PROGRAM = @INSTALL_PROGRAM@
15INSTALL_DATA = @INSTALL_DATA@
16
17# File ownership and group
18BINOWN = bin
19BINGRP = bin
20
21MAKEINFO = makeinfo
22TEXI2DVI = texi2dvi
23
24DEFS =
25
26# Where the system [n]dbm routines are...
27LIBS = @LIBS@ -lc
28
29CFLAGS = @CFLAGS@ @ARCH_DEP_FLAGS@
30LDFLAGS = @LDFLAGS@ @ARCH_DEP_FLAGS@
31
32ifeq ($(GSDLOS),windows)
33 # Let MinGW/MSys tap into Windows code for GDBM
34 CFLAGS += -DMSDOS
35endif
36
37# Common prefix for installation directories
38prefix = @prefix@
39exec_prefix = @exec_prefix@
40binprefix = $(exec_prefix)
41manprefix = $(prefix)
42
43# Directory in which to put libgdbm.a.
44libdir = @libdir@
45# The include directory for gdbm.h and dbm.h.
46includedir = @includedir@
47# Info and man directories.
48infodir = @infodir@
49man3dir = @mandir@/man3
50manext = 3
51
52#### End of system configuration section. ####
53
54.SUFFIXES:
55.SUFFIXES: .c .lo .o
56
57.c.o:
58 $(CC) -c $(CPPFLAGS) $(DEFS) -I. -I$(srcdir) $(CFLAGS) $<
59
60.c.lo:
61 $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(DEFS) -I. -I$(srcdir) $(CFLAGS) $<
62
63SHELL = /bin/sh
64
65PROGS = libgdbm.la testgdbm testdbm testndbm tndbm tdbm conv2gdbm
66
67DBM_CF = dbminit.c delete.c fetch.c store.c seq.c close.c
68
69NDBM_CF = dbmopen.c dbmdelete.c dbmfetch.c dbmstore.c dbmseq.c \
70 dbmclose.c dbmdirfno.c dbmpagfno.c dbmrdonly.c
71
72GDBM_CF = gdbmopen.c gdbmdelete.c gdbmfetch.c gdbmstore.c gdbmclose.c \
73 gdbmreorg.c gdbmseq.c gdbmsync.c gdbmerrno.c gdbmexists.c gdbmfdesc.c \
74 gdbmsetopt.c bucket.c falloc.c findkey.c global.c hash.c update.c \
75 version.c gsdlmods.c
76
77TEST_CF = testdbm.c testndbm.c testgdbm.c
78
79
80DBM_OF = dbminit.o delete.o fetch.o store.o seq.o close.o
81
82NDBM_OF = dbmopen.o dbmdelete.o dbmfetch.o dbmstore.o dbmseq.o \
83 dbmclose.o dbmdirfno.o dbmpagfno.o dbmrdonly.o
84
85GDBM_OF = gdbmopen.o gdbmdelete.o gdbmfetch.o gdbmstore.o gdbmclose.o \
86 gdbmreorg.o gdbmseq.o gdbmsync.o gdbmerrno.o gdbmexists.o gdbmfdesc.o \
87 gdbmsetopt.o bucket.o falloc.o findkey.o global.o hash.o update.o \
88 version.o gsdlmods.o
89
90DBM_LOF = dbminit.lo delete.lo fetch.lo store.lo seq.lo close.lo
91
92NDBM_LOF = dbmopen.lo dbmdelete.lo dbmfetch.lo dbmstore.lo dbmseq.lo \
93 dbmclose.lo dbmdirfno.lo dbmpagfno.lo dbmrdonly.lo
94
95GDBM_LOF = gdbmopen.lo gdbmdelete.lo gdbmfetch.lo gdbmstore.lo gdbmclose.lo \
96 gdbmreorg.lo gdbmseq.lo gdbmsync.lo gdbmerrno.lo gdbmexists.lo \
97 gdbmfdesc.lo gdbmsetopt.lo bucket.lo falloc.lo findkey.lo global.lo \
98 hash.lo update.lo version.lo gsdlmods.lo
99
100TEX_F = gdbm.aux gdbm.cp gdbm.dvi gdbm.fn gdbm.ky gdbm.log gdbm.pg \
101 gdbm.toc gdbm.tp gdbm.vr
102
103TEXI_F = gdbm.info
104
105SRCS = $(DBM_CF) $(NDBM_CF) $(GDBM_CF) $(TEST_CF)
106
107# The old all in one library:
108#OBJS = $(DBM_OF) $(NDBM_OF) $(GDBM_OF)
109#
110#LOBJS = $(DBM_LOF) $(NDBM_LOF) $(GDBM_LOF)
111
112# The new split libraries:
113OBJS = $(GDBM_OF)
114LOBJS = $(GDBM_LOF)
115
116C_OBJS = $(DBM_OF) $(NDBM_OF)
117C_LOBJS = $(DBM_LOF) $(NDBM_LOF)
118
119HDRS = gdbmdefs.h extern.h gdbmerrno.h systems.h dbm.h ndbm.h gdbmconst.h \
120 proto.h
121
122#MSCFILES = COPYING ChangeLog Makefile.in README gdbm.3 gdbm.texinfo \
123# gdbm.info NEWS INSTALL gdbm.proto gdbm.proto2 conv2gdbm.c \
124# configure configure.in getopt.c getopt.h samp1.cc \
125# autoconf.h.in install-sh mkinstalldirs config.guess config.sub \
126# aclocal.m4 ltconfig ltmain.sh
127
128MSCFILES = COPYING ChangeLog Makefile.in README gdbm.3 \
129 NEWS INSTALL gdbm.proto gdbm.proto2 conv2gdbm.c \
130 configure configure.in getopt.c getopt.h samp1.cc \
131 autoconf.h.in install-sh mkinstalldirs config.guess config.sub \
132 aclocal.m4 ltconfig ltmain.sh
133
134DISTFILES = $(SRCS) $(HDRS) $(MSCFILES)
135
136all: libgdbm.la libgdbm_compat.la
137
138progs: $(PROGS)
139
140#install: libgdbm.la gdbm.h gdbm.info
141install: libgdbm.la gdbm.h
142 $(srcdir)/mkinstalldirs $(INSTALL_ROOT)$(libdir) \
143 $(INSTALL_ROOT)$(includedir) $(INSTALL_ROOT)$(man3dir) \
144 $(INSTALL_ROOT)$(infodir)
145 $(LIBTOOL) $(INSTALL) -c libgdbm.la $(INSTALL_ROOT)$(libdir)/libgdbm.la
146 $(INSTALL_DATA) gdbm.h \
147 $(INSTALL_ROOT)$(includedir)/gdbm.h
148 $(INSTALL_DATA) $(srcdir)/gdbm.3 \
149 $(INSTALL_ROOT)$(man3dir)/gdbm.3
150# $(INSTALL_DATA) $(srcdir)/gdbm.info \
151# $(INSTALL_ROOT)$(infodir)/gdbm.info
152
153install-compat:
154 $(srcdir)/mkinstalldirs $(INSTALL_ROOT)$(libdir) \
155 $(INSTALL_ROOT)$(includedir)
156 $(LIBTOOL) $(INSTALL) -c libgdbm_compat.la \
157 $(INSTALL_ROOT)$(libdir)/libgdbm_compat.la
158 $(INSTALL_DATA) $(srcdir)/dbm.h \
159 $(INSTALL_ROOT)$(includedir)/dbm.h
160 $(INSTALL_DATA) $(srcdir)/ndbm.h \
161 $(INSTALL_ROOT)$(includedir)/ndbm.h
162
163#libgdbm.a: $(OBJS) gdbm.h
164# rm -f libgdbm.a
165# ar q libgdbm.a $(OBJS)
166# $(RANLIB) libgdbm.a
167
168libgdbm.la: $(LOBJS) gdbm.h
169 rm -f libgdbm.la
170## $(CC) -shared $(LDFLAGS) -o libgdbm.so $(LOBJS)
171 $(LIBTOOL) --mode=link $(CC) -Wc,$(LDFLAGS) -o libgdbm.la -rpath $(libdir) \
172 -version-info $(SHLIB_VER) $(LOBJS)
173
174libgdbm_compat.la: $(C_LOBJS) gdbm.h
175 rm -f libgdbm_compat.la
176## $(CC) -shared $(LDFLAGS) -o libgdbm_compat.so $(C_LOBJS)
177 $(LIBTOOL) --mode=link $(CC) -Wc,$(LDFLAGS) -o libgdbm_compat.la -rpath $(libdir) \
178 -version-info $(SHLIB_VER) $(C_LOBJS)
179
180# gdbm.h is a concatenation of gdbm.proto + gdbmerrno.h + gdbm.proto2
181# The old code used to skip lines in gdbmerrno.h that didn't have an underscore
182# in them, in order to skip the large opening multiline comment. However, this
183# had the sideeffect of skipping important hash-endifs as well, so we're now using
184# just a plain cat to concatenate the entire file, including long opening comment.
185
186gdbm.h: gdbm.proto gdbmerrno.h gdbm.proto2
187 rm -f gdbm.h
188 cp $(srcdir)/gdbm.proto gdbm.h
189 chmod +w gdbm.h
190# grep _ $(srcdir)/gdbmerrno.h >> gdbm.h
191 cat $(srcdir)/gdbmerrno.h >> gdbm.h
192 cat $(srcdir)/gdbm.proto2 >> gdbm.h
193 chmod -w gdbm.h
194
195testgdbm: testgdbm.o libgdbm.la @LIBOBJS@
196 $(LIBTOOL) $(CC) $(LDFLAGS) -o testgdbm testgdbm.o libgdbm.la @LIBOBJS@
197
198testdbm: testdbm.o libgdbm.la libgdbm_compat.la
199 $(LIBTOOL) $(CC) $(LDFLAGS) -o testdbm testdbm.o libgdbm.la libgdbm_compat.la
200
201tdbm: testdbm.o
202 $(CC) $(LDFLAGS) -o tdbm testdbm.o $(LIBS)
203
204testndbm.o: testndbm.c
205 $(CC) -c -I. -I$(srcdir) $(CFLAGS) $(DEFS) -DGNU $(srcdir)/testndbm.c
206
207testndbm: testndbm.o libgdbm.la libgdbm_compat.la
208 $(LIBTOOL) $(CC) $(LDFLAGS) -o testndbm testndbm.o libgdbm.la libgdbm_compat.la
209
210tndbm.o: testndbm.c
211 cp $(srcdir)/testndbm.c ./tndbm.c
212 $(CC) -c -I. -I$(srcdir) $(CFLAGS) $(DEFS) ./tndbm.c
213 rm -f ./tndbm.c
214
215tndbm: tndbm.o
216 $(CC) $(LDFLAGS) -o tndbm tndbm.o $(LIBS)
217
218conv2gdbm: conv2gdbm.o libgdbm.la @LIBOBJS@
219 $(LIBTOOL) $(CC) $(LDFLAGS) -o conv2gdbm conv2gdbm.o $(LIBS) libgdbm.la @LIBOBJS@
220
221lintgdbm:
222 lint $(DEFS) $(LFLAGS) $(DBM_CF) $(NDBM_CF) $(GDBM_CF) testgdbm.c
223
224TAGS: $(SRCS)
225 etags $(SRCS)
226
227#info: gdbm.info
228
229#gdbm.info: gdbm.texinfo
230# $(MAKEINFO) $(srcdir)/gdbm.texinfo
231
232#dvi: gdbm.dvi
233
234#gdbm.dvi: gdbm.texinfo
235# $(TEXI2DVI) $(srcdir)/gdbm.texinfo
236
237clean:
238 rm -rf $(PROGS) $(TEX_F) *.a *.la *.o *.lo core *.core junk* \
239 .libs _libs
240
241mostlyclean: clean
242
243distclean: clean
244 rm -f Makefile autoconf.h config.status config.cache config.log \
245 gdbm.h libtool $(TEXI_F) *~
246
247realclean: distclean
248 rm -f TAGS
249 -rm -f \
250 `sed -n 's/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/gdbm-\1/p' \
251 version.c`.tar.gz
252
253dist:
254 echo \
255 `sed -n 's/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/gdbm-\1/p' \
256 version.c` > .fname
257 rm -rf `cat .fname`
258 mkdir `cat .fname`
259 ln $(DISTFILES) `cat .fname`
260 tar chf `cat .fname`.tar `cat .fname`
261 gzip `cat .fname`.tar
262 rm -rf `cat .fname` .fname
263
264# dbm files
265dbminit.o: autoconf.h gdbmdefs.h proto.h extern.h gdbmerrno.h
266delete.o: autoconf.h gdbmdefs.h proto.h extern.h
267fetch.o: autoconf.h gdbmdefs.h proto.h extern.h
268store.o: autoconf.h gdbmdefs.h proto.h extern.h
269seq.o: autoconf.h gdbmdefs.h proto.h extern.h
270
271# ndbm files
272dbmopen.o: autoconf.h gdbmdefs.h extern.h gdbmerrno.h
273dbmdelete.o: autoconf.h gdbmdefs.h extern.h
274dbmfetch.o: autoconf.h gdbmdefs.h extern.h
275dbmstore.o: autoconf.h gdbmdefs.h extern.h
276dbmseq.o: autoconf.h gdbmdefs.h extern.h
277dbmclose.o: autoconf.h gdbmdefs.h systems.h
278dbmpagfno.o: autoconf.h gdbmdefs.h extern.h
279dbmdirfno.o: autoconf.h gdbmdefs.h extern.h
280
281
282# gdbm files
283gdbmclose.o: autoconf.h gdbmdefs.h
284gdbmdelete.o: autoconf.h gdbmdefs.h gdbmerrno.h
285gdbmfetch.o: autoconf.h gdbmdefs.h gdbmerrno.h
286gdbmfdesc.o: autoconf.h gdbmdefs.h
287gdbmopen.o: autoconf.h gdbmdefs.h gdbmerrno.h
288gdbmreorg.o: autoconf.h gdbmdefs.h gdbmerrno.h extern.h
289gdbmseq.o: autoconf.h gdbmdefs.h
290gdbmstore.o: autoconf.h gdbmdefs.h gdbmerrno.h
291
292# gdbm support files
293bucket.o: autoconf.h gdbmdefs.h
294falloc.o: autoconf.h gdbmdefs.h
295findkey.o: autoconf.h gdbmdefs.h
296global.o: autoconf.h gdbmdefs.h gdbmerrno.h
297hash.o: autoconf.h gdbmdefs.h
298update.o: autoconf.h gdbmdefs.h
299version.o:
300extern.h:
301gdbmdefs.h: gdbmconst.h systems.h
302 touch gdbmdefs.h
303
304# other programs
305testgdbm.o: autoconf.h gdbmdefs.h extern.h gdbmerrno.h systems.h
306testdbm.o: autoconf.h
307testndbm.o: autoconf.h ndbm.h
308tdbm.o: autoconf.h
309conv2gdbm.o: autoconf.h gdbm.h
Note: See TracBrowser for help on using the repository browser.