OSDN Git Service

Publish pexports package version 0.48
[mingw/mingw-dist.git] / Makefile.in
index f939423..c89b83c 100644 (file)
@@ -2,8 +2,8 @@
 #
 # $Id$
 #
-# Written by Keith Marshall <keithmarshall@users.sourceforge.net>
-# Copyright (C) 2010, MinGW Project
+# Written by Keith Marshall <keith@users.osdn.me>
+# Copyright (C) 2010, 2011, 2013, 2018, MinGW.org Project
 #
 #
 # Makefile template for generating mingw-get distribution manifests.
@@ -25,8 +25,9 @@
 # MinGW Project, accept liability for any damages, however caused,
 # arising from the use of this software.
 #
-all: @mingw_ac_subdirs@
+all: check @mingw_ac_subdirs@ update-references
 
+@SET_MAKE@
 @mingw_ac_subdirs@: FORCE
        @if test -r $@/Makefile; then \
          cd $@; $(MAKE) $(MAKECMDGOALS); \
@@ -35,4 +36,116 @@ all: @mingw_ac_subdirs@
 .PHONY: FORCE
 FORCE:
 
+# Capture repository infrastructure changes.  The following rules ensure
+# that configure, config.status, and all working makefiles will be updated,
+# when any of their respective sources are modified.
+#
+top_srcdir = @top_srcdir@
+VPATH = ${top_srcdir}
+
+configure: configure.ac makeopts.m4
+       cd ${top_srcdir}; autoconf
+
+config.status: configure
+       ./config.status --recheck
+
+Makefile: config.status Makefile.in Makefile.stub.in Makefile.comm.in
+       ./config.status
+
+# We must list all goals which may be specified for sub-directories,
+# so that they may be correctly passed through $(MAKECMDGOALS); at this
+# level, the action for each is equivalent to that to be performed for
+# the `all' goal.
+#
+all-distfiles: all
+
+# Before building a set of catalogues, for publication, we should run
+# the test suite to validate all source documents; the following rules
+# provide the interface which is needed to run the test suite.
+#
+srcdir = @srcdir@
+check: tests/Makefile
+       cd tests; $(MAKE_RECURSIVE) $@
+
+${srcdir}/tests/configure: ${srcdir}/tests/configure.ac VERSION.m4
+       cd ${srcdir}/tests; autoconf
+
+tests/Makefile: ${srcdir}/tests/configure
+       test -d tests || mkdir tests
+       cd tests; ../${srcdir}/tests/configure
+
+# To support optimised "mingw-get update", the package lists must be
+# dynamically updated, to correctly identify the latest issue of each
+# individual package catalogue file; the following rule, (which MUST
+# be invoked at top level), creates a "sed" script which may then be
+# paste the appropriate tags into the package list files.
+#
+ref = @top_srcdir@/*/
+issue.sed: FORCE
+       echo 's/issue=.*\(catalogue=\)/\\1/' > $@
+       for tag in `sed -n '/.*catalogue="/{s///;s/".*//p;}' ${ref}*.xml`; \
+         do awk /$$tag'.xml$$/{ \
+              print "s/catalogue=\"'$$tag'\"/issue=\"" $$2 "\" &/" \
+            }' ${ref}issue.log; \
+         done >> $@
+
+# The generated "sed" script must be applied iteratively, to each of
+# the catalogue files which contains "package-list" references, until
+# all cross references have been fully resolved...
+#
+update-references: FORCE
+       echo check > issue.chk
+       @while test x"`cat issue.chk`" != xclean; \
+         do echo clean > issue.chk; \
+            $(MAKE) update-local-references; \
+         done
+       rm -f issue.chk
+
+# ...considering all catalogues, in all registered sub-directories.
+#
+update-local-references: @mingw_ac_subdirs@
+
+# Approiately authenticated users may publish updated catalogues
+# via the OSDN file storage and download system.
+#
+FRS_CATALOGUE_HOST = storage.osdn.net
+FRS_CATALOGUE_ROOT = /storage/groups/m/mi/mingw
+FRS_CATALOGUE_PATH = $(FRS_CATALOGUE_ROOT)/.catalogue
+
+FRS_CATALOGUE = $(FRS_CATALOGUE_HOST):$(FRS_CATALOGUE_PATH)
+
+published:
+       rm -rf tmp; mkdir tmp
+       cd tmp; @LN_S@ ../*/unpublished/* .
+       @test "x`cd tmp; echo *`x" = 'x*x' \
+         && echo "NOTE: there are no catalogue files awaiting publication" \
+         || $(MAKE_RECURSIVE) frs-publish
+       rm -rf tmp
+
+# Publication of updated catalogues, to the file release system,
+# requires an authorised SourceForge user name specification.
+#
+FRS_USERNAME = @FRS_USERNAME@
+MAKE_RECURSIVE = $(MAKE)@NO_PRINT_DIRECTORY@ PRIMARY_GOALS=$(MAKECMDGOALS)
+frs-username-check:
+       @test "x$(FRS_USERNAME)" = "xanonymous" && \
+         { echo 'ERROR: "$(FRS_USERNAME)" is not a valid FRS_USERNAME'; \
+           echo 'please try "make FRS_USERNAME=username $(PRIMARY_GOALS)"'; \
+           exit 1; \
+         } || true
+
+# For potentially valid user names, publication entails an sftp
+# upload of all staged catalogues, to the file release system.
+#
+frs-publish: frs-username-check
+       cd tmp; echo 'put *' | sftp $(FRS_USERNAME)@$(FRS_CATALOGUE)
+       rm -f */unpublished/*
+
+# The following goals may be specified, when building as a sub-project
+# of mingw-get-setup; pass each request to all designated subdirectories,
+# in each of which it will become a no-op.
+#
+NO_OP_GOALS = build.tag dist clean distclean maintainer-clean
+$(NO_OP_GOALS): @mingw_ac_subdirs@
+
 # $RCSfile$: end of file