libstdc++47: Rework to prevent regeneration during install
authorJohn Marino <netbsd@marino.st>
Fri, 19 Oct 2012 07:15:22 +0000 (09:15 +0200)
committerFran├žois Tigeot <ftigeot@wolfpond.org>
Fri, 19 Oct 2012 08:18:24 +0000 (10:18 +0200)
The installincludes target regenerated files such as c++config.h during
the install phase.  It may be a minor bug as "bits/c++config.h:" would
trigger it but "c++config.h:" without the subdirectory wouldn't.  In any
case, generating it and two other headers to the local working bits
directory wasn't necessary as installincludes target installs them in an
accessible location.  Reworking the makefiles prevents a write operation
during installworld.

Reported-by: dillon
gnu/lib/gcc47/libstdc++/Makefile
gnu/lib/gcc47/libstdc++/Makefile.headers
gnu/lib/gcc47/libsupc++/Makefile.src

index c4923dd..866d7b7 100644 (file)
@@ -186,10 +186,7 @@ gnu11_FLAGS_FILES= chrono.cc \
 
 #generated sources
 SRCS+= unwind.h \
-       ${CONF_HEADERS:T} \
-       bits/gthr.h \
-       bits/gthr-default.h \
-       bits/c++config.h
+       ${CONF_HEADERS:T}
 
 HD=    ${INCLUDEDIR}/c++/${GCCPOINTVER}
 
@@ -280,8 +277,7 @@ vec-cxx.cc: ${SRCDIR}/libsupc++/vec.cc
 CLEANDIRS+=    bits
 CLEANFILES+=   atomicity.cc basic_file.cc c++locale.cc \
                ctype_configure_char.cc unwind.h \
-               cp-demangle.c debug-cxx.cc tree-cxx.cc vec-cxx.cc
-
-depend all: bits/c++config.h
+               cp-demangle.c debug-cxx.cc tree-cxx.cc vec-cxx.cc \
+               c++config.h gthr.h gthr-default.h
 
 .include <bsd.lib.mk>
index b09fb13..842640c 100644 (file)
@@ -53,14 +53,14 @@ host_builddir = bits
 supc_builddir = .
 host_headers_extra = \
        ${glibcxx_srcdir}/config/io/basic_file_stdio.h \
-       bits/c++config.h \
+       c++config.h \
        ${glibcxx_srcdir}/config/allocator/new_allocator_base.h \
        ${glibcxx_srcdir}/config/io/c_io_stdio.h \
        ${glibcxx_srcdir}/config/locale/generic/c_locale.h \
        ${glibcxx_srcdir}/config/locale/generic/messages_members.h \
        ${glibcxx_srcdir}/config/locale/generic/time_members.h \
-       bits/gthr.h \
-       bits/gthr-default.h
+       gthr.h \
+       gthr-default.h
 supc_headers = \
        ${glibcxx_srcdir}/libsupc++/cxxabi.h \
        ${glibcxx_srcdir}/libsupc++/exception \
index 1bf4454..e17c4eb 100644 (file)
@@ -50,14 +50,14 @@ SUPCXX=     \
        vmi_class_type_info.cc \
        vterminate.cc
 
-bits/gthr.h: copybits ${GCCDIR}/libgcc/gthr.h
+gthr.h: ${GCCDIR}/libgcc/gthr.h
        sed -e '/^#pragma/b' \
        -e '/^#/s/\([ABCDEFGHIJKLMNOPQRSTUVWXYZ_][ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*\)/_GLIBCXX_\1/g' \
        -e 's/_GLIBCXX_SUPPORTS_WEAK/__GXX_WEAK__/g' \
        -e 's,^#include "\(.*\)",#include <bits/\1>,g' \
        < ${GCCDIR}/libgcc/gthr.h > ${.TARGET}
 
-bits/gthr-default.h: copybits ${GCCDIR}/libgcc/gthr-posix.h
+gthr-default.h: ${GCCDIR}/libgcc/gthr-posix.h
        sed -e 's/\(UNUSED\)/_GLIBCXX_\1/g' \
            -e 's/\(GCC[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*_H\)/_GLIBCXX_\1/g' \
            -e 's/SUPPORTS_WEAK/__GXX_WEAK__/g' \
@@ -73,7 +73,7 @@ SUBST2='s,define _GLIBCXX_INLINE_VERSION, define _GLIBCXX_INLINE_VERSION ${ns_ve
 SUBST3='s,define _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY, define _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY ${visibility},'
 SUBST4='s,define _GLIBCXX_EXTERN_TEMPLATE$$, define _GLIBCXX_EXTERN_TEMPLATE ${externtemplate},'
 
-bits/c++config.h: copybits ${CXX_CONFIG_H}
+c++config.h: ${CXX_CONFIG_H}
        sed -e ${SUBST1} -e ${SUBST2} -e ${SUBST3} -e ${SUBST4} \
            < ${GCCDIR}/libstdc++-v3/include/bits/c++config > ${.TARGET}
        sed -e 's/HAVE_/_GLIBCXX_HAVE_/g' \