File: Makefile.in

package info (click to toggle)
dict-gazetteer 1.3-3
  • links: PTS
  • area: main
  • in suites: lenny, squeeze
  • size: 10,976 kB
  • ctags: 36
  • sloc: sh: 1,426; ansic: 316; makefile: 196
file content (197 lines) | stat: -rw-r--r-- 5,095 bytes parent folder | download | duplicates (3)
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
195
196
197
# Makefile.in -- Makefile for dict-wn
# Created: Sat Mar  8 15:41:40 1997 by faith@cs.unc.edu
# Revised: Sun Jul  5 17:54:36 1998 by faith@acm.org
# Copyright 1997, 1998 Rickard E. Faith (faith@acm.org)
# 
# 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 1, 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.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 675 Mass Ave, Cambridge, MA 02139, USA.
# 
# $Id: Makefile.in,v 1.3 1998/07/05 22:15:02 faith Exp $
#

VERSION=1.3
NAME=dict-gazetteer

ifneq (,)
This makefile requires GNU Make.
endif

.SUFFIXES:	

srcdir=		@srcdir@
VPATH=		@srcdir@
prefix=		@prefix@
datadir=        @datadir@
dictdir=        $(datadir)/dict
subdirs=        @subdirs@
exec_prefix=	@exec_prefix@
man1_prefix=	$(prefix)/man/man1

SHELL=		/bin/sh

CC=		@CC@
CPP=		@CPP@
RANLIB=		@RANLIB@
INSTALL=	@INSTALL@
INSTALL_PROGRAM=@INSTALL_PROGRAM@
INSTALL_DATA=	@INSTALL_DATA@
LEX=		@LEX@
LEXLIB= 	@LEXLIB@
YACC=		@YACC@
DICTZIP=        @DICTZIP@

CFLAGS=		@CFLAGS@
LDFLAGS=        @LDFLAGS@
XTRACFLAGS=     @WCFLAGS@ @XTRACFLAGS@ @DEFS@ @CPPFLAGS@ -I.
XTRALDFLAGS=    @WLDFLAGS@ @XTRALDFLAGS@
LDLIBS=		@LIBS@

EXES=	 	format

HEADERS= 	./config.h @XTRAHEADERS@

DATABASE=       gazetteer.dict
DATAINDEX=      gazetteer.index

#all::
#	 @for subdir in `echo $(subdirs)`; do \
#		 echo making in $$subdir; \
#		 (cd $$subdir && $(MAKE)) || exit 1; \
#	 done

all:: $(EXES)

db :: $(DATABASE)

$(DATABASE) $(DATAINDEX): $(EXES) data/*.txt
	./format -p < data/places.txt > tmp
	./format -c < data/counties.txt >> tmp
#	./format -m < data/mcds.txt >> tmp
	./format -z < data/zips.txt >> tmp
	sort tmp | ./format -f > $(DATABASE)
	-rm -f tmp
	if [ "$(DICTZIP)" != "cat" ]; then \
		dictzip $(DATABASE); \
	fi

install: $(DATAINDEX)
#	install -m 755 -d $(dictdir)
	if [ -e $(DATABASE).dz ]; then \
		install -m 644 $(DATABASE).dz $(dictdir); \
	else \
		install -m 644 $(DATABASE) $(dictdir); \
	fi
	install -m 644 $(DATAINDEX) $(dictdir)

pack: $(DATAINDEX)
	if [ -e $(DATABASE).dz ]; then \
		tar cvf /tmp/$(NAME)-$(VERSION)-pre.tar \
			$(DATABASE).dz $(DATAINDEX); \
	else \
		tar cvf /tmp/$(NAME)-$(VERSION)-pre.tar \
			$(DATABASE) $(DATAINDEX); \
	fi
	gzip -f9 /tmp/$(NAME)-$(VERSION)-pre.tar

%.o: %.c
	$(CC) -c $(XTRACFLAGS) $(CFLAGS) $<

ALLFLAGS=$(XTRACFLAGS) $(CFLAGS) $(XTRALDFLAGS) $(LDFLAGS)
%: %.c
	$(CC) $(ALLFLAGS) -o $@ $< $(OBJS) $(LDLIBS)

$(OBJS):  $(HEADERS)

format: format.c $(HEADERS) $(OBJS)
	$(CC) $(ALLFLAGS) -o $@ $< $(OBJS) $(LDLIBS)

.PHONY: ChangeLog
ChangeLog:
	@(echo "***** Making new ChangeLog..."; \
	rm -f ChangeLog; \
	AWK=gawk rcs2log -i 2 > ChangeLog)

dist: ChangeLog
	@(NAME=$(NAME); \
	export NAME; \
	CVSROOT=`cat CVS/Root`; \
	export CVSROOT; \
	VERSION=$(VERSION); \
	export VERSION; \
	echo "***** Copying ChangeLog for $${NAME}-$${VERSION}..."; \
	cp ChangeLog /tmp; \
	echo "***** Exporting files for $${NAME}-$${VERSION}..."; \
	cd /tmp; \
	rm -rf /tmp/$${NAME}-$${VERSION} /tmp/$${NAME}-$${VERSION}.tar.gz; \
	cvs export -fNd $${NAME}-$${VERSION} -r HEAD $${NAME}; \
	cd $${NAME}-$${VERSION}; \
	make -f Makefile.conf; \
	mv ../ChangeLog .; \
	cd ..; \
	echo "***** Taring and zipping $${NAME}-$${VERSION}.tar.gz..."; \
	tar cvvf $${NAME}-$${VERSION}.tar $${NAME}-$${VERSION}; \
	gzip -9 $${NAME}-$${VERSION}.tar; \
	echo "***** Done making /tmp/$${NAME}-$${VERSION}.tar.gz")

.PHONY: clean distclean tags
clean:
	-rm -f *.o *.s *~ core a.out config.log $(EXES) $(TMPS)
	-rm -f *.log *.aux *.toc *.dvi *.ps
	-rm -f *.cfg *.dtk .inslog tca.map
	-rm -f *.dct *.idx y.output

recursive-clean: clean
	@for subdir in `echo $(subdirs)`; do \
		echo making clean in $$subdir; \
		(cd $$subdir && $(MAKE) clean) || exit 1; \
	done

distclean: clean
#	 @for subdir in `echo $(subdirs)`; do \
#		 if [ "$subdir" != "zlib" ]; then \
#			 echo making $@ in $$subdir; \
#			 (cd $$subdir && $(MAKE) $@) || exit 1; \
#		 fi \
#	 done
	-rm -f config.h config.cache config.status stamp-h.in stamp-h
	-rm -f Makefile
#	-rm -f configure Makefile # We need to keep configure
	-rm -f $(DATABASE) $(DATABASE).dz $(DATAINDEX)

tags:
	etags *.[ch]


# The following is based on the "Automatic Remaking" node in the GNU
# Autoconf documentation:

$(srcdir)/configure: configure.in
	cd $(srcdir) && autoconf

# autoheader might not change config.h.in, so touch a stamp file.
${srcdir}/config.h.in: stamp-h.in
${srcdir}/stamp-h.in: configure.in
	cd ${srcdir} && autoheader
	date > ${srcdir}/stamp-h.in

config.h: stamp-h
stamp-h: config.h.in config.status
	./config.status

Makefile: Makefile.in config.status
	./config.status

config.status: configure
	./config.status --recheck