[RFA] Only rebuild configure files in maintainer mode
Nick Clifton
nickc@cambridge.redhat.com
Thu Aug 2 02:53:00 GMT 2001
Hi Guys,
After talking with DJ, here is a revised version of this patch.
This time the rules for building config.in and cstamp-h.in are
entirely suppressed in non-maintainer-mode, so that if these files
are not present make will issue a 'no rule to build XXX' message.
These files should be part of a distribution, so it is an error if
they are not present. Maintainers of course, need to be able to
regenerate these files, so the rules are active for them.
May I apply this patch ?
Cheers
Nick
2001-08-02 Nick Clifton <nickc@cambridge.redhat.com>
* Makefile.in ($(srcdir)/configure): Only rebuild in
maintainer mode.
($(srcdir)/config.in): Only define in maintainer mode.
($(srcdir)/cstamp-h.in): Only define in maintainer mode.
Index: gcc/Makefile.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Makefile.in,v
retrieving revision 1.704
diff -p -r1.704 Makefile.in
*** Makefile.in 2001/07/26 16:27:36 1.704
--- Makefile.in 2001/08/02 09:46:21
*************** cs-tm_p.h: Makefile
*** 880,886 ****
HEADERS="$(tm_p_file)" DEFINES="" TARGET_CPU_DEFAULT="" \
$(SHELL) $(srcdir)/mkconfig.sh tm_p.h
! $(srcdir)/configure: $(srcdir)/configure.in
(cd $(srcdir) && autoconf)
gccbug: $(srcdir)/gccbug.in
--- 880,891 ----
HEADERS="$(tm_p_file)" DEFINES="" TARGET_CPU_DEFAULT="" \
$(SHELL) $(srcdir)/mkconfig.sh tm_p.h
! # Don't automatically run autoconf, since configure.in might be accidentally
! # newer than configure. Also, this writes into the source directory which
! # might be on a read-only file system. If configured for maintainer mode
! # then do allow autoconf to be run.
!
! $(srcdir)/configure: @MAINT@ $(srcdir)/configure.in
(cd $(srcdir) && autoconf)
gccbug: $(srcdir)/gccbug.in
*************** mklibgcc: $(srcdir)/mklibgcc.in
*** 898,908 ****
# "echo timestamp" is used instead of touch to be consistent with other
# packages that use autoconf (??? perhaps also to avoid problems with patch?).
# ??? Newer versions have a maintainer mode that may be useful here.
! $(srcdir)/config.in: $(srcdir)/cstamp-h.in
! $(srcdir)/cstamp-h.in: $(srcdir)/configure.in $(srcdir)/acconfig.h
! (cd $(srcdir) && autoheader)
! @rm -f $(srcdir)/cstamp-h.in
! echo timestamp > $(srcdir)/cstamp-h.in
auto-host.h: cstamp-h ; @true
cstamp-h: config.in config.status
CONFIG_HEADERS=auto-host.h:config.in LANGUAGES="$(CONFIG_LANGUAGES)" $(SHELL) config.status
--- 903,916 ----
# "echo timestamp" is used instead of touch to be consistent with other
# packages that use autoconf (??? perhaps also to avoid problems with patch?).
# ??? Newer versions have a maintainer mode that may be useful here.
!
! # Don't run autoheader automatically either.
! # Only run it if maintainer mode is enabled.
! @MAINT@ $(srcdir)/config.in: $(srcdir)/cstamp-h.in
! @MAINT@ $(srcdir)/cstamp-h.in: $(srcdir)/configure.in $(srcdir)/acconfig.h
! @MAINT@ (cd $(srcdir) && autoheader)
! @MAINT@ @rm -f $(srcdir)/cstamp-h.in
! @MAINT@ echo timestamp > $(srcdir)/cstamp-h.in
auto-host.h: cstamp-h ; @true
cstamp-h: config.in config.status
CONFIG_HEADERS=auto-host.h:config.in LANGUAGES="$(CONFIG_LANGUAGES)" $(SHELL) config.status
More information about the Gcc-patches
mailing list