5 # Written by Keith Marshall <keith@users.osdn.me>
6 # Copyright (C) 2010, 2011, 2013, 2018, MinGW.org Project
9 # Makefile template for generating mingw-get distribution manifests.
11 # Project: @PACKAGE_TARNAME@
12 # Version: @PACKAGE_VERSION@
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.
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.
28 all: check @mingw_ac_subdirs@ update-references
31 @mingw_ac_subdirs@: FORCE
32 @if test -r $@/Makefile; then \
33 cd $@; $(MAKE) $(MAKECMDGOALS); \
39 # Capture repository infrastructure changes. The following rules ensure
40 # that configure, config.status, and all working makefiles will be updated,
41 # when any of their respective sources are modified.
43 top_srcdir = @top_srcdir@
44 abs_top_srcdir = @abs_top_srcdir@
47 configure: configure.ac makeopts.m4
48 cd ${top_srcdir}; autoconf
50 config.status: configure
51 ./config.status --recheck
53 Makefile: config.status Makefile.in Makefile.stub.in Makefile.comm.in
56 # We must list all goals which may be specified for sub-directories,
57 # so that they may be correctly passed through $(MAKECMDGOALS); at this
58 # level, the action for each is equivalent to that to be performed for
63 # Before building a set of catalogues, for publication, we should run
64 # the test suite to validate all source documents; the following rules
65 # provide the interface which is needed to run the test suite.
68 cd tests; $(MAKE_RECURSIVE) $@
70 ${srcdir}/tests/configure: ${abs_top_srcdir}/tests/configure.ac VERSION.m4
71 cd ${abs_top_srcdir}/tests; autoconf
73 tests/Makefile: ${abs_top_srcdir}/tests/configure
74 test -d tests || mkdir tests
75 cd tests; ${abs_top_srcdir}/tests/configure
77 # To support optimised "mingw-get update", the package lists must be
78 # dynamically updated, to correctly identify the latest issue of each
79 # individual package catalogue file; the following rule, (which MUST
80 # be invoked at top level), creates a "sed" script which may then be
81 # paste the appropriate tags into the package list files.
85 echo 's/issue=.*\(catalogue=\)/\\1/' > $@
86 for tag in `sed -n '/.*catalogue="/{s///;s/".*//p;}' ${ref}*.xml`; \
87 do awk /$$tag'.xml$$/{ \
88 print "s/catalogue=\"'$$tag'\"/issue=\"" $$2 "\" &/" \
92 # The generated "sed" script must be applied iteratively, to each of
93 # the catalogue files which contains "package-list" references, until
94 # all cross references have been fully resolved...
96 update-references: FORCE
97 echo check > issue.chk
98 @while test x"`cat issue.chk`" != xclean; \
99 do echo clean > issue.chk; \
100 $(MAKE) update-local-references; \
104 # ...considering all catalogues, in all registered sub-directories.
106 update-local-references: @mingw_ac_subdirs@
108 # Approiately authenticated users may publish updated catalogues
109 # via the OSDN file storage and download system.
111 FRS_CATALOGUE_HOST = storage.osdn.net
112 FRS_CATALOGUE_ROOT = /storage/groups/m/mi/mingw
113 FRS_CATALOGUE_PATH = $(FRS_CATALOGUE_ROOT)/.catalogue
115 FRS_CATALOGUE = $(FRS_CATALOGUE_HOST):$(FRS_CATALOGUE_PATH)
118 rm -rf tmp; mkdir tmp
119 cd tmp; @LN_S@ ../*/unpublished/* .
120 @test "x`cd tmp; echo *`x" = 'x*x' \
121 && echo "NOTE: there are no catalogue files awaiting publication" \
122 || $(MAKE_RECURSIVE) frs-publish
125 # Publication of updated catalogues, to the file release system,
126 # requires an authorised SourceForge user name specification.
128 FRS_USERNAME = @FRS_USERNAME@
129 MAKE_RECURSIVE = $(MAKE)@NO_PRINT_DIRECTORY@ PRIMARY_GOALS=$(MAKECMDGOALS)
131 @test "x$(FRS_USERNAME)" = "xanonymous" && \
132 { echo 'ERROR: "$(FRS_USERNAME)" is not a valid FRS_USERNAME'; \
133 echo 'please try "make FRS_USERNAME=username $(PRIMARY_GOALS)"'; \
137 # For potentially valid user names, publication entails an sftp
138 # upload of all staged catalogues, to the file release system.
140 frs-publish: frs-username-check
141 cd tmp; echo 'put *' | sftp $(FRS_USERNAME)@$(FRS_CATALOGUE)
142 rm -f */unpublished/*
144 # The following goals may be specified, when building as a sub-project
145 # of mingw-get-setup; pass each request to all designated subdirectories,
146 # in each of which it will become a no-op.
148 NO_OP_GOALS = build.tag dist clean distclean maintainer-clean
149 $(NO_OP_GOALS): @mingw_ac_subdirs@
151 # $RCSfile$: end of file