if ENABLE_BACKTRACE
backtrace_dir = libbacktrace
-backtrace_supported_h = $(backtrace_dir)/backtrace-supported.h
else
backtrace_dir =
-backtrace_supported_h =
endif
## Keep this list sync'd with acinclude.m4:GLIBCXX_CONFIGURE.
if test ! -f .libs/libstdc++.a; then \
cp .libs/libstdc++convenience.a .libs/libstdc++.a; \
fi; \
- echo `date` > stamp-libstdc++convenience;
+ date > stamp-libstdc++convenience;
# Added rules.
# 1 debug library
endif
# Build a debug variant.
+
# Take care to fix all possibly-relative paths.
-debugdir = ${glibcxx_builddir}/src/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; \
- (cd ${debugdir}; \
- sed -e 's/top_builddir = \.\./top_builddir = ..\/../' \
- -e 's/top_build_prefix = \.\./top_build_prefix = ..\/../' \
- -e 's/srcdir = \.\./srcdir = ..\/../' \
- -e 's/VPATH = \.\./VPATH = ..\/../' \
- -e 's/glibcxx_basedir = \.\./glibcxx_basedir = ..\/../' \
- -e 's/MKDIR_P = \.\./MKDIR_P = ..\/../' \
- < ../Makefile > Makefile ; \
- for d in . $(SUBDIRS); do \
- sed -e 's/top_builddir = \.\./top_builddir = ..\/../' \
- -e 's/top_build_prefix = \.\./top_build_prefix = ..\/../' \
- -e 's/srcdir = \.\./srcdir = ..\/../' \
- -e 's/VPATH = \.\./VPATH = ..\/../' \
- -e 's/glibcxx_basedir = \.\./glibcxx_basedir = ..\/../' \
- -e 's/MKDIR_P = \.\./MKDIR_P = ..\/../' \
- < ../$$d/Makefile > $$d/Makefile ; \
- done) ; \
- fi; \
- echo `date` > stamp-debug;
+debug/%/Makefile: %/Makefile
+ $(MKDIR_P) $(dir $@)
+ sed -e 's/top_builddir = \.\./top_builddir = ..\/../' \
+ -e 's/top_build_prefix = \.\./top_build_prefix = ..\/../' \
+ -e 's/srcdir = \.\./srcdir = ..\/../' \
+ -e 's/VPATH = \.\./VPATH = ..\/../' \
+ -e 's/glibcxx_basedir = \.\./glibcxx_basedir = ..\/../' \
+ -e 's/MKDIR_P = \.\./MKDIR_P = ..\/../' \
+ < $< > $@
+
+stamp-debug: $(foreach dir,. $(SUBDIRS),debug/$(dir)/Makefile)
+ mv debug/Makefile debug/Makefile.tmp
+ sed -e 's,all-local: all-once,all-local:,' \
+ -e 's,install-data-local: install-data-once,install-data-local:,' \
+ -e '/vpath/!s,src/c,src/debug/c,' \
+ < debug/Makefile.tmp > debug/Makefile
+ rm -f debug/Makefile.tmp
+ date > stamp-debug;
+
+.SECONDARY: $(foreach dir,. $(SUBDIRS),debug/$(dir)/Makefile)
if ENABLE_BACKTRACE
-${debugdir}/$(backtrace_supported_h): $(backtrace_supported_h) stamp-debug
+backtrace_supported_h = $(backtrace_dir)/backtrace-supported.h
+debug_backtrace_supported_h = debug/$(backtrace_supported_h)
+$(debug_backtrace_supported_h): $(backtrace_supported_h) stamp-debug
cp $< $@
-debug_backtrace_supported_h = ${debugdir}/$(backtrace_supported_h)
else
debug_backtrace_supported_h =
endif
build-debug: stamp-debug $(debug_backtrace_supported_h)
- (cd ${debugdir}; \
- mv Makefile Makefile.tmp; \
- sed -e 's,all-local: all-once,all-local:,' \
- -e 's,install-data-local: install-data-once,install-data-local:,' \
- -e '/vpath/!s,src/c,src/debug/c,' \
- < Makefile.tmp > Makefile ; \
- rm -f Makefile.tmp ; \
- $(MAKE) CXXFLAGS='$(DEBUG_FLAGS)' \
- toolexeclibdir=$(glibcxx_toolexeclibdir)/debug all) ;
+ $(MAKE) -C debug CXXFLAGS='$(DEBUG_FLAGS)' \
+ toolexeclibdir=$(glibcxx_toolexeclibdir)/debug all
# Install debug library.
install-debug: build-debug
@ENABLE_FILESYSTEM_TS_TRUE@filesystem_dir = filesystem
@ENABLE_BACKTRACE_FALSE@backtrace_dir =
@ENABLE_BACKTRACE_TRUE@backtrace_dir = libbacktrace
-@ENABLE_BACKTRACE_FALSE@backtrace_supported_h =
-@ENABLE_BACKTRACE_TRUE@backtrace_supported_h = $(backtrace_dir)/backtrace-supported.h
SUBDIRS = c++98 c++11 c++17 c++20 $(filesystem_dir) $(backtrace_dir)
@VTV_CYGMIN_FALSE@toolexeclib_LTLIBRARIES = libstdc++.la
@GLIBCXX_BUILD_DEBUG_TRUE@STAMP_INSTALL_DEBUG = install-debug
@GLIBCXX_BUILD_DEBUG_FALSE@CLEAN_DEBUG =
@GLIBCXX_BUILD_DEBUG_TRUE@CLEAN_DEBUG = debug
-
-# Build a debug variant.
-# Take care to fix all possibly-relative paths.
-debugdir = ${glibcxx_builddir}/src/debug
+@ENABLE_BACKTRACE_TRUE@backtrace_supported_h = $(backtrace_dir)/backtrace-supported.h
@ENABLE_BACKTRACE_FALSE@debug_backtrace_supported_h =
-@ENABLE_BACKTRACE_TRUE@debug_backtrace_supported_h = ${debugdir}/$(backtrace_supported_h)
+@ENABLE_BACKTRACE_TRUE@debug_backtrace_supported_h = debug/$(backtrace_supported_h)
all: all-recursive
.SUFFIXES:
if test ! -f .libs/libstdc++.a; then \
cp .libs/libstdc++convenience.a .libs/libstdc++.a; \
fi; \
- echo `date` > stamp-libstdc++convenience;
-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; \
- (cd ${debugdir}; \
- sed -e 's/top_builddir = \.\./top_builddir = ..\/../' \
- -e 's/top_build_prefix = \.\./top_build_prefix = ..\/../' \
- -e 's/srcdir = \.\./srcdir = ..\/../' \
- -e 's/VPATH = \.\./VPATH = ..\/../' \
- -e 's/glibcxx_basedir = \.\./glibcxx_basedir = ..\/../' \
- -e 's/MKDIR_P = \.\./MKDIR_P = ..\/../' \
- < ../Makefile > Makefile ; \
- for d in . $(SUBDIRS); do \
- sed -e 's/top_builddir = \.\./top_builddir = ..\/../' \
- -e 's/top_build_prefix = \.\./top_build_prefix = ..\/../' \
- -e 's/srcdir = \.\./srcdir = ..\/../' \
- -e 's/VPATH = \.\./VPATH = ..\/../' \
- -e 's/glibcxx_basedir = \.\./glibcxx_basedir = ..\/../' \
- -e 's/MKDIR_P = \.\./MKDIR_P = ..\/../' \
- < ../$$d/Makefile > $$d/Makefile ; \
- done) ; \
- fi; \
- echo `date` > stamp-debug;
+ date > stamp-libstdc++convenience;
+
+# Build a debug variant.
-@ENABLE_BACKTRACE_TRUE@${debugdir}/$(backtrace_supported_h): $(backtrace_supported_h) stamp-debug
+# Take care to fix all possibly-relative paths.
+debug/%/Makefile: %/Makefile
+ $(MKDIR_P) $(dir $@)
+ sed -e 's/top_builddir = \.\./top_builddir = ..\/../' \
+ -e 's/top_build_prefix = \.\./top_build_prefix = ..\/../' \
+ -e 's/srcdir = \.\./srcdir = ..\/../' \
+ -e 's/VPATH = \.\./VPATH = ..\/../' \
+ -e 's/glibcxx_basedir = \.\./glibcxx_basedir = ..\/../' \
+ -e 's/MKDIR_P = \.\./MKDIR_P = ..\/../' \
+ < $< > $@
+
+stamp-debug: $(foreach dir,. $(SUBDIRS),debug/$(dir)/Makefile)
+ mv debug/Makefile debug/Makefile.tmp
+ sed -e 's,all-local: all-once,all-local:,' \
+ -e 's,install-data-local: install-data-once,install-data-local:,' \
+ -e '/vpath/!s,src/c,src/debug/c,' \
+ < debug/Makefile.tmp > debug/Makefile
+ rm -f debug/Makefile.tmp
+ date > stamp-debug;
+
+.SECONDARY: $(foreach dir,. $(SUBDIRS),debug/$(dir)/Makefile)
+@ENABLE_BACKTRACE_TRUE@$(debug_backtrace_supported_h): $(backtrace_supported_h) stamp-debug
@ENABLE_BACKTRACE_TRUE@ cp $< $@
build-debug: stamp-debug $(debug_backtrace_supported_h)
- (cd ${debugdir}; \
- mv Makefile Makefile.tmp; \
- sed -e 's,all-local: all-once,all-local:,' \
- -e 's,install-data-local: install-data-once,install-data-local:,' \
- -e '/vpath/!s,src/c,src/debug/c,' \
- < Makefile.tmp > Makefile ; \
- rm -f Makefile.tmp ; \
- $(MAKE) CXXFLAGS='$(DEBUG_FLAGS)' \
- toolexeclibdir=$(glibcxx_toolexeclibdir)/debug all) ;
+ $(MAKE) -C debug CXXFLAGS='$(DEBUG_FLAGS)' \
+ toolexeclibdir=$(glibcxx_toolexeclibdir)/debug all
# Install debug library.
install-debug: build-debug