Extensionless headers

Loren James Rittle rittle@latour.rsch.comm.mot.com
Thu Jan 10 22:21:00 GMT 2002


If the only problem was having the "standard .h extension" on all
header files found in $(srcdir), then I'm all for this patch as it
resolves the conflict.  I have reviewed the logic without running it
and it looks sound to me.

(I assume that c_base_headers, related rules and files will be updated
 similarly before final check-in of this proposed change. ;-)

>Index: Makefile.am
>===================================================================
>RCS file: /home/pme/Repositories/GCC/gcc/libstdc++-v3/include/Makefile.am,v
>retrieving revision 1.20
>diff -u -3 -r1.20 Makefile.am
>--- Makefile.am	4 Jan 2002 21:27:30 -0000	1.20
>+++ Makefile.am	10 Jan 2002 20:32:01 -0000
>@@ -185,35 +185,35 @@
> std_srcdir = ${glibcpp_srcdir}/include/std
> std_builddir = ./
> std_headers = \
>-	${std_srcdir}/algorithm \
[...]
>-	${std_srcdir}/vector 
>+	${std_srcdir}/std_algorithm.h \
[...]
>+	${std_srcdir}/std_vector.h
> 
> target_srcdir = ${glibcpp_srcdir}/@OS_INC_SRCDIR@
> target_builddir = ./${target_alias}/bits
>@@ -240,11 +240,16 @@
> # Here are the rules for building the headers
> all-local: ${target_builddir}/c++config.h ${allstamps}
> 
>+# This rule is slightly different, in that we must change the name of the
>+# local file from std_foo.h to foo.
> stamp-std: ${std_headers}
> 	@if [ ! -d "${std_builddir}" ]; then \
> 	  mkdir -p ${std_builddir} ;\
> 	fi ;\
>-	(cd ${std_builddir} && @LN_S@ $? .) ;\
>+	(cd ${std_builddir} && for h in $?; do \
>+	  official_name=`echo $$h | sed -e 's,.*/std_,,' -e 's,\.h$$,,'` ;\
>+	  @LN_S@ $$h ./$${official_name} ;\
>+	done) ;\
> 	echo `date` > stamp-std 
> 
> stamp-bits: ${bits_headers}



More information about the Libstdc++ mailing list