OSDN Git Service

Avoid unnecessary duplication of configuration files.
authorKeith Marshall <keithmarshall@users.sourceforge.net>
Fri, 10 Feb 2017 21:30:23 +0000 (21:30 +0000)
committerKeith Marshall <keithmarshall@users.sourceforge.net>
Fri, 10 Feb 2017 21:30:23 +0000 (21:30 +0000)
mingwrt/ChangeLog
mingwrt/Makefile.in
w32api/ChangeLog
w32api/Makefile.in

index d022d2d..e316cf1 100644 (file)
@@ -1,3 +1,17 @@
+2017-02-10  Keith Marshall  <keithmarshall@users.sourceforge.net>
+
+       Avoid unnecessary duplication of configuration files.
+
+       * Makefile.in (vpath install-sh): Define it; it matches...
+       (vpath %.m4): ...this; add $top_srcdir/..; search it first; delete
+       rule for creating duplicate file reference links in $top_srcdir.
+       (configure): Add '-I ..' option, when running autoconf.
+       (mingwrt-srcdist-package-files): Remove dependencies on...
+       (aclocal.m4 VERSION.m4 install-sh): ...these; reinstate them in...
+       (mingwrt-srcdist-config-files): ...this new distributable files
+       enumeration goal; add it as a new prerequisite of...
+       (mingwrt-srcdist-files): ...this.
+
 2017-02-07  Keith Marshall  <keithmarshall@users.sourceforge.net>
 
        Ensure selective inclusion of the correct <strings.h>
index 7593cca..5db46ea 100644 (file)
@@ -7,7 +7,7 @@ PACKAGE_TARNAME := @PACKAGE_TARNAME@
 PACKAGE_VERSION := @PACKAGE_VERSION@
 
 # Written by Keith Marshall <keithmarshall@users.sourceforge.net>
-# Copyright (C) 2014-2016, MinGW.org Project
+# Copyright (C) 2014-2017, MinGW.org Project
 #
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
@@ -137,13 +137,10 @@ config.status.missing:
 # If configure itself needs to be updated, we must run autoconf in the
 # top level source directory.
 #
-vpath %.m4 ${top_srcdir}
 vpath configure.ac ${top_srcdir}
+vpath %.m4 ${top_srcdir}/.. ${top_srcdir}
 configure: configure.ac aclocal.m4 VERSION.m4
-       cd ${top_srcdir}; autoconf
-
-${top_srcdir}/%: ${top_srcdir}/../%
-       cd $(dir $@) && $(LN_S) -f ../$* .
+       cd ${top_srcdir}; autoconf -I ..
 
 # Propagate package version, as configured, consistently throughout
 # the package build.
@@ -893,8 +890,13 @@ mingwrt-srcdist-dir:
        $(RM) -r dist/$(PACKAGE_TARNAME)-$(PACKAGE_VERSION)
        $(call mkinstalldirs,,dist/$(PACKAGE_TARNAME)-$(PACKAGE_VERSION))
 
-mingwrt-srcdist-files: mingwrt-srcdist-package-files
+mingwrt-srcdist-files: mingwrt-srcdist-config-files
 mingwrt-srcdist-files: mingwrt-srcdist-testsuite-files
+mingwrt-srcdist-files: mingwrt-srcdist-package-files
+
+vpath install-sh ${top_srcdir}/.. ${top_srcdir}
+mingwrt-srcdist-config-files: aclocal.m4 VERSION.m4 install-sh
+       cp -p $^ dist/$(PACKAGE_TARNAME)-$(PACKAGE_VERSION)
 
 mingwrt-srcdist-package-files:
        (cd ${mingwrt_srcdir} && tar chf - --hard-dereference $(notdir $^)) | \
