File: Makefile.in

package info (click to toggle)
recode 3.4.1-11
  • links: PTS
  • area: main
  • in suites: slink
  • size: 1,560 kB
  • ctags: 622
  • sloc: ansic: 10,572; perl: 339; makefile: 317; lisp: 243; sh: 173; lex: 165; awk: 127; sed: 10
file content (341 lines) | stat: -rw-r--r-- 10,608 bytes parent folder | download | duplicates (2)
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
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
# Makefile for GNU recode.
# Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
# Francois Pinard <pinard@iro.umontreal.ca>, 1988.

# 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 2, 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.

PACKAGE = @PACKAGE@
VERSION = @VERSION@
CATALOGS = fr.msg

SHELL = /bin/sh
srcdir = @srcdir@
VPATH = @srcdir@

BABYL = rmail/* rmail/*/* admin/*/RMAIL

# These CFLAGS values are not auto-configured:
# -DDIFF_HASH		For using GNU diff's hash algorithm instead.
# -DHASH_STATS		For printing a one-liner hash statistics.

msdos_PROGRAMS = recode
tcc_CC = tcc -v -N -mh -w-par

AR = ar
AWK = @AWK@
CC = @CC@
CFLAGS = @CFLAGS@
CPPFLAGS = @CPPFLAGS@
DEFS = @DEFS@
GLOCALE = @GLOCALE@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
LDFLAGS = @LDFLAGS@
LEX = @LEX@
LIBS = @LIBS@
MAKEINFO = makeinfo
PERL = perl
RANLIB = @RANLIB@
TEXI2DVI = texi2dvi

prefix = @prefix@
exec_prefix = @exec_prefix@
transform = @program_transform_name@
bindir = $(exec_prefix)/bin
datadir = $(prefix)/share
infodir = $(prefix)/info
localedir = $(datadir)/locale

COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
LINK = $(CC) $(LDFLAGS) -o $@

.SUFFIXES:
.SUFFIXES: .c .o
.c.o:
	$(COMPILE) $<

ANSI2KNR = @ANSI2KNR@
O = .@U@o

.SUFFIXES: ._c ._o
.c._c:
	./ansi2knr $< > $*.tmp && mv $*.tmp $@
._c._o:
	@echo $(COMPILE) $<
	@rm -f _$*.c
	@ln $< _$*.c && $(COMPILE) _$*.c && mv _$*.o $@ && rm _$*.c
.c._o:
	./ansi2knr $< > $*.tmp && mv $*.tmp $*._c
	@echo $(COMPILE) $*._c
	@rm -f _$*.c
	@ln $*._c _$*.c && $(COMPILE) _$*.c && mv _$*.o $@ && rm _$*.c

INCLUDES = -I. -I$(srcdir)

HEADERS = recode.h charname.h
SOURCES = recode.c charname.c charset.c $(C_STEPS) $(L_STEPS)
SOURCEX = recode.c charname.c charset.c $(C_STEPS) merged.c
OBJECTS = recode$O charname$O charset$O $(STEPOBJS)
LIBHDRS = getopt.h libintl.h pathmax.h
LIBSRCS = argmatch.c error.c getopt.c getopt1.c libintl.c xmalloc.c xstrdup.c
LIBOBJS = argmatch.o error.o getopt.o getopt1.o libintl$O xmalloc.o xstrdup.o \
locale.o

L_STEPS = ascilat1.l htmllat1.l ltexlat1.l txtelat1.l
C_STEPS = \
charset1.c charset2.c applemac.c atarist.c bangbang.c cdcnos.c \
ebcdic.c flat.c ibmpc.c iconqnx.c lat1asci.c lat1html.c lat1ltex.c \
lat1txte.c next.c
STEPOBJS = merged$O \
charset1$O charset2$O applemac$O atarist$O bangbang$O cdcnos$O \
ebcdic$O flat$O ibmpc$O iconqnx$O lat1asci$O lat1html$O lat1ltex$O \
lat1txte$O next$O

DISTFILES = \
README AUTHORS BACKLOG COPYING INSTALL LOCALE NEWS THANKS TODO ChangeLog \
Makefile.in acconfig.h aclocal.m4 configure.in install-sh mkinstalldirs \
config.h.in configure stamp-h.in \
recode.texi texinfo.tex stamp-vti version.texi charset.texi recode.info \
ansi2knr.c ansi2knr.1 c-boxes.el mergelex.awk \
$(HEADERS) $(SOURCES) $(LIBHDRS) $(LIBSRCS) checkit File-Latin1 \
stamp-init initstep.h merged.c TAGS \
rfc1345.txt charname.sed charname.pl charset.sed charset.pl \
fr.tt stamp-cod $(PACKAGE).cod $(CATALOGS) locale.c \
configdos dosfn dosfname README.tcc config_h.tcc Makefile.os2 config_h.os2 \
Makefile.tcc libobjs.tcc objects.tcc

all: recode.info recode $(CATALOGS)

info: recode.info

recode.info: recode.texi charset.texi version.texi
	cd $(srcdir) && $(MAKEINFO) --no-split recode.texi

dvi: recode.dvi

recode.dvi: recode.texi
	$(TEXI2DVI) $(srcdir)/recode.texi

version.texi: stamp-vti
stamp-vti: recode.texi configure.in
	echo "@set EDITION $(VERSION)" > version.tmp
	echo "@set UPDATED `date -r $(srcdir)/recode.texi '+%B %Y'`" \
	  >> version.tmp
	echo "@set VERSION $(VERSION)" >> version.tmp
	if cmp -s version.tmp $(srcdir)/version.texi; then rm version.tmp; \
	else mv version.tmp $(srcdir)/version.texi; fi
	date > $(srcdir)/stamp-vti

recode: initstep.h $(OBJECTS) librec.a
	$(LINK) $(OBJECTS) librec.a $(LIBS)

initstep.h: stamp-init
stamp-init: $(C_STEPS) merged.c
	@echo "updating initstep.h"
	@(cd $(srcdir) && sed -n 's/^\(module_[^ ]*\).*/  \1 ();/p' \
	  $(C_STEPS) merged.c ) > initstep.tmp
	@if cmp -s $(srcdir)/initstep.h initstep.tmp; then rm initstep.tmp; \
	else mv initstep.tmp $(srcdir)/initstep.h; fi
	date > $(srcdir)/stamp-init

