Update include/Makefile.am

Loren James Rittle rittle@latour.rsch.comm.mot.com
Thu Jul 12 23:31:00 GMT 2001


Phil, here is the patch to update the staging of gthr*.h in
include/Makefile.am to match all portability bug fixes found in the
latest version to be stripped from acinclude.m4 plus AJ's recent
pending patch (logic incorporated, but not his exact patch and not
with the minor tweak that I just received).

I followed your form of using multiple -e arguments to sed instead of
a shell pipeline containing multiple sed commands.  Also, the initial
copy to <file>-in is no longer required now that we are using full
shell syntax instead of what was expressable inside of
AC_LINK_FILES().  I.e. every action is now exactly one sed command...

I compared the staged gthr*.h files produced by the derived
include/Makefile with the known good set (the only differences were
those introduced by AJ's patch) and then reran the test suite for good
measure (no regressions).

I can also confirm that the entire patch set bootstraps on
i386-*-freebsd4.2 (both with and without this patch).

I then double-checked that AJ's patch (which obviously should be a
correct change to ensure that system headers always include with <>)
worked as expected after ``make install''.  It does.

Since this is a patch to a pending new file, no ChangeLog entry is
provided for this patch...  In any event, it just makes the existing
comments that claim we just moved things around more accurate (I am
assuming that much of the ChangeLog entry you will commit will be:
<file> (what-was-moved): Moved...
<new file>: ...to here.)

If AJ's patch is never applied to the tree before this jumbo
configuration reorg patch goes in, then 

Regards,
Loren

*** /tmp/new	Thu Jul 12 17:17:33 2001
--- outside-cvs-src/gcc-mainline/libstdc++-v3/include/Makefile.am	Fri Jul 13 00:50:57 2001
***************
*** 396,415 ****
  	${glibcpp_builddir} ${glibcpp_srcdir} @GLIBCPP_IS_CROSS_COMPILING@ ;\
  	mv ${glibcpp_builddir}/include/bits/std_limits.h ${target_builddir}
  
- # This can definitely be improved.
  glibcpp_thread_h = @glibcpp_thread_h@
  
! ${thread_builddir}/gthr.h: 
! 	cp ${glibcpp_srcdir}/../gcc/gthr.h ${thread_builddir}/gthr.h-in; \
! 	sed '/^#/s/\([A-Z_][A-Z_]*\)/_GLIBCPP_\1/g' < ${thread_builddir}/gthr.h-in > $@
  
  ${thread_builddir}/gthr-single.h:
! 	cp ${glibcpp_srcdir}/../gcc/gthr-single.h ${thread_builddir}/gthr-single.h-in; \
! 	sed 's/\(UNUSED\)/_GLIBCPP_\1/g' < ${thread_builddir}/gthr-single.h-in | sed 's/\(GCC[A-Z_]*_H\)/_GLIBCPP_\1/g' > $@
  
  ${thread_builddir}/gthr-default.h:
! 	cp ${glibcpp_srcdir}/../gcc/${glibcpp_thread_h} ${thread_builddir}/gthr-default.h-in; \
! 	sed 's/\(UNUSED\)/_GLIBCPP_\1/g' < ${thread_builddir}/gthr-default.h-in | sed 's/\(GCC[A-Z_]*_H\)/_GLIBCPP_\1/g' | sed 's/\([A-Z_]*WEAK\)/_GLIBCPP_\1/g' > $@
  
  # One big happy istallation:  just copy everything
  # from the build to the install tree (except for the build stamps)
--- 396,419 ----
  	${glibcpp_builddir} ${glibcpp_srcdir} @GLIBCPP_IS_CROSS_COMPILING@ ;\
  	mv ${glibcpp_builddir}/include/bits/std_limits.h ${target_builddir}
  
  glibcpp_thread_h = @glibcpp_thread_h@
+ uppercase = [ABCDEFGHIJKLMNOPQRSTUVWXYZ_]
  
! ${thread_builddir}/gthr.h:
! 	sed -e '/^#/s/\(${uppercase}${uppercase}*\)/_GLIBCPP_\1/g' \
! 	-e 's,^#include "\(.*\)",#include <bits/\1>,g' \
! 	< ${glibcpp_srcdir}/../gcc/gthr.h > $@
  
  ${thread_builddir}/gthr-single.h:
! 	sed -e 's/\(UNUSED\)/_GLIBCPP_\1/g' \
! 	-e 's/\(GCC${uppercase}*_H\)/_GLIBCPP_\1/g' \
! 	< ${glibcpp_srcdir}/../gcc/gthr-single.h > $@
  
  ${thread_builddir}/gthr-default.h:
! 	sed -e 's/\(UNUSED\)/_GLIBCPP_\1/g' \
! 	-e 's/\(GCC${uppercase}*_H\)/_GLIBCPP_\1/g' \
! 	-e 's/\(${uppercase}*WEAK\)/_GLIBCPP_\1/g' \
! 	< ${glibcpp_srcdir}/../gcc/${glibcpp_thread_h} > $@
  
  # One big happy istallation:  just copy everything
  # from the build to the install tree (except for the build stamps)



More information about the Libstdc++ mailing list