@@ -903,9 +905,8 @@ mingwrt-srcdist-package-files:
 mingwrt-srcdist-package-files: $(wildcard ${mingwrt_srcdir}/*.[chs]) \
   $(addprefix ${mingwrt_srcdir}/,ChangeLog CONTRIBUTORS DISCLAIMER README) \
   $(wildcard ${mingwrt_srcdir}/*.def.in) $(wildcard ${mingwrt_srcdir}/config*) \
-  $(addprefix ${mingwrt_srcdir}/,aclocal.m4 VERSION.m4 install-sh Makefile.in) \
-  $(addprefix ${mingwrt_srcdir}/,TODO include man mingwex profile) \
-  $(addprefix ${mingwrt_srcdir}/,msvcrt-xref crtdll.def) \
+  $(addprefix ${mingwrt_srcdir}/,include man mingwex msvcrt-xref profile) \
+  $(addprefix ${mingwrt_srcdir}/,TODO Makefile.in crtdll.def) \
   $(wildcard ${mingwrt_srcdir}/*.txt)
 
 mingwrt-srcdist-testsuite-files: $(wildcard ${mingwrt_srcdir}/tests/*.at)
index 4e8e4e5..2d72906 100644 (file)
@@ -1,3 +1,20 @@
+2017-02-10  Keith Marshall  <keithmarshall@users.sourceforge.net>
+
+       Avoid unnecessary duplication of configuration files.
+
+       * Makefile.in (vpath install-sh): Define it; it matches...
+       (vpath %.m4): ...this; add $top_srcdir/..; search it first; delete
+       rule for creating duplicate file reference links in $top_srcdir.
+       (configure): Add '-I ..' option, when running autoconf.
+       (w32api-srcdist-files): Rename it as...
+       (w32api-srcdist-package-files): ...this; remove dependencies on...
+       (aclocal.m4 VERSION.m4 install-sh): ...these; reinstate them in...
+       (w32api-srcdist-config-files): ...this new distributable files
+       enumeration goal; add it as one new prerequisite of...
+       (w32api-srcdist-files): ...this repurposed goal; also depends on...
+       (w32api-srcdist-package-files): ...this; populate it using...
+       (SRCDIST_ADD): ...this macro; redefine it accordingly.
+
 2016-12-08  Jerzy Tarasiuk  <jz_fuw@users.sourceforge.net>
 
        Correct typo in <ddk/ntdddisk.h>; fix bug [#2323]
index da832cc..0737012 100644 (file)
@@ -7,7 +7,7 @@ PACKAGE_TARNAME := @PACKAGE_TARNAME@
 PACKAGE_VERSION := @PACKAGE_VERSION@
 
 # Written by Keith Marshall <keithmarshall@users.sourceforge.net>
-# Copyright (C) 2014-2016, MinGW.org Project
+# Copyright (C) 2014-2017, MinGW.org Project
 #
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
@@ -109,13 +109,10 @@ config.status.missing:
 # If configure itself needs to be updated, we must run autoconf in the
 # top level source directory.
 #
-vpath %.m4 ${top_srcdir}
 vpath configure.ac ${top_srcdir}
+vpath %.m4 ${top_srcdir}/.. ${top_srcdir}
 configure: configure.ac aclocal.m4 VERSION.m4
-       cd ${top_srcdir}; autoconf
-
-${top_srcdir}/%: ${top_srcdir}/../%
-       cd $(dir $@) && $(LN_S) -f ../$* .
+       cd ${top_srcdir}; autoconf -I ..
 
 # Propagate package version, as configured, consistently throughout
 # the package build.
@@ -352,7 +349,14 @@ mingwrt-srcdist-dir w32api-srcdist-dir: %-srcdist-dir:
        $(RM) -r dist/$*-$(PACKAGE_VERSION)
        $(call mkinstalldirs,,dist/$*-$(PACKAGE_VERSION))
 
-mingwrt-srcdist-files w32api-srcdist-files: %-srcdist-files:
+w32api-srcdist-files: w32api-srcdist-config-files
+w32api-srcdist-files: w32api-srcdist-package-files
+
+vpath install-sh ${top_srcdir}/.. ${top_srcdir}
+%-srcdist-config-files: aclocal.m4 VERSION.m4 install-sh
+         cp -p $^ dist/$*-$(PACKAGE_VERSION)
+
+%-srcdist-package-files:
        (cd ${$*_srcdir} && tar chf - --hard-dereference $(notdir $^)) | \
          (cd dist/$*-$(PACKAGE_VERSION) && tar xf -)
 
@@ -360,11 +364,10 @@ mingwrt-devdist w32api-devdist: %-devdist: %-dist-staged
        cd dist/$* && tar chf - --hard-dereference include lib | \
          xz -c > ../$*-$(PACKAGE_RELEASE_TAG)-dev.tar.xz
 
-SRCDIST_ADD = $1-srcdist-files: $(addprefix ${$1_srcdir}/,$2)
+SRCDIST_ADD = $1-srcdist-package-files: $(addprefix ${$1_srcdir}/,$2)
 
 $(call SRCDIST_ADD,w32api,ChangeLog CONTRIBUTIONS README.w32api TODO)
-$(call SRCDIST_ADD,w32api,configure configure.ac aclocal.m4 VERSION.m4)
-$(call SRCDIST_ADD,w32api,Makefile.in install-sh include lib)
+$(call SRCDIST_ADD,w32api,configure configure.ac Makefile.in include lib)
 
 # Clean-up Rules
 # --------------