merged.c: mergelex.awk $(L_STEPS)
	(cd $(srcdir) \
	  && $(AWK) -f mergelex.awk $(L_STEPS) \
	  && rm merged1.tmp merged2.tmp merged3.tmp) > merged.tm1
	$(LEX) -t8 merged.tm1 > merged.tm2
	grep -v '^# *line [0-9]' merged.tm2 > $(srcdir)/merged.c
	rm merged.tm1 merged.tm2

charname.h: charname.sed charname.pl rfc1345.txt
	cd $(srcdir) && \
	  sed -n -f charname.sed rfc1345.txt | $(PERL) charname.pl

# The next rule, used with -jN, launches many parallel occurrences
# of the action.  This is bad.  Any idea for solving this, someone?
charset1.c charset2.c charset.texi: charset.sed charset.pl rfc1345.txt
	cd $(srcdir) && sed -n -f charset.sed rfc1345.txt | $(PERL) charset.pl

$(OBJECTS) libintl$O: $(ANSI2KNR) config.h
recode$O charname$O charset$O $(STEPOBJS): recode.h
recode$O: initstep.h getopt.h
charname$O: charname.h

ansi2knr: ansi2knr.o
	$(LINK) ansi2knr.o $(LIBS)

librec.a: $(LIBOBJS)
	rm -f librec.a
	$(AR) cru librec.a $(LIBOBJS)
	$(RANLIB) librec.a

$(LIBOBJS): config.h
getopt.o getopt1.o: getopt.h

.SUFFIXES: .msg .tt
.tt.msg:
	cd $(srcdir) && \
	  make-msg $*.tt $(PACKAGE).cod > $*.tmp && mv $*.tmp $@

$(CATALOGS): $(PACKAGE).cod

libintl.o: libintl.c libintl.h
	$(COMPILE) -DLOCALEDIR=\"$(localedir)\" $(srcdir)/libintl.c

locale.c: $(PACKAGE).cod
	cd $(srcdir) && \
	  code-to-tbl $(PACKAGE).cod > locale.tmp && mv locale.tmp $@

$(PACKAGE).cod: stamp-cod
stamp-cod: $(SOURCEX)
	test $(GLOCALE) = no || { cd $(srcdir) && \
	  extract-msgs $(SOURCEX) > stamp-cod.tmp && \
	  if cmp -s stamp-cod.tmp $(PACKAGE).cod; then rm stamp-cod.tmp; \
	  else mv stamp-cod.tmp $(PACKAGE).cod; fi; }
	date > $(srcdir)/stamp-cod

CHECKING = @$(srcdir)/checkit $(srcdir)/COPYING

check: recode
	@./recode --version
	$(CHECKING) texte texte
	$(CHECKING) texte latin1
	$(CHECKING) texte ibmpc
	$(CHECKING) texte iconqnx
	$(CHECKING) texte bangbang
	$(CHECKING) ascii-bs ebcdic
	@echo "All checks completed successfully."

autocheck:
	@echo "The following test may take part of an hour.  Be patient."
	@(./recode --auto-check | grep UNACH | grep -v '^flat') || exit 0

install: all
	$(srcdir)/mkinstalldirs $(bindir) $(infodir)
	$(INSTALL_DATA) $(srcdir)/recode.info $(infodir)/recode.info
	$(INSTALL_PROGRAM) recode $(bindir)/`echo recode | sed '$(transform)'`
	for name in $(CATALOGS); do \
	  lang=`echo $$name | sed 's/.msg$$//'`; \
	  $(srcdir)/mkinstalldirs $(localedir)/$$lang; \
	  $(INSTALL_DATA) $(srcdir)/$$name \
		$(localedir)/$$lang/$(PACKAGE).msg; \
	done

