PATCH: Fix remaining BSD make, in-source build issues in libstdc++-v3
Loren James Rittle
rittle@latour.rsch.comm.mot.com
Tue Jan 15 16:54:00 GMT 2002
> [...] I have already cooked and tested the version of this patch
> required on the 3.0.X branch (the location and number of LN_S usages
> is different; extra_target_headers has less entries; but the patch
> to the install-data-local rule is the same barring an extra line
> between the comment and the rule) and the outstanding bootstrap
> failures are resolved there as well. Approval to add this patch to
> mainline, wait a couple of days and install the logical equivalent
> patch to the 3.0.X branch?
Installed on 3.0.X branch today (only after checking that a wide
selection of ports bootstrapped the mainline with nearly the same
patch over the weekend). Sorry about any miscommunication on my part
on how my patch to cleanup header installation had an undetectable
conflict (upon CVS merge) with Phil's pending renaming patch. Thank
you Benjamin for resolving the conflict ASAP.
Before I submitted the related patch, as an alternate, I did consider
recoding the header staging code to populate a fresh directory within
libstdc++-v3/include called ``g++-v3'' (and then update all references
to the staging path likewise and retain the find-driven final
installation technique), but I considered that approach too aggressive
for the branch (which I really wanted to fix ASAP). In retrospect, it
would have been more robust against name changes that occur during the
staging process.
As installed on 3.0.X branch (tested under the same rules I used to
completely test the mainline version against not only test suite
regressions but also installation naming changes):
* include/Makefile.am (extra_target_headers): New list of all
target files built with ad hoc naming rules.
(stamp-*): Handle LN_S failure in manner portable across make
implementations.
(install-data-local): Install header files from human-maintained
file lists and directory components instead of non-robust find.
* include/Makefile.in: Rebuilt.
Index: Makefile.am
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/include/Makefile.am,v
retrieving revision 1.1.6.6
diff -c -r1.1.6.6 Makefile.am
*** Makefile.am 2001/08/29 00:41:56 1.1.6.6
--- Makefile.am 2002/01/15 19:50:34
***************
*** 1,6 ****
## Makefile for the include subdirectory of the GNU C++ Standard library.
##
! ## Copyright (C) 2001 Free Software Foundation, Inc.
##
## This file is part of the libstdc++ version 3 distribution.
## Process this file with automake to produce Makefile.in.
--- 1,6 ----
## Makefile for the include subdirectory of the GNU C++ Standard library.
##
! ## Copyright (C) 2001, 2002 Free Software Foundation, Inc.
##
## This file is part of the libstdc++ version 3 distribution.
## Process this file with automake to produce Makefile.in.
***************
*** 286,291 ****
--- 286,296 ----
${target_srcdir}/os_defines.h \
${glibcpp_srcdir}/@ATOMICITY_INC_SRCDIR@/atomicity.h \
${glibcpp_srcdir}/@LIMITS_INC_SRCDIR@/limits.h
+ extra_target_headers = \
+ ${target_builddir}/basic_file_model.h \
+ ${target_builddir}/c++config.h \
+ ${target_builddir}/c++io.h \
+ ${target_builddir}/c++locale.h
thread_builddir = ./${target_alias}/bits
thread_headers = \
***************
*** 311,373 ****
@if [ ! -d "${std_builddir}" ]; then \
mkdir -p ${std_builddir} ;\
fi ;\
! (cd ${std_builddir} && @LN_S@ $? .) ;\
echo `date` > stamp-std
stamp-bits: ${bits_headers}
@if [ ! -d "${bits_builddir}" ]; then \
mkdir -p ${bits_builddir} ;\
fi ;\
! (cd ${bits_builddir} && @LN_S@ $? .) ;\
echo `date` > stamp-bits
stamp-c_base: ${c_base_headers}
@if [ ! -d "${c_base_builddir}" ]; then \
mkdir -p ${c_base_builddir} ;\
fi ;\
! (cd ${c_base_builddir} && @LN_S@ $? .) ;\
echo `date` > stamp-c_base
stamp-c_compatibility: ${c_compatibility_headers}
@if [ ! -d "${c_compatibility_builddir}" ]; then \
mkdir -p ${c_compatibility_builddir} ;\
fi ;\
! (cd ${c_compatibility_builddir} && @LN_S@ $? .) ;\
echo `date` > stamp-c_compatibility
stamp-backward: ${backward_headers}
@if [ ! -d "${backward_builddir}" ]; then \
mkdir -p ${backward_builddir} ;\
fi ;\
! (cd ${backward_builddir} && @LN_S@ $? .) ;\
echo `date` > stamp-backward
stamp-ext: ${ext_headers}
@if [ ! -d "${ext_builddir}" ]; then \
mkdir -p ${ext_builddir} ;\
fi ;\
! (cd ${ext_builddir} && @LN_S@ $? .) ;\
echo `date` > stamp-ext
# Can't use $? in command, otherwise target_builddir will trigger it, and
# we get bizarre symlinks mazes.
stamp-target: ${target_headers} ${target_builddir}
! @(cd ${target_builddir} && @LN_S@ ${target_headers} .) ;\
echo `date` > stamp-target
stamp-thread: ${thread_headers} ${thread_builddir}
@echo `date` > stamp-thread
stamp-file_model: ${glibcpp_srcdir}/@BASIC_FILE_H@ ${target_builddir}
! @(cd ${target_builddir} && @LN_S@ ${glibcpp_srcdir}/@BASIC_FILE_H@ basic_file_model.h) ;\
echo `date` > stamp-file_model
stamp-io: ${glibcpp_srcdir}/@CSTDIO_H@ ${target_builddir}
! @(cd ${target_builddir} && @LN_S@ ${glibcpp_srcdir}/@CSTDIO_H@ c++io.h) ;\
echo `date` > stamp-io
stamp-locale: ${glibcpp_srcdir}/@CLOCALE_H@ ${target_builddir}
! @(cd ${target_builddir} && @LN_S@ ${glibcpp_srcdir}/@CLOCALE_H@ c++locale.h) ;\
echo `date` > stamp-locale
# This target is kinda special. The timestamp on a directory gets modified
--- 316,378 ----
@if [ ! -d "${std_builddir}" ]; then \
mkdir -p ${std_builddir} ;\
fi ;\
! (cd ${std_builddir} && @LN_S@ $? . || true) ;\
echo `date` > stamp-std
stamp-bits: ${bits_headers}
@if [ ! -d "${bits_builddir}" ]; then \
mkdir -p ${bits_builddir} ;\
fi ;\
! (cd ${bits_builddir} && @LN_S@ $? . || true) ;\
echo `date` > stamp-bits
stamp-c_base: ${c_base_headers}
@if [ ! -d "${c_base_builddir}" ]; then \
mkdir -p ${c_base_builddir} ;\
fi ;\
! (cd ${c_base_builddir} && @LN_S@ $? . || true) ;\
echo `date` > stamp-c_base
stamp-c_compatibility: ${c_compatibility_headers}
@if [ ! -d "${c_compatibility_builddir}" ]; then \
mkdir -p ${c_compatibility_builddir} ;\
fi ;\
! (cd ${c_compatibility_builddir} && @LN_S@ $? . || true) ;\
echo `date` > stamp-c_compatibility
stamp-backward: ${backward_headers}
@if [ ! -d "${backward_builddir}" ]; then \
mkdir -p ${backward_builddir} ;\
fi ;\
! (cd ${backward_builddir} && @LN_S@ $? . || true) ;\
echo `date` > stamp-backward
stamp-ext: ${ext_headers}
@if [ ! -d "${ext_builddir}" ]; then \
mkdir -p ${ext_builddir} ;\
fi ;\
! (cd ${ext_builddir} && @LN_S@ $? . || true) ;\
echo `date` > stamp-ext
# Can't use $? in command, otherwise target_builddir will trigger it, and
# we get bizarre symlinks mazes.
stamp-target: ${target_headers} ${target_builddir}
! @(cd ${target_builddir} && @LN_S@ ${target_headers} . || true) ;\
echo `date` > stamp-target
stamp-thread: ${thread_headers} ${thread_builddir}
@echo `date` > stamp-thread
stamp-file_model: ${glibcpp_srcdir}/@BASIC_FILE_H@ ${target_builddir}
! @(cd ${target_builddir} && @LN_S@ ${glibcpp_srcdir}/@BASIC_FILE_H@ basic_file_model.h || true) ;\
echo `date` > stamp-file_model
stamp-io: ${glibcpp_srcdir}/@CSTDIO_H@ ${target_builddir}
! @(cd ${target_builddir} && @LN_S@ ${glibcpp_srcdir}/@CSTDIO_H@ c++io.h || true) ;\
echo `date` > stamp-io
stamp-locale: ${glibcpp_srcdir}/@CLOCALE_H@ ${target_builddir}
! @(cd ${target_builddir} && @LN_S@ ${glibcpp_srcdir}/@CLOCALE_H@ c++locale.h || true) ;\
echo `date` > stamp-locale
# This target is kinda special. The timestamp on a directory gets modified
***************
*** 412,428 ****
-e 's/\(${uppercase}*WEAK\)/_GLIBCPP_\1/g' \
< ${toplevel_srcdir}/gcc/${glibcpp_thread_h} > $@
! # One big happy istallation: just copy everything from the build to the
! # install tree (except for the build stamps).
gxx_include_dir = @gxx_include_dir@
install-data-local:
! for file in `find . ! -name stamp-\* ! -name Makefile -print`; do \
! installFile=${gxx_include_dir}/$${file} ;\
! if [ -d $${file} ]; then \
! $(INSTALL) -d $${installFile} ;\
! else \
! $(INSTALL_DATA) $${file} $${installFile} ;\
! fi ;\
! done
!
--- 417,447 ----
-e 's/\(${uppercase}*WEAK\)/_GLIBCPP_\1/g' \
< ${toplevel_srcdir}/gcc/${glibcpp_thread_h} > $@
! # For robustness sake (in light of junk files or in-source
! # configuration), copy from the build tree to the install tree using
! # only the human-maintained file lists and directory components.
gxx_include_dir = @gxx_include_dir@
install-data-local:
! $(INSTALL) -d ${gxx_include_dir}
! $(INSTALL) -d ${gxx_include_dir}/${bits_builddir}
! for file in ${bits_headers}; do \
! $(INSTALL_DATA) $${file} ${gxx_include_dir}/${bits_builddir}; done
! $(INSTALL) -d ${gxx_include_dir}/${backward_builddir}
! for file in ${backward_headers}; do \
! $(INSTALL_DATA) $${file} ${gxx_include_dir}/${backward_builddir}; done
! $(INSTALL) -d ${gxx_include_dir}/${ext_builddir}
! for file in ${ext_headers}; do \
! $(INSTALL_DATA) $${file} ${gxx_include_dir}/${ext_builddir}; done
! $(INSTALL) -d ${gxx_include_dir}/${c_base_builddir}
! for file in ${c_base_headers}; do \
! $(INSTALL_DATA) $${file} ${gxx_include_dir}/${c_base_builddir}; done
! $(INSTALL) -d ${gxx_include_dir}/${std_builddir}
! for file in ${std_headers}; do \
! $(INSTALL_DATA) $${file} ${gxx_include_dir}/${std_builddir}; done
! $(INSTALL) -d ${gxx_include_dir}/${target_builddir}
! for file in ${target_headers} ${extra_target_headers}; do \
! $(INSTALL_DATA) $${file} ${gxx_include_dir}/${target_builddir}; done
! $(INSTALL) -d ${gxx_include_dir}/${thread_builddir}
! for file in ${thread_headers}; do \
! $(INSTALL_DATA) $${file} ${gxx_include_dir}/${thread_builddir}; done
More information about the Libstdc++
mailing list