OSDN Git Service

Add issue number tracking within published package lists.
[mingw/mingw-dist.git] / Makefile.in
1 # @configure_input@
2 #
3 # $Id$
4 #
5 # Written by Keith Marshall <keithmarshall@users.sourceforge.net>
6 # Copyright (C) 2010, 2011, 2013, MinGW.org Project
7 #
8 #
9 # Makefile template for generating mingw-get distribution manifests.
10 #
11 #   Project: @PACKAGE_TARNAME@
12 #   Version: @PACKAGE_VERSION@
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 Project, accept liability for any damages, however caused,
26 # arising from the use of this software.
27 #
28 all: @mingw_ac_subdirs@ update-references
29
30 @SET_MAKE@
31 @mingw_ac_subdirs@: FORCE
32         @if test -r $@/Makefile; then \
33           cd $@; $(MAKE) $(MAKECMDGOALS); \
34           fi
35
36 .PHONY: FORCE
37 FORCE:
38
39 # We must list all goals which may be specified for sub-directories,
40 # so that they may be correctly passed through $(MAKECMDGOALS); at this
41 # level, the action for each is equivalent to that to be performed for
42 # the `all' goal.
43 #
44 all-distfiles: all
45
46 # To support optimised "mingw-get update", the package lists must be
47 # dynamically updated, to correctly identify the latest issue of each
48 # individual package catalogue file; the following rule, (which MUST
49 # be invoked at top level), creates a "sed" script which may then be
50 # paste the appropriate tags into the package list files.
51 #
52 ref = @top_srcdir@/*/
53 issue.sed: FORCE
54         echo 's/issue=.*\(catalogue=\)/\\1/' > $@
55         for tag in `sed -n '/.*catalogue="/{s///;s/".*//p;}' ${ref}*.xml`; \
56           do awk /$$tag'.xml$$/{ \
57                print "s/catalogue=\"'$$tag'\"/issue=\"" $$2 "\" &/" \
58              }' ${ref}issue.log; \
59           done >> $@
60
61 # The generated "sed" script must be applied iteratively, to each of
62 # the catalogue files which contains "package-list" references, until
63 # all cross references have been fully resolved...
64 #
65 update-references: FORCE
66         echo check > issue.chk
67         @while test x"`cat issue.chk`" != xclean; \
68           do echo clean > issue.chk; \
69              $(MAKE) update-local-references; \
70           done
71         rm -f issue.chk
72
73 # ...considering all catalogues, in all registered sub-directories.
74 #
75 update-local-references: @mingw_ac_subdirs@
76
77 # $RCSfile$: end of file