public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
* [committed] libstdc++: Regenerate the src/debug Makefiles as needed
@ 2021-09-16 22:09 Jonathan Wakely
  0 siblings, 0 replies; only message in thread
From: Jonathan Wakely @ 2021-09-16 22:09 UTC (permalink / raw)
  To: libstdc++, gcc-patches

[-- Attachment #1: Type: text/plain, Size: 660 bytes --]

When the build configuration changes and Makefiles are recreated, the
src/debug/Makefile and src/debug/*/Makefile files are not recreated,
because they're not managed in the usual way by automake. This can lead
to build failures or surprising inconsistencies between the main and
debug versions of the library when doing incremental builds.

This causes them to be regenerated if any of the corresponding non-debug
makefiles is newer.

Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

libstdc++-v3/ChangeLog:

	* src/Makefile.am (stamp-debug): Add all Makefiles as
	prerequisites.
	* src/Makefile.in: Regenerate.

Tested x86_64-linux. Committed to trunk.


[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 1459 bytes --]

commit fce4e12f8efb3b3db959b807201e08786b001f39
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Thu Sep 16 21:21:56 2021

    libstdc++: Regenerate the src/debug Makefiles as needed
    
    When the build configuration changes and Makefiles are recreated, the
    src/debug/Makefile and src/debug/*/Makefile files are not recreated,
    because they're not managed in the usual way by automake. This can lead
    to build failures or surprising inconsistencies between the main and
    debug versions of the library when doing incremental builds.
    
    This causes them to be regenerated if any of the corresponding non-debug
    makefiles is newer.
    
    Signed-off-by: Jonathan Wakely <jwakely@redhat.com>
    
    libstdc++-v3/ChangeLog:
    
            * src/Makefile.am (stamp-debug): Add all Makefiles as
            prerequisites.
            * src/Makefile.in: Regenerate.

diff --git a/libstdc++-v3/src/Makefile.am b/libstdc++-v3/src/Makefile.am
index 16f4cc6eff4..f27d3f8c87e 100644
--- a/libstdc++-v3/src/Makefile.am
+++ b/libstdc++-v3/src/Makefile.am
@@ -369,7 +369,7 @@ endif
 # Build a debug variant.
 # Take care to fix all possibly-relative paths.
 debugdir = ${glibcxx_builddir}/src/debug
-stamp-debug:
+stamp-debug: Makefile $(foreach dir,$(SUBDIRS),$(dir)/Makefile)
 	if test ! -d ${debugdir} || test ! -f ${debugdir}/Makefile ; then \
 	  mkdir -p ${debugdir}; \
 	  for d in $(SUBDIRS); do mkdir -p  ${debugdir}/$$d; done; \

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-09-16 22:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-16 22:09 [committed] libstdc++: Regenerate the src/debug Makefiles as needed Jonathan Wakely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).