Update and correct makefile rebuilding rules.
This commit is contained in:
parent
f0449b5092
commit
6208cfce7a
|
@ -1,3 +1,22 @@
|
||||||
|
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>
|
2012-01-15 Keith Marshall <keithmarshall@users.sf.net>
|
||||||
|
|
||||||
More formatting adjustments.
|
More formatting adjustments.
|
||||||
|
|
|
@ -124,4 +124,37 @@ distclean: clean
|
||||||
|
|
||||||
maintainer-clean: distclean
|
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
|
# Makefile.comm.in: end of file
|
||||||
|
|
|
@ -109,9 +109,18 @@ endif
|
||||||
snapshot:
|
snapshot:
|
||||||
make dist SNAPDATE=$(shell date '+%Y%m%d')
|
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
|
$(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:
|
mostlyclean-top:
|
||||||
rm -f *~
|
rm -f *~
|
||||||
|
|
||||||
|
|
|
@ -214,7 +214,4 @@ dist:
|
||||||
(cd $$dir; $(MAKE) distdir=../${distdir} dist); \
|
(cd $$dir; $(MAKE) distdir=../${distdir} dist); \
|
||||||
done
|
done
|
||||||
|
|
||||||
Makefile: Makefile.in ../config.status ../configure
|
|
||||||
cd ..; $(SHELL) config.status
|
|
||||||
|
|
||||||
# Makefile.in: end of file
|
# Makefile.in: end of file
|
||||||
|
|
|
@ -122,7 +122,4 @@ dist:
|
||||||
cp -p ${srcdir}/$$file ${distdir}/lib/ddk; \
|
cp -p ${srcdir}/$$file ${distdir}/lib/ddk; \
|
||||||
done
|
done
|
||||||
|
|
||||||
Makefile: Makefile.in ../../config.status ../../configure
|
|
||||||
cd ../..; $(SHELL) config.status
|
|
||||||
|
|
||||||
# Makefile.in: end of file
|
# Makefile.in: end of file
|
||||||
|
|
|
@ -150,7 +150,4 @@ dist:
|
||||||
cp -p ${srcdir}/$$file ${distdir}/lib/directx; \
|
cp -p ${srcdir}/$$file ${distdir}/lib/directx; \
|
||||||
done
|
done
|
||||||
|
|
||||||
Makefile: Makefile.in ../../config.status ../../configure
|
|
||||||
cd ../..; $(SHELL) config.status
|
|
||||||
|
|
||||||
# Makefile.in: end of file
|
# Makefile.in: end of file
|
||||||
|
|
Loading…
Reference in New Issue