uninstall:
	rm -f $(infodir)/recode.info
	rm -f $(bindir)/`echo recode | sed '$(transform)'`
	for name in $(CATALOGS); do \
	  lang=`echo $$name | sed 's/.msg$$//'`; \
	  rm -f $(localedir)/$$lang/$(PACKAGE).msg; \
	done

tags: TAGS

TAGS: $(HEADERS) $(SOURCES) $(LIBHDRS) $(LIBSRCS)
	cd $(srcdir) && etags $(HEADERS) $(SOURCES) $(LIBHDRS) $(LIBSRCS)

mostlyclean:
	rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.log *.pg *.toc *.tp *.vr
	rm -f *.a *.o *._c *._o core core.*
	rm -f *.tmp yy.tab.*

clean: mostlyclean
	rm -f recode

distclean: clean
	rm -f ansi2knr
	rm -f Makefile config.cache config.h config.log stamp-h config.status

# This goal is not meant for real situations.  Do not use it.
realclean: distclean
	rm -f stamp-vti version.texi charset.texi recode.info
	rm -f stamp-init initstep.h charset1.c charset2.c charname.h merged.c
	rm -f TAGS
	rm -f $(PACKAGE).cod $(CATALOGS) locale.c

dist: $(DISTFILES)
	rm -rf $(PACKAGE)-$(VERSION)
	mkdir $(PACKAGE)-$(VERSION)
	chmod 777 $(PACKAGE)-$(VERSION)
	@echo "Copying distribution files"
	@for file in $(DISTFILES); do \
	  ln $(srcdir)/$$file $(PACKAGE)-$(VERSION) 2> /dev/null \
	    || cp -p $(srcdir)/$$file $(PACKAGE)-$(VERSION); \
	done
	chmod -R a+r $(PACKAGE)-$(VERSION)
	tar chozf $(PACKAGE)-$(VERSION).tar.gz $(PACKAGE)-$(VERSION)
	rm -rf $(PACKAGE)-$(VERSION)

Makefile.tcc: configdos Makefile.in
	cd $(srcdir) && $(PERL) configdos -tcc

libobjs.tcc: Makefile.in
	rm -f $(srcdir)/libobjs.tcc
	for name in $(LIBOBJS) $(MSDOS_LIBOBJS); do \
	  echo $$name | sed 's/^/+ /;s/$$/bj \&/' >> $(srcdir)/libobjs.tcc; \
	done
	echo , >> $(srcdir)/libobjs.tcc

objects.tcc: Makefile.in
	rm -f $(srcdir)/objects.tcc
	for name in $(OBJECTS); do \
	  echo $$name | sed 's/$$/bj/' >> $(srcdir)/objects.tcc; \
	done

distdos: $(DISTFILES) recode
	echo `$(PERL) $(srcdir)/dosfname $(PACKAGE) $(VERSION)`a > .fname
	rm -rf `cat .fname`
	mkdir `cat .fname`
	@echo "Copying distribution files"
	@for file in $(DISTFILES); do \
	  ln $(srcdir)/$$file `cat .fname` 2> /dev/null \
	    || cp -p $(srcdir)/$$file `cat .fname`; \
	done
	cd `cat .fname` \
	  && touch -r configure config.status \
	  && sed 's/@PACKAGE@/$(PACKAGE)/;s/@VERSION@/$(VERSION)/' \
	    config_h.tcc > config.h \
	  && rm config_h.tcc \
	  && mv Makefile.tcc makefile
	echo "distexe: recode.exe" >> `cat .fname`/makefile
	echo "	zoo ah `cat .fname`x.zoo readme readme.dos copying \
	  recode.inf recode.exe $(CATALOGS)" >> `cat .fname`/makefile
	find `cat .fname` -type f | xargs chmod +w
	find `cat .fname` -type f | xargs $(PERL) $(srcdir)/dosfn
	find `cat .fname` -type f | xargs ./recode -v :ibmpc
	find `cat .fname` -type f | zoo ahI `cat .fname`s.zoo
	rm -rf `cat .fname` .fname

# For an explanation of the following Makefile rules, see node
# `Automatic Remaking' in GNU Autoconf documentation.
Makefile: Makefile.in config.status
	CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status
config.status: configure
	./config.status --recheck
configure: configure.in aclocal.m4
	cd $(srcdir) && autoconf

config.h: stamp-h
stamp-h: config.h.in config.status
	CONFIG_FILES= CONFIG_HEADERS=config.h ./config.status
	date > stamp-h
config.h.in: stamp-h.in
stamp-h.in: configure.in aclocal.m4 acconfig.h
	cd $(srcdir) && autoheader
	date > $(srcdir)/stamp-h.in

# Tell versions [3.59,3.63) of GNU make not to export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT: