OSDN Git Service

Select compressed data streaming filters for use by setup tool.
[mingw/mingw-get.git] / Makefile.in
1 # @configure_input@
2 #
3 # $Id$
4
5 PACKAGE_TARNAME = @PACKAGE_TARNAME@
6 PACKAGE_VERSION = @PACKAGE_VERSION@
7
8 # Written by Keith Marshall <keithmarshall@users.sourceforge.net>
9 # Copyright (C) 2009-2013, MinGW.org Project
10 #
11 #
12 # Makefile template for mingw-get
13 #
14 #
15 # This is free software.  Permission is granted to copy, modify and
16 # redistribute this software, under the provisions of the GNU General
17 # Public License, Version 3, (or, at your option, any later version),
18 # as published by the Free Software Foundation; see the file COPYING
19 # for licensing details.
20 #
21 # Note, in particular, that this software is provided "as is", in the
22 # hope that it may prove useful, but WITHOUT WARRANTY OF ANY KIND; not
23 # even an implied WARRANTY OF MERCHANTABILITY, nor of FITNESS FOR ANY
24 # PARTICULAR PURPOSE.  Under no circumstances will the author, or the
25 # MinGW.org Project, accept liability for any damages, however caused,
26 # arising from the use of this software.
27 #
28 PACKAGE_SUBSYSTEM = @host_os@
29
30 CLI_RELEASE_CLASS = @CLI_RELEASE_CLASS@
31 GUI_RELEASE_CLASS = @GUI_RELEASE_CLASS@
32
33 BUILD_TAG = `>> build.tag; cat build.tag`
34 DEBUGLEVEL = @DEBUGLEVEL@
35
36 # Establish the appropriate mechanism for invoking 'make' recursively,
37 # WITHOUT incurring the noise of its "Entering directory..." messages.
38 #
39 @SET_MAKE@
40 QUIET_MAKE = $(MAKE)@NO_PRINT_DIRECTORY@
41
42 # Establish source code directory organisation, and set reference
43 # paths for access to source files.
44 #
45 srcdir = @srcdir@
46 abs_top_srcdir = @abs_top_srcdir@
47
48 vpath %.ico @srcdir@/icons
49 VPATH = @top_srcdir@/src:@top_srcdir@/src/pkginfo:@top_srcdir@/tinyxml
50
51 # Identify common build tools, and set their default options.
52 #
53 CC = @CC@
54 CFLAGS = @CFLAGS@
55 CPPFLAGS = @CPPFLAGS@ -D DEBUGLEVEL=$(DEBUGLEVEL) $(INCLUDES)
56
57 CXX = @CXX@
58 CXXFLAGS = $(CFLAGS)
59
60 INCLUDES = -I ${srcdir}/src -I ${srcdir}/src/pkginfo -I ${srcdir}/tinyxml
61
62 AR = @AR@
63 ARFLAGS = @ARFLAGS@
64
65 # A 'lex' compatible LALR(1) scanner is required for SCM sourced builds,
66 # or if the user modifies any 'lex' source.  This AC_PROG_LEX compatible
67 # macro set facilitates the handling of any situation where 'lex' is not
68 # available, but is required to complete the build.
69 #
70 LEX = @LEX@
71 LEX_COMMAND = $(LEX) $(LFLAGS) -t $< > $(LEX_OUTPUT)
72 LEX_COMMAND_ABORT = { $(LEX_MISSING); rm -f $(LEX_OUTPUT); exit 2; }
73 LEX_MISSING = (echo; echo $(LEX_MISSING_MESSAGE); echo) | $(FORMAT_MESSAGE)
74 LEX_MISSING_MESSAGE = "I cannot find the program 'lex' on your system; \
75 it is required because you either do not have the file '$@', or you appear \
76 to have modified the file '$<'.  If neither of these is the case, then you \
77 may wish to update the time stamp of '$@', so that it appears to be newer \
78 than '$<', before you run make again."
79 LEX_OUTPUT = @LEX_OUTPUT_ROOT@.c
80
81 # The following macro uses 'awk' to emulate a rudimentary 'nroff' filter,
82 # for formatting notification messages, such as those which are emitted to
83 # report the above "missing 'lex'" condition.
84
85 FORMAT_MESSAGE = awk '\
86   BEGIN       { $(AWK_CLEAR_LINE_BUFFER) }\
87   /^\. *br$$/ { $(AWK_PRINT_AND_CLEAR_BUFFER) }\
88   NF == 0     { $(AWK_COLLECT_BLANK_LINE) }\
89   /^[^.]/     { $(AWK_COLLECT_MESSAGE) }\
90   END         { $(AWK_FLUSH_LINE_BUFFER) }'
91
92 # Establish a default line length for formatting messages.
93 #
94 MESSAGE_FOLD_WIDTH = 68
95
96 # The following macros implement the internals of the message formatter.
97 #
98 AWK_CLEAR_LINE_BUFFER = linebuf = "";
99 AWK_FLUSH_LINE_BUFFER = if( linebuf != "" ){ $(AWK_PRINT_AND_CLEAR_BUFFER) }
100 AWK_PRINT_AND_CLEAR_BUFFER = $(AWK_PRINT_LINE_BUFFER) $(AWK_CLEAR_LINE_BUFFER)
101 AWK_COLLECT_MESSAGE = \
102   for( i = 0; i < NF; ) \
103   { if( linebuf == "" ) newbuf = $$++i; else \
104     { newbuf = linebuf; \
105       if( match( linebuf, "[.!?]$$" ) ) newbuf = newbuf " "; \
106       newbuf = newbuf " " $$++i; \
107     } \
108     if( length( newbuf ) > $(MESSAGE_FOLD_WIDTH) ) \
109     { print linebuf; \
110       linebuf = $$i; \
111     } \
112     else linebuf = newbuf; \
113   }
114 AWK_COLLECT_BLANK_LINE = $(AWK_FLUSH_LINE_BUFFER) $(AWK_PRINT_LINE_BUFFER)
115 AWK_PRINT_LINE_BUFFER = print linebuf; 
116
117 # Identify an appropriate resource compiler, for GUI builds,
118 # and define a set of script macros to propagate the build-time
119 # specific package meta-data into the compile resource modules.
120 #
121 RC = @RC@
122 RC_SCRIPT = tag=$(BUILD_TAG); \
123   test "x$$tag" != x && tag="-$(GUI_RELEASE_CLASS)-$$tag"; \
124     $(TAG_SCRIPT)
125
126 VERSION_SCRIPT = tag=$(BUILD_TAG); \
127   test "x$$tag" != x && tag="-$(CLI_RELEASE_CLASS)-$$tag"; \
128     $(TAG_SCRIPT)
129
130 TAG_SCRIPT = sed \
131   -e "s!%PACKAGE_NAME%!$(PACKAGE_TARNAME)!g" \
132   -e "s!%PACKAGE_VERSION%!$(PACKAGE_VERSION)$$tag!g" \
133   -e "s!%COPYRIGHT_HOLDER%!@COPYRIGHT_HOLDER@!g" \
134   -e "s!%YEARS_OF_ISSUE%!@YEARS_OF_ISSUE@!g"
135
136 RC_INCLUDES = -I ${srcdir}/src -I ${srcdir}/icons
137
138 # Specify extensions, and link-time requirements, for binary
139 # package deliverables.
140 #
141 OBJEXT = @OBJEXT@
142 EXEEXT = @EXEEXT@
143
144 LDFLAGS = @LDFLAGS@
145 GUI_LDFLAGS = -mwindows $(LDFLAGS)
146 LIBS = -Wl,-Bstatic -llua -lz -lbz2 -llzma -Wl,-Bdynamic -lwininet
147
148 # Define the content of package deliverables.
149 #
150 CORE_DLL_OBJECTS  =  climain.$(OBJEXT) pkgshow.$(OBJEXT) dmhcore.$(OBJEXT) \
151    pkgbind.$(OBJEXT) pkginet.$(OBJEXT) pkgstrm.$(OBJEXT) pkgname.$(OBJEXT) \
152    pkgexec.$(OBJEXT) pkgfind.$(OBJEXT) pkginfo.$(OBJEXT) pkgspec.$(OBJEXT) \
153    pkgopts.$(OBJEXT) sysroot.$(OBJEXT) pkghash.$(OBJEXT) pkgkeys.$(OBJEXT) \
154    pkgdeps.$(OBJEXT) pkgreqs.$(OBJEXT) pkginst.$(OBJEXT) pkgunst.$(OBJEXT) \
155    tarproc.$(OBJEXT) xmlfile.$(OBJEXT) keyword.$(OBJEXT) vercmp.$(OBJEXT) \
156    tinyxml.$(OBJEXT) tinystr.$(OBJEXT) tinyxmlparser.$(OBJEXT) \
157    mkpath.$(OBJEXT)  tinyxmlerror.$(OBJEXT)
158
159 CLI_EXE_OBJECTS  =   \
160    clistub.$(OBJEXT) version.$(OBJEXT) approot.$(OBJEXT) getopt.$(OBJEXT)
161
162 GUIMAIN_OBJECTS  =   \
163    guimain.$(OBJEXT) guiexec.$(OBJEXT) dmhguix.$(OBJEXT) \
164    approot.$(OBJEXT) pkgview.$(OBJEXT) pkgtree.$(OBJEXT) pkglist.$(OBJEXT) \
165    pkgdata.$(OBJEXT) pkgnget.$(OBJEXT) guimain.res.$(OBJEXT)
166
167 GUIMAIN_LIBS = -lwtklite -lcomctl32
168
169 script_srcdir = ${srcdir}/scripts/libexec
170
171 BIN_PROGRAMS = pkginfo$(EXEEXT) mingw-get$(EXEEXT)
172 LIBEXEC_PROGRAMS = guistub$(EXEEXT) guimain$(EXEEXT) lastrites$(EXEEXT)
173 LIBEXEC_SCRIPTS = ${script_srcdir}/setup.lua ${script_srcdir}/wsh.lua \
174    ${script_srcdir}/shlink.js ${script_srcdir}/unlink.js
175 LIBEXEC_DATA = mingw-get-0.dll
176
177 # Primary build goals...
178 #
179 all: $(BIN_PROGRAMS) $(LIBEXEC_PROGRAMS) $(LIBEXEC_DATA)
180
181 pkginfo$(EXEEXT):  driver.$(OBJEXT) pkginfo.$(OBJEXT)
182         $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $+
183
184 mingw-get$(EXEEXT): $(CLI_EXE_OBJECTS)
185         $(CXX) -o $@ $(CXXFLAGS) $(LDFLAGS) $+
186
187 guistub$(EXEEXT): guistub.$(OBJEXT) pkgicon.$(OBJEXT)
188         $(CXX) -o $@ $(CXXFLAGS) $(GUI_LDFLAGS) $+
189
190 guimain$(EXEEXT): $(GUIMAIN_OBJECTS) $(LIBEXEC_DATA)
191         $(CXX) -o $@ $(CXXFLAGS) $(GUI_LDFLAGS) $+ $(GUIMAIN_LIBS)
192
193 lastrites$(EXEEXT): rites.$(OBJEXT)
194         $(CC) -o $@ $(CFLAGS) $(GUI_LDFLAGS) $+
195
196 mingw-get-0.dll: $(CORE_DLL_OBJECTS)
197         $(CXX) -shared -o $@ $(CXXFLAGS) $(LDFLAGS) $+ $(LIBS)
198
199 # The following recursive invocation hook provides a mechanism for
200 # accessing make's facility for reporting what it is doing, even when
201 # the command to be invoked is encapsulated within a more complex block,
202 # which has been marked for explicit silent execution; usage is:
203 #
204 #   $(WITH_REQUEST)='command to be executed' execute-command
205 #
206 # (with no intervening white space around the assignment operator, and
207 #  ensuring that the command to be executed is appropriately quoted).
208 #
209 WITH_REQUEST = $(QUIET_MAKE) COMMAND
210 execute-command:
211         $(COMMAND)
212
213 # Compilation and dependency tracking...
214 #
215 DEPFLAGS = -MM -MP -MD
216 sinclude *.d
217
218 %.c: %.l
219         @test x$(LEX) = x: \
220           && { $(QUIET_MAKE) LEX=lex $(@F) || $(LEX_COMMAND_ABORT); } \
221           || $(WITH_REQUEST)='$(LEX_COMMAND)' execute-command
222         @test -f $(LEX_OUTPUT) && test -n "`cat $(LEX_OUTPUT)`" \
223           && $(WITH_REQUEST)='mv $(LEX_OUTPUT) $(@F)' execute-command \
224           || $(WITH_REQUEST)='rm -f $(LEX_OUTPUT)' execute-command
225
226 %.$(OBJEXT): %.c
227         $(CC) $(DEPFLAGS) $(CPPFLAGS) $(CFLAGS) $<
228         $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
229
230 %.$(OBJEXT): %.cpp
231         $(CXX) $(DEPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $<
232         $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) -o $@ $<
233
234 %.res.$(OBJEXT): %.rc
235         test ! -f $*.d || mv $*.d $*.d.bak
236         $(CC) $(DEPFLAGS) $(RC_INCLUDES) -DRC_INVOKED -xc-header $<
237         sed 's,$*\.$(OBJEXT):,$@:,' $*.d > $*.res.d; rm -f $*.d
238         $(RC_SCRIPT) $< | $(RC) $(RC_INCLUDES) -o $@
239         test ! -f $*.d.bak || mv $*.d.bak $*.d
240
241 %.$(OBJEXT): %.ico
242         echo $* ICON $*.ico | $(RC) -I ${srcdir}/icons -o $@
243
244 # Release tagging...
245 #
246 time-stamp:
247 %.tagged.time: time-stamp
248         > $*.time
249
250 %.time:
251         > $*.time
252
253 %.tag: %.tagged.time
254         >> $@; tag=`date +%Y%m%d`; \
255           tag=`awk -F- -v today=$$tag ' \
256             BEGIN { tag = 1 } $$1 == today { tag += $$2 } \
257             END { print today "-" tag }' $@`; \
258           echo $$tag > $@
259
260 %.c: %.c.in
261         $(VERSION_SCRIPT) $< > $@
262
263 version.c guimain.res.$(OBJEXT): Makefile build.time
264
265 # Installation tools and directory paths...
266 #
267 mkinstalldirs = @MKDIR_P@
268
269 prefix = @prefix@
270 exec_prefix = @exec_prefix@
271 localstatedir = @localstatedir@
272 libexecdir = @libexecdir@
273 bindir = @bindir@
274
275 PACKAGE_CONFIG_DIR = ${localstatedir}/lib/${PACKAGE_TARNAME}/data
276
277 INSTALL = @INSTALL@
278 INSTALL_DATA = @INSTALL_DATA@
279 INSTALL_PROGRAM = @INSTALL_PROGRAM@
280 INSTALL_SCRIPT = @INSTALL_SCRIPT@
281
282 STRIP = @STRIP@
283 LN_S = @LN_S@
284
285 # Installation rules...
286 #
287 installdirs:
288         $(mkinstalldirs) ${bindir}
289         $(mkinstalldirs) ${libexecdir}/${PACKAGE_TARNAME}
290         $(mkinstalldirs) ${PACKAGE_CONFIG_DIR}
291
292 install: installdirs install-profile
293         for image in $(BIN_PROGRAMS); do \
294           $(INSTALL_PROGRAM) $$image ${bindir}; \
295           done
296         for image in $(LIBEXEC_PROGRAMS); do \
297           $(INSTALL_PROGRAM) $$image ${libexecdir}/${PACKAGE_TARNAME}; \
298           done
299         for image in $(LIBEXEC_DATA) $(LIBEXEC_SCRIPTS); do \
300           $(INSTALL_DATA) $$image ${libexecdir}/${PACKAGE_TARNAME}; \
301           done
302
303 install-profile:
304         $(INSTALL_DATA) ${srcdir}/xml/profile.xml \
305           ${PACKAGE_CONFIG_DIR}/defaults.xml
306
307 install-strip: install
308         for image in $(BIN_PROGRAMS); do \
309           $(STRIP) ${bindir}/$$image; \
310           done
311         for image in $(LIBEXEC_PROGRAMS) $(LIBEXEC_DATA); do \
312           $(STRIP) ${libexecdir}/${PACKAGE_TARNAME}/$$image; \
313           done
314
315 # Packaging and distribution...
316 # "Native" source files, (i.e. those specific to mingw-get), are...
317 #
318 LICENCE_FILES = README COPYING
319 SRCDIST_FILES = $(LICENCE_FILES) ChangeLog NEWS INSTALL \
320   aclocal.m4 configure.ac configure Makefile.in
321
322 # ...plus the entire content of the sub-directories...
323 #
324 SRCDIST_SUBDIRS = src src/pkginfo srcdist-doc icons \
325   scripts/libexec tinyxml xml
326
327 # In addition to the native sources for mingw-get, our source distribution
328 # must include a filtered subset of those additional files which we import
329 # from the project's global build-aux repository...
330 #
331 BUILD_AUX_DIRS = build-aux build-aux/m4
332 BUILD_AUX_FILES = config.guess config.sub install-sh missing.m4
333
334 # The names of distributed package archive files incorporate version
335 # information, derived from PACKAGE_VERSION; this is decomposed, so that
336 # the PACKAGE_SUBSYSTEM may be interposed between the principal version
337 # number and any qualifying suffix, which specifies development status.
338 # Additionally, the package maintainer may specify, (at `make dist' time),
339 # a SNAPSHOT qualifier; if specified, this will be appended, (literally),
340 # to the principal version number component of the package version number,
341 # as it appears in the distributed archive file names.
342 #
343 PACKAGE_DISTROOT = $(PACKAGE_TARNAME)-$(PACKAGE_ROOTVERSION)
344 PACKAGE_ROOTVERSION = `echo $(PACKAGE_VERSION) | sed 's,-[^0-9].*,,'`
345 PACKAGE_DISTVERSION = `echo $(PACKAGE_VERSION)-$(PACKAGE_SUBSYSTEM) | sed \
346   -e 's,-[^0-9],-$(PACKAGE_SUBSYSTEM)&,' \
347   -e 's,\(-$(PACKAGE_SUBSYSTEM).*\)-$(PACKAGE_SUBSYSTEM),\1,' \
348   -e 's,-$(PACKAGE_SUBSYSTEM),$(SNAPSHOT)&,'`
349 PACKAGE_DISTNAME = $(PACKAGE_TARNAME)-$(PACKAGE_DISTVERSION)
350
351 dist: srcdist bindist readme.txt
352
353 # Specify default compression command, and associated file name extension,
354 # for creation and identification of packaged tar archives.
355 #
356 TARZIP = xz
357 TAREXT = tar.$(TARZIP)
358
359 # The following macros facilitate the inclusion of SCM build tags within
360 # the generated names for the release tarballs; the GCMTAG macro is used
361 # to identify explicitly GUI components, while SCMTAG is used otherwise.
362 #
363 BLDTAG =  @abs_top_builddir@/build.tag
364 SCMTAG = `>> $(BLDTAG); cat $(BLDTAG) | sed 's,.,-$(CLI_RELEASE_CLASS)-&,'`
365 GCMTAG = `>> $(BLDTAG); cat $(BLDTAG) | sed 's,.,-$(GUI_RELEASE_CLASS)-&,'`
366
367 bindist: all licdist
368         rm -rf staged
369         $(MAKE) --no-print-directory prefix=`pwd`/staged install-strip
370         cd staged; tar chf - bin/pkginfo$(EXEEXT) | $(TARZIP) -c > \
371           ../pkginfo-$(PACKAGE_DISTVERSION)$(SCMTAG)-bin.$(TAREXT)
372         rm staged/bin/pkginfo$(EXEEXT)
373         cd staged; tar chf - libexec/mingw-get/guimain$(EXEEXT) | \
374           $(TARZIP) -c > ../$(PACKAGE_DISTNAME)$(GCMTAG)-gui.$(TAREXT)
375         rm staged/libexec/mingw-get/guimain$(EXEEXT)
376         cd staged; tar chf - * | $(TARZIP) -c > \
377           ../$(PACKAGE_DISTNAME)$(SCMTAG)-bin.$(TAREXT)
378         cd staged; zip -r ../$(PACKAGE_DISTNAME)$(SCMTAG)-bin.zip *
379         rm -rf staged
380
381 licdist:
382         rm -rf share
383         $(mkinstalldirs) ./share/doc/${PACKAGE_TARNAME}
384         cd ./share/doc/${PACKAGE_TARNAME}; for file in $(LICENCE_FILES); \
385           do test -f ${abs_top_srcdir}/$$file \
386             && $(LN_S) ${abs_top_srcdir}/$$file . \
387             || $(LN_S) ${CURDIR}/$$file .; \
388           done
389         tar chf - share | $(TARZIP) -c > \
390           $(PACKAGE_DISTNAME)$(SCMTAG)-lic.$(TAREXT)
391         rm -rf share
392
393 srcdist: srcdist-doc pkginfo.c
394         rm -rf ${PACKAGE_DISTROOT} && mkdir ${PACKAGE_DISTROOT}
395         cd ${PACKAGE_DISTROOT}; for file in $(SRCDIST_FILES); do \
396           test -f ${abs_top_srcdir}/$$file \
397             && $(LN_S) ${abs_top_srcdir}/$$file . \
398             || $(LN_S) ../$$file .; \
399           done
400         for dir in $(SRCDIST_SUBDIRS); do \
401           $(mkinstalldirs) ${PACKAGE_DISTROOT}/$$dir \
402           && cd ${PACKAGE_DISTROOT}/$$dir; \
403           for file in `cd ${abs_top_srcdir}/$$dir && echo *`; do \
404             if test -f ${abs_top_srcdir}/$$dir/$$file; then \
405               $(LN_S) ${abs_top_srcdir}/$$dir/$$file .; \
406             fi; \
407           done; \
408         cd ${CURDIR}; done
409         for dir in $(BUILD_AUX_DIRS); do \
410           $(mkinstalldirs) ${PACKAGE_DISTROOT}/$$dir \
411           && cd ${PACKAGE_DISTROOT}/$$dir; \
412           for file in $(BUILD_AUX_FILES); do \
413             if test -f ${abs_top_srcdir}/$$dir/$$file; then \
414               $(LN_S) ${abs_top_srcdir}/$$dir/$$file .; \
415             fi; \
416           done; \
417         cd ${CURDIR}; done
418         cd ${PACKAGE_DISTROOT}/src/pkginfo; $(LN_S) ${CURDIR}/pkginfo.c .
419         tar chf - ${PACKAGE_DISTROOT} | $(TARZIP) -c > \
420           $(PACKAGE_DISTNAME)$(SCMTAG)-src.$(TAREXT)
421         rm -rf ${PACKAGE_DISTROOT}
422
423 # README, INSTALL and NEWS files to be included in the source distribution
424 # are generated on demand, as indirect side effects of a set of phoney goals
425 # so that they are always regenerated for each distribution, from templates
426 # in srcdist-doc so that we can make them version specific.
427 #
428 vpath %.in ${srcdir}/srcdist-doc
429 srcdist-doc: README.dist NEWS.dist INSTALL.dist
430
431 # We need to ensure that, when we invoke nroff, the generated output
432 # will be suited to an ASCII class of typesetter; without the -Tascii
433 # option, GNU nroff will substitute Unicode hyphens (u2010) in place
434 # of ASCII hyphens (code 45).
435 #
436 NROFF = nroff -Tascii
437
438 %.dist: %.in gendoc.simple.sed
439         sed -f gendoc.simple.sed $< | $(NROFF) > $*
440
441 %.simple.sed: %.sed.in
442         sed -e s,'$${PACKAGE_DIRNAME}',"${PACKAGE_DISTROOT}", \
443             -e s,'$${PACKAGE_DISTNAME}',"${PACKAGE_DISTNAME}", $< > $@
444
445 %.combined.sed: %.sed.in
446         sed -e s,'$${PACKAGE_DIRNAME}',"${PACKAGE_DISTROOT}", \
447             -e s,'$${PACKAGE_DISTNAME}',"${PACKAGE_DISTNAME}", \
448             -e s,'^# *cut:',, $< > $@
449
450 # The following rules use sed and awk to match the RCS Id keyword;
451 # we define and use the following macro, in the form "$(DOLLAR)Id:",
452 # to avoid unwanted substitution on CVS checkout.
453 #
454 DOLLAR = $$
455
456 # The following rule provides a mechanism for generating a composite from
457 # README, INSTALL and NEWS, for use as an on-line package description.
458 #
459 readme.txt: gendoc.combined.sed readme.txt.tag readme.txt.in
460         sed s,'$(DOLLAR)Id:.*',"`cat $@.tag`", $@.in > $@
461         echo '$$Document: $@ $$: end of file' >> $@
462         rm -f gendoc.combined.sed $@.*
463
464 # There should be a new generation of readme.txt for each package release;
465 # since each release should also include an updated NEWS file; we adopt the
466 # ID tag-line from NEWS.in, as most the appropriate template for generation
467 # of a corresponding tag-line for readme.in
468 #
469 readme.txt.tag: NEWS.in
470         awk '/\$(DOLLAR)Id:/{ $$2 = "readme.txt\\,v"; print }' $^ > $@
471
472 # The tag-line generated by the preceding rule may then be substituted, by
473 # the primary readme.txt generation rule above, into the document template
474 # generated by the following rule
475 #
476 readme.txt.in: README.in NEWS.in INSTALL.in
477         rm -f $@
478         for input in $^; do \
479           sed -f gendoc.combined.sed $$input | $(NROFF) >> $@; \
480           done
481
482 # Workspace clean-up...
483 #
484 clean:
485         rm -f *.$(OBJEXT) *.d *.dll $(BIN_PROGRAMS) $(LIBEXEC_PROGRAMS)
486
487 distclean: clean
488         rm -f config.* version.c build.tag build.time
489
490 maintainer-clean: distclean
491         rm -f README NEWS INSTALL readme.txt Makefile pkginfo.c
492         rm -f *-$(PACKAGE_DISTVERSION)-*.tar.* *-$(PACKAGE_DISTVERSION)-*.zip
493         rm -rf ${PACKAGE_DISTROOT} staged ${srcdir}/autom4te.cache
494
495 # $RCSfile$: end of file