Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Marshall <keithmarshall@@users.sf.net>2012-01-15 19:10:09 +0400
committerKeith Marshall <keithmarshall@@users.sf.net>2012-01-15 19:10:09 +0400
commit6208cfce7a49c2f3307f5fe30177a06b363e6ede (patch)
treeaa8deb84132ae612cc48c4ef79fb7b8616b0722d
parentf0449b5092154ad8965705f4b3fb84d89377bece (diff)
Update and correct makefile rebuilding rules.
-rw-r--r--winsup/w32api/ChangeLog19
-rw-r--r--winsup/w32api/Makefile.comm.in33
-rw-r--r--winsup/w32api/Makefile.in11
-rw-r--r--winsup/w32api/lib/Makefile.in3
-rw-r--r--winsup/w32api/lib/ddk/Makefile.in3
-rw-r--r--winsup/w32api/lib/directx/Makefile.in3
6 files changed, 62 insertions, 10 deletions
diff --git a/winsup/w32api/ChangeLog b/winsup/w32api/ChangeLog
index ed063c55c..f57ab30fc 100644
--- a/winsup/w32api/ChangeLog
+++ b/winsup/w32api/ChangeLog
@@ -1,5 +1,24 @@
2012-01-15 Keith Marshall <keithmarshall@users.sf.net>
+ Update and correct makefile rebuilding rules.
+
+ * Makefile.in (Makefile): Remove dependency on configure; it causes
+ incorrect invocation of config.status when configure is regenerated.
+ (config.status): New rule; it invokes the corrected command.
+
+ * lib/Makefile.in lib/ddk/Makefile.in lib/directx/Makefile.in:
+ (Makefile): Factor out rebuilding rules; replace by...
+ * Makefile.comm.in (Makefile): ...corrected implementation here.
+ (top_builddir/Makefile.comm): New rebuilding rule; it establishes the
+ commands to rebuild Makefile.comm and all other makefiles, when its
+ own Makefile.comm.in, or any subdirectory Makefile.in is modified,
+ or when config.status is updated.
+ (top_builddir/config.status): New rule; it corrects the previously
+ inappropriate command implementation to update config.status, when the
+ configure script is regenerated.
+
+2012-01-15 Keith Marshall <keithmarshall@users.sf.net>
+
More formatting adjustments.
* lib/directx/Makefile.in (LIBS, DINPUT_OBJS): Adjust indentation.
diff --git a/winsup/w32api/Makefile.comm.in b/winsup/w32api/Makefile.comm.in
index c43720715..9a1fcf5d0 100644
--- a/winsup/w32api/Makefile.comm.in
+++ b/winsup/w32api/Makefile.comm.in
@@ -124,4 +124,37 @@ distclean: clean
maintainer-clean: distclean
+# Rules for rebuilding makefiles in sub-directories:
+#
+# Each of these should be rebuilt when its own Makefile.in is modified,
+# or when ${top_builddir}/config.status is updated. Rebuilding is achieved
+# by running ${top_builddir}/config.status, with ${top_builddir} as CWD; as
+# a side effect this also rebuilds all other makefiles in the package tree.
+# In particular, it causes ${top_builddir}/Makefile.comm.in to be rebuilt,
+# BEFORE any sub-directory specific Makefile is updated.
+#
+# Since ${top_builddir}/Makefile.comm is also required by each individual
+# sub-directory Makefile, and since all sub-directory makefiles are ALWAYS
+# updated along with ${top_builddir}/Makefile.comm, we may simply declare
+# the dependency...
+#
+Makefile: ${top_builddir}/Makefile.comm
+
+# ...then by adding Makefile.in as an artificial prerequisite of this,
+# together with its own real dependence on ${top_builddir}/config.status
+# and ${top_srcdir}/Makefile.comm.in, we can simply rely on the mutually
+# effective rebuilding side effects to update both the subdirectory's own
+# Makefile, and ${top_builddir}/Makefile.comm, in a single operation.
+#
+${top_builddir}/Makefile.comm: ${top_builddir}/config.status
+${top_builddir}/Makefile.comm: Makefile.in ${top_srcdir}/Makefile.comm.in
+ cd ${top_builddir} && $(SHELL) config.status
+
+# ${top_builddir}/config.status must itself be updated, at any time when
+# ${top_srcdir}/configure has been modified; this is a distinct operation
+# from the rebuilding of makefiles.
+#
+${top_builddir}/config.status: ${top_srcdir}/configure
+ cd ${top_builddir} && $(SHELL) config.status --recheck
+
# Makefile.comm.in: end of file
diff --git a/winsup/w32api/Makefile.in b/winsup/w32api/Makefile.in
index d72f4e80a..d863dda5c 100644
--- a/winsup/w32api/Makefile.in
+++ b/winsup/w32api/Makefile.in
@@ -109,9 +109,18 @@ endif
snapshot:
make dist SNAPDATE=$(shell date '+%Y%m%d')
-Makefile: Makefile.in config.status configure
+# Makefile must be rebuilt if Makefile.in is modified,
+# or if config.status is updated.
+#
+Makefile: Makefile.in config.status
$(SHELL) config.status
+# config.status itself must be updated if configure is modified;
+# this requires a distinct invocation of itself.
+#
+config.status: configure
+ $(SHELL) config.status --recheck
+
mostlyclean-top:
rm -f *~
diff --git a/winsup/w32api/lib/Makefile.in b/winsup/w32api/lib/Makefile.in
index d06da0aca..df8727ac0 100644
--- a/winsup/w32api/lib/Makefile.in
+++ b/winsup/w32api/lib/Makefile.in
@@ -214,7 +214,4 @@ dist:
(cd $$dir; $(MAKE) distdir=../${distdir} dist); \
done
-Makefile: Makefile.in ../config.status ../configure
- cd ..; $(SHELL) config.status
-
# Makefile.in: end of file
diff --git a/winsup/w32api/lib/ddk/Makefile.in b/winsup/w32api/lib/ddk/Makefile.in
index bdfb4f000..7879cdedc 100644
--- a/winsup/w32api/lib/ddk/Makefile.in
+++ b/winsup/w32api/lib/ddk/Makefile.in
@@ -122,7 +122,4 @@ dist:
cp -p ${srcdir}/$$file ${distdir}/lib/ddk; \
done
-Makefile: Makefile.in ../../config.status ../../configure
- cd ../..; $(SHELL) config.status
-
# Makefile.in: end of file
diff --git a/winsup/w32api/lib/directx/Makefile.in b/winsup/w32api/lib/directx/Makefile.in
index 92f00a16b..c085f390f 100644
--- a/winsup/w32api/lib/directx/Makefile.in
+++ b/winsup/w32api/lib/directx/Makefile.in
@@ -150,7 +150,4 @@ dist:
cp -p ${srcdir}/$$file ${distdir}/lib/directx; \
done
-Makefile: Makefile.in ../../config.status ../../configure
- cd ../..; $(SHELL) config.status
-
# Makefile.in: end of file