This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[libstdc++] Factor out common makefile fragments, cleanup


A surprisingly long description for such a small patch.

Automake has a file inclusion mechanism for including common fragments
of .am files.  It's interpreted by automake, not by make, so we're still
playing by the rules.  This lets us factor out a fair amount of redundancy,
duplication, and redundancy.

Everything SUBST'd in an autoconf file is picked up by automake.  If we
do AC_SUBST(FOO), then every Makefile.in automatically gets

    FOO = @FOO@

So no need to do that ourselves now.  This also lets us use $(FOO) in
Makefile rules instead of @FOO@, which makes things a tiny bit easier
to debug.

I got medieval on GLIBCXX_EXPORT_INCLUDES:

+ GLIBCXX_INCLUDES (the necessary include-tree dirs for any C++-library-using
program) and LIBSUPCXX_INCLUDES (the libsupc++ directory with <new> and
whatnot) were always used together.  Which makes perfect sense.  This folds
them into a single variable.  Also, -nostdinc++ is always used already;
it's passed as part of CXX from the toplevel.  So we don't need to add
it ourselves.[*]

+ TOPLEVEL_INCLUDES was a misnomer.  It expanded to nothing actually
in the top level, but rather to $includedir, which is an install dir.
This was only used in Canadian crosses, so rename to CANADIAN_INCLUDES.
But wait, it's only used along with GLIBCXX_INCLUDES, and is empty in
non-Canadian scenarios, so fold it in with GLIBCXX_INCLUDES too.

+ We rename INCLUDES to AM_CPPFLAGS, and since it only contains
GLIBCXX_INCLUDES for now, it can be moved to the automake fragment.

+ There's only one header in libmath to be picked up by LIBMATH_INCLUDES,
the only files including that header are also in libmath, and the correct
'-I' is already passed by generated rules in Makefile.in.  So this can go.

+ libsupc++ needs to get headers from the gcc srcdir, and (possibly,
in future) from other things at the actual top level, so I made
TOPLEVEL_INCLUDES contain those paths instead.  It's only a single -I and
could be removed entirely, but it leaves a nice placeholder for future work.


Benjmain added a conditional, GLIBCXX_BUILD_LIBMATH,

    http://gcc.gnu.org/ml/libstdc++/2002-12/msg00125.html

that could -- in theory -- be used to skip building libmath if nothing from
it is needed.  In theory, because nothing has ever tested this variable.
Heh.  I've commented out GLIBCXX_BUILD_LIBMATH to remind us of this.
We could go back and actually make that do something, if we wanted.

Likewise, CANADIAN is only used once elsewhere in the configury, not in the
makefiles.  Again, I've only commented it, not removed it.

The native-or-cross decision is moved earlier in the process.  If we're
going to use the adapted AC_NO_EXECUTABLES, we need to make this decision
before calling GLIBCXX_CONFIGURE.  We already have a "is native" boolean,
so just set it earlier, and use it later on in the big if-then-else branch.
(I've moved the native half of the branch to before the cross half; it
seems clearer that way.)

Finally, automake tries to be a bit weird/smart with VPATH builds.
It generates a bit of shell code to be expanded as part of each file's
compilation, but the expanded code makes little sense when working under
GCC's build rules.  Debugging becomes easier if we just strip that from
the generated Makefiles altogether.

Tested on x86-linux native and a mips-elf cross, modified to use /all/ its
multilibs.


[*]  I plan to make scripts/testsuite_flags more fine-grained.  Right now
     the toplevel's idea of CXX includes some -L's for compilation, which
     is pointless.  Talking to the testsuite also needs a tweak.



2003-08-17  Phil Edwards  <pme@gcc.gnu.org>

	* acinclude.m4 (GLIBCXX_EXPORT_INCLUDES):  Remove LIBMATH_INCLUDES
	and LIBSUPCXX_INCLUDES.  Re-purpose TOPLEVEL_INCLUDES to refer to
	things from the top level.
	* configure.ac (GLIBCXX_IS_NATIVE):  Determine earlier and re-order.
	Comment out the conditionals for CANADIAN and GLIBCXX_BUILD_LIBMATH
	(currently unused).  Strip the fake-VPATH shell fragment from
	automake-generated rules, if present.
	* linkage.m4:  Add comment.

	* fragment.am:  New file, containing factored-out common settings.
	(AM_CPPFLAGS):  Absorb the deprecated INCLUDES variable contents.
	* Makefile.am:  Include fragment.am.  Remove common variables.
	* include/Makefile.am:  Likewise.
	* libmath/Makefile.am:  Likewise.
	* libsupc++/Makefile.am:  Likewise.
	* po/Makefile.am:  Likewise.  Print rules during check.
	* src/Makefile.am:  Likewise.
	* testsuite/Makefile.am:  Likewise.

	* aclocal.m4, configure, Makefile.in, include/Makefile.in,
	libmath/Makefile.in, libsupc++/Makefile.in, po/Makefile.in,
	src/Makefile.in, testsuite/Makefile.in:  Regenerate.


Index: Makefile.am
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/Makefile.am,v
retrieving revision 1.44
diff -u -3 -p -r1.44 Makefile.am
--- Makefile.am	5 Aug 2003 02:00:02 -0000	1.44
+++ Makefile.am	17 Aug 2003 19:47:05 -0000
@@ -22,13 +22,9 @@
 ## Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
 ## USA.
 
-MAINT_CHARSET = latin1
+include $(top_srcdir)/fragment.am
 
 SUBDIRS = include libmath libsupc++ src po testsuite 
-
-mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
-
-PWD_COMMAND = $${PWDCMD-pwd}
 
 # These rules are messy, but are hella worth it.
 doxygen:
Index: acinclude.m4
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/acinclude.m4,v
retrieving revision 1.262
diff -u -3 -p -r1.262 acinclude.m4
--- acinclude.m4	11 Aug 2003 05:56:33 -0000	1.262
+++ acinclude.m4	17 Aug 2003 19:47:05 -0000
@@ -588,27 +588,27 @@ dnl
 dnl Substs:
 dnl  GLIBCXX_INCLUDES
 dnl  TOPLEVEL_INCLUDES
-dnl  LIBMATH_INCLUDES
-dnl  LIBSUPCXX_INCLUDES
 dnl
 AC_DEFUN(GLIBCXX_EXPORT_INCLUDES, [
-  # Root level of the build directory include sources.
-  GLIBCXX_INCLUDES="-I$glibcxx_builddir/include/$host_alias -I$glibcxx_builddir/include"
+  # Used for every C++ compile we perform.
+  GLIBCXX_INCLUDES="\
+-I$glibcxx_builddir/include/$host_alias \
+-I$glibcxx_builddir/include \
+-I$glibcxx_srcdir/libsupc++"
 
-  # Passed down for canadian crosses.
+  # For Canadian crosses, pick this up too.
   if test $CANADIAN = yes; then
-    TOPLEVEL_INCLUDES='-I${includedir}'
+    GLIBCXX_INCLUDES="$GLIBCXX_INCLUDES '-I${includedir}'"
   fi
 
-  LIBMATH_INCLUDES='-I${glibcxx_srcdir}/libmath'
-
-  LIBSUPCXX_INCLUDES='-I${glibcxx_srcdir}/libsupc++'
+  # Stuff in the actual top level.  Currently only used by libsupc++ to
+  # get unwind* headers from the gcc dir.
+  #TOPLEVEL_INCLUDES='-I$(toplevel_srcdir)/gcc -I$(toplevel_srcdir)/include'
+  TOPLEVEL_INCLUDES='-I$(toplevel_srcdir)/gcc'
 
   # Now, export this to all the little Makefiles....
   AC_SUBST(GLIBCXX_INCLUDES)
   AC_SUBST(TOPLEVEL_INCLUDES)
-  AC_SUBST(LIBMATH_INCLUDES)
-  AC_SUBST(LIBSUPCXX_INCLUDES)
 ])
 
 
Index: configure.ac
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/configure.ac,v
retrieving revision 1.2
diff -u -3 -p -r1.2 configure.ac
--- configure.ac	11 Aug 2003 05:26:58 -0000	1.2
+++ configure.ac	17 Aug 2003 19:47:10 -0000
@@ -39,6 +39,14 @@ target_alias=${target_alias-$host_alias}
 # Handy for debugging:
 #AC_MSG_NOTICE($build / $host / $target / $host_alias / $target_alias); sleep 5
 
+if test "$build" != "$host"; then
+  # We are being configured with some form of cross compiler.
+  GLIBCXX_IS_NATIVE=false
+  # GCC_NO_EXECUTABLES
+else
+  GLIBCXX_IS_NATIVE=true
+fi
+
 # Sets up automake.  Must come after AC_CANONICAL_SYSTEM.  Each of the
 # following is magically included in AUTOMAKE_OPTIONS in each Makefile.am.
 #  1.x:  minimum required version
@@ -94,10 +102,46 @@ if test $atomicity_include_dir = cpu/gen
 fi
 
 
-if test "$build" != "$host"; then
+if $GLIBCXX_IS_NATIVE; then
 
-  # We are being configured with some form of cross compiler.
-  GLIBCXX_IS_NATIVE=false
+  # We can do more elaborate tests that assume a working linker.
+  CANADIAN=no
+
+  # Check for available headers.
+  AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h machine/endian.h \
+  machine/param.h sys/machine.h fp.h locale.h float.h inttypes.h gconv.h \
+  sys/types.h])
+
+  GLIBCXX_CHECK_COMPILER_FEATURES
+  GLIBCXX_CHECK_LINKER_FEATURES
+  GLIBCXX_CHECK_MATH_SUPPORT
+  GLIBCXX_CHECK_BUILTIN_MATH_SUPPORT
+  GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
+  GLIBCXX_CHECK_WCHAR_T_SUPPORT
+  GLIBCXX_CHECK_STDLIB_SUPPORT
+
+  # For showmanyc_helper().
+  AC_CHECK_HEADERS(sys/ioctl.h sys/filio.h)
+  GLIBCXX_CHECK_POLL
+  GLIBCXX_CHECK_S_ISREG_OR_S_IFREG
+
+  # For xsputn_2().
+  AC_CHECK_HEADERS(sys/uio.h)
+  GLIBCXX_CHECK_WRITEV
+
+  AC_LC_MESSAGES
+
+  AC_TRY_COMPILE(
+    [#include <setjmp.h>],
+    [sigjmp_buf env;
+     while (! sigsetjmp (env, 1))
+       siglongjmp (env, 1);
+    ],
+    [AC_DEFINE(HAVE_SIGSETJMP, 1, [Define if sigsetjmp is available.])])
+
+  AC_FUNC_MMAP
+
+else
 
   # This lets us hard-code the functionality we know we'll have in the cross
   # target environment.  "Let" is a sugar-coated word placed on an especially
@@ -114,7 +158,7 @@ if test "$build" != "$host"; then
   # crosses can be removed.
 
   # If Canadian cross, then don't pick up tools from the build directory.
-  # Used in GLIBCXX_EXPORT_INCLUDES (and nowhere else?).
+  # Used only in GLIBCXX_EXPORT_INCLUDES.
   if test -n "$with_cross_host" &&
      test x"$build" != x"$with_cross_host" &&
      test x"$build" != x"$target";
@@ -199,46 +243,6 @@ if test "$build" != "$host"; then
     AC_DEFINE(HAVE_TANHL)
   fi
 
-else
-
-  # We are being configured natively.  We can do more elaborate tests that
-  # include AC_TRY_COMPILE now, as the linker is assumed to be working.
-  GLIBCXX_IS_NATIVE=true
-  CANADIAN=no
-
-  # Check for available headers.
-  AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h machine/endian.h \
-  machine/param.h sys/machine.h fp.h locale.h float.h inttypes.h gconv.h \
-  sys/types.h])
-
-  GLIBCXX_CHECK_COMPILER_FEATURES
-  GLIBCXX_CHECK_LINKER_FEATURES
-  GLIBCXX_CHECK_MATH_SUPPORT
-  GLIBCXX_CHECK_BUILTIN_MATH_SUPPORT
-  GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
-  GLIBCXX_CHECK_WCHAR_T_SUPPORT
-  GLIBCXX_CHECK_STDLIB_SUPPORT
-
-  # For showmanyc_helper().
-  AC_CHECK_HEADERS(sys/ioctl.h sys/filio.h)
-  GLIBCXX_CHECK_POLL
-  GLIBCXX_CHECK_S_ISREG_OR_S_IFREG
-
-  # For xsputn_2().
-  AC_CHECK_HEADERS(sys/uio.h)
-  GLIBCXX_CHECK_WRITEV
-
-  AC_LC_MESSAGES
-
-  AC_TRY_COMPILE(
-    [#include <setjmp.h>],
-    [sigjmp_buf env;
-     while (! sigsetjmp (env, 1))
-       siglongjmp (env, 1);
-    ],
-    [AC_DEFINE(HAVE_SIGSETJMP, 1, [Define if sigsetjmp is available.])])
-
-  AC_FUNC_MMAP
 fi
 
 # This depends on GLIBCXX CHECK_LINKER_FEATURES, but without it assumes no.
@@ -259,9 +263,9 @@ AC_SUBST(OS_INC_SRCDIR)
 
 # Determine cross-compile flags and AM_CONDITIONALs.
 #AC_SUBST(GLIBCXX_IS_NATIVE)
-AM_CONDITIONAL(CANADIAN, test $CANADIAN = yes)
+#AM_CONDITIONAL(CANADIAN, test $CANADIAN = yes)
 # from GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT:
-AM_CONDITIONAL(GLIBCXX_BUILD_LIBMATH,  test $need_libmath = yes)
+#AM_CONDITIONAL(GLIBCXX_BUILD_LIBMATH,  test $need_libmath = yes)
  
 AC_CACHE_SAVE
 
@@ -271,7 +275,7 @@ else
   multilib_arg=
 fi
 
-# Export all the install information
+# Export all the install information.
 GLIBCXX_EXPORT_INSTALL_INFO
 
 # Export all the include and flag information to Makefiles.
@@ -311,14 +315,22 @@ AC_CONFIG_COMMANDS([default],
    # To work around this not being passed down from config-ml.in ->
    # srcdir/Makefile.am -> srcdir/{src,libsupc++,...}/Makefile.am, manually
    # append it here.  Only modify Makefiles that have just been created.
-   for i in src libsupc++ testsuite; do
+   #
+   # Also, get rid of this simulated-VPATH thing that automake does.
+   cat > vpsed << \_EOF
+s!`test -f '$<' || echo '$(srcdir)/'`!!
+_EOF
+   for i in libmath libsupc++ src testsuite; do
     case $CONFIG_FILES in
      *${i}/Makefile*)
        #echo "Adding MULTISUBDIR to $i/Makefile"
-       grep '^MULTISUBDIR =' Makefile >> $i/Makefile
+       sed -f vpsed $i/Makefile > tmp
+       grep '^MULTISUBDIR =' Makefile >> tmp
+       mv tmp $i/Makefile
        ;;
     esac
    done
+   rm vpsed
  fi
  (cd include && ${MAKE-make})
 ],
Index: fragment.am
===================================================================
RCS file: fragment.am
diff -N fragment.am
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ fragment.am	17 Aug 2003 19:47:10 -0000
@@ -0,0 +1,25 @@
+
+## This is used in all Makefile.am's except for libmath's.  Set defaults here.
+
+MAINT_CHARSET = latin1
+
+mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
+PWD_COMMAND = $${PWDCMD-pwd}
+
+toolexecdir = $(glibcxx_toolexecdir)
+toolexeclibdir = $(glibcxx_toolexeclibdir)
+
+# These bits are all figured out from configure.  Look in acinclude.m4
+# or configure.ac to see how they are set.  See GLIBCXX_EXPORT_FLAGS.
+CONFIG_CXXFLAGS = \
+	$(SECTION_FLAGS) $(EXTRA_CXX_FLAGS)
+WARN_CXXFLAGS = \
+	$(WARN_FLAGS) $(WERROR) -fdiagnostics-show-location=once
+
+# -I/-D flags to pass when compiling.
+AM_CPPFLAGS = $(GLIBCXX_INCLUDES)
+
+
+
+
+## vim:ft=automake
Index: linkage.m4
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/linkage.m4,v
retrieving revision 1.1
diff -u -3 -p -r1.1 linkage.m4
--- linkage.m4	5 Aug 2003 02:00:13 -0000	1.1
+++ linkage.m4	17 Aug 2003 19:47:10 -0000
@@ -497,6 +497,7 @@ AC_DEFUN(GLIBCXX_CHECK_COMPLEX_MATH_SUPP
     AC_CHECK_FUNCS([__signbitl], , [LIBMATHOBJS="$LIBMATHOBJS signbitl.lo"])
   fi
 
+  # XXX Review this.  Nothing uses it.
   if test -n "$LIBMATHOBJS"; then
     need_libmath=yes
   fi
Index: include/Makefile.am
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/include/Makefile.am,v
retrieving revision 1.66
diff -u -3 -p -r1.66 Makefile.am
--- include/Makefile.am	11 Aug 2003 13:56:38 -0000	1.66
+++ include/Makefile.am	17 Aug 2003 19:47:10 -0000
@@ -21,17 +21,7 @@
 ## Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
 ## USA.
 
-MAINT_CHARSET = latin1
-
-mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
-
-# Cross compiler and multilib support.
-glibcxx_srcdir=@glibcxx_srcdir@
-glibcxx_builddir=@glibcxx_builddir@
-
-GLIBCXX_INCLUDES = @GLIBCXX_INCLUDES@
-LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@
-INCLUDES = -nostdinc++ $(GLIBCXX_INCLUDES) $(LIBSUPCXX_INCLUDES)
+include $(top_srcdir)/fragment.am
 
 # Standard C++ includes.
 std_srcdir = ${glibcxx_srcdir}/include/std
@@ -509,8 +499,8 @@ ${pch_input}: ${allstamped} ${host_build
 	if [ ! -d "${pch_output_builddir}" ]; then \
 	  mkdir -p ${pch_output_builddir}; \
 	fi; \
-	$(CXX) $(PCHFLAGS) $(INCLUDES) ${pch_source} -O0 -g -o ${pch_output_builddir}/O0g; \
-	$(CXX) $(PCHFLAGS) $(INCLUDES) ${pch_source} -O2 -g -o ${pch_output_builddir}/O2g;
+	$(CXX) $(PCHFLAGS) $(AM_CPPFLAGS) ${pch_source} -O0 -g -o ${pch_output_builddir}/O0g; \
+	$(CXX) $(PCHFLAGS) $(AM_CPPFLAGS) ${pch_source} -O2 -g -o ${pch_output_builddir}/O2g;
 
 # For robustness sake (in light of junk files or in-source
 # configuration), copy from the build or source tree to the install
Index: libmath/Makefile.am
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/libmath/Makefile.am,v
retrieving revision 1.22
diff -u -3 -p -r1.22 Makefile.am
--- libmath/Makefile.am	5 Aug 2003 02:00:14 -0000	1.22
+++ libmath/Makefile.am	17 Aug 2003 19:47:10 -0000
@@ -1,6 +1,6 @@
 ## Makefile for the math subdirectory of the GNU C++ Standard library.
 ##
-## Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 
+## Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003
 ## Free Software Foundation, Inc.
 ##
 ## This file is part of the libstdc++ version 3 distribution.
@@ -26,17 +26,13 @@ mkinstalldirs = $(SHELL) $(toplevel_srcd
 
 noinst_LTLIBRARIES = libmath.la
 
-libmath_la_LIBADD = @LIBMATHOBJS@ 
+libmath_la_LIBADD = @LIBMATHOBJS@
 
 libmath_la_DEPENDENCIES = $(libmath_la_LIBADD)
 
 libmath_la_SOURCES = stubs.c
 
-# Use common includes from acinclude.m4/GLIBCXX_EXPORT_INCLUDES
-TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@
-
-INCLUDES = \
-	$(TOPLEVEL_INCLUDES) 
+AM_CPPFLAGS = $(CANADIAN_INCLUDES)
 
 # Only compiling "C" sources in this directory.
 LIBTOOL = @LIBTOOL@ --tag CC
Index: libsupc++/Makefile.am
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/libsupc++/Makefile.am,v
retrieving revision 1.45
diff -u -3 -p -r1.45 Makefile.am
--- libsupc++/Makefile.am	5 Aug 2003 02:00:16 -0000	1.45
+++ libsupc++/Makefile.am	17 Aug 2003 19:47:10 -0000
@@ -21,15 +21,7 @@
 ## the Free Software Foundation, 59 Temple Place - Suite 330,
 ## Boston, MA 02111-1307, USA. 
 
-MAINT_CHARSET = latin1
-
-mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
-
-# Cross compiler and multilib support.
-CC = @CC@
-toolexecdir = @glibcxx_toolexecdir@
-toolexeclibdir = @glibcxx_toolexeclibdir@
-
+include $(top_srcdir)/fragment.am
 
 # Need this library to both be part of libstdc++.a, and installed
 # separately too.
@@ -39,30 +31,9 @@ toolexeclib_LTLIBRARIES = libsupc++.la
 noinst_LTLIBRARIES = libsupc++convenience.la
 
 
-# Compile flags that should be constant throughout the build, both for
-# SUBDIRS and for libstdc++-v3 in general.
-OPTIMIZE_CXXFLAGS = @OPTIMIZE_CXXFLAGS@
-
-# These bits are all figured out from configure. Look in acinclude.m4
-# or configure.in to see how they are set. See GLIBCXX_EXPORT_FLAGS
-# NB: DEBUGFLAGS have to be at the end so that -O2 can be overridden.
-CONFIG_CXXFLAGS = \
-	@SECTION_FLAGS@ @EXTRA_CXX_FLAGS@
-
-# Warning flags to use.
-WARN_CXXFLAGS = \
-	@WARN_FLAGS@ $(WERROR) -fdiagnostics-show-location=once
 
 LIBSUPCXX_CXXFLAGS = @LIBSUPCXX_PICFLAGS@
 
-# Use common includes from acinclude.m4/GLIBCXX_EXPORT_INCLUDES
-GLIBCXX_INCLUDES = @GLIBCXX_INCLUDES@
-LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@
-GCC_INCLUDES = -I$(toplevel_srcdir)/gcc -I$(toplevel_srcdir)/include
-
-INCLUDES = \
-	$(GCC_INCLUDES) $(GLIBCXX_INCLUDES) $(LIBSUPCXX_INCLUDES)
-
 headers = \
 	exception new typeinfo cxxabi.h exception_defines.h 
 
@@ -137,7 +108,7 @@ AM_MAKEFLAGS = \
 # We have to put --tag disable-shared after --tag CXX lest things
 # CXX undo the affect of disable-shared.
 LTCXXCOMPILE = $(LIBTOOL) --tag CXX --tag disable-shared \
-               --mode=compile $(CXX) $(INCLUDES) \
+               --mode=compile $(CXX) $(TOPLEVEL_INCLUDES) \
 	       $(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(AM_CXXFLAGS) 
 
 # 3) We'd have a problem when building the shared libstdc++ object if
Index: po/Makefile.am
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/po/Makefile.am,v
retrieving revision 1.9
diff -u -3 -p -r1.9 Makefile.am
--- po/Makefile.am	5 Aug 2003 02:00:16 -0000	1.9
+++ po/Makefile.am	17 Aug 2003 19:47:10 -0000
@@ -1,6 +1,6 @@
 ## Makefile for the po subdirectory of the GNU C++ Standard library.
 ##
-## Copyright (C) 2001 Free Software Foundation, Inc.
+## Copyright (C) 2001, 2003 Free Software Foundation, Inc.
 ##
 ## This file is part of the libstdc++ version 3 distribution.
 ## Process this file with automake to produce Makefile.in.
@@ -21,11 +21,8 @@
 ## Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
 ## USA.
 
-PACKAGE = @PACKAGE@
-glibcxx_srcdir = @glibcxx_srcdir@
 
 # Location of installation directories.
-mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
 locale_installdir = $(DESTDIR)$(datadir)/locale
 locale_builddir = @glibcxx_localedir@
 
@@ -53,8 +50,8 @@ all-local-yes: $(LOCALE_OUT) 
 check: check-@USE_NLS@
 check-no:
 check-yes:
-	@$(mkinstalldirs) $(locale_builddir) 
-	@catalogs='$(LOCALE_OUT)'; \
+	$(mkinstalldirs) $(locale_builddir) 
+	catalogs='$(LOCALE_OUT)'; \
 	for cat in $$catalogs; do \
 	  cat=`basename $$cat`; \
 	  lang=`echo $$cat | sed 's/\.mo$$//'`; \
@@ -69,7 +66,7 @@ install-data-local: install-data-local-@
 install-data-local-no:
 install-data-local-yes: all-local-yes
 	$(mkinstalldirs) $(locale_installdir) 
-	@catalogs='$(LOCALE_OUT)'; \
+	catalogs='$(LOCALE_OUT)'; \
 	for cat in $$catalogs; do \
 	  cat=`basename $$cat`; \
 	  lang=`echo $$cat | sed 's/\.mo$$//'`; \
Index: src/Makefile.am
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/src/Makefile.am,v
retrieving revision 1.130
diff -u -3 -p -r1.130 Makefile.am
--- src/Makefile.am	5 Aug 2003 02:00:17 -0000	1.130
+++ src/Makefile.am	17 Aug 2003 19:47:11 -0000
@@ -22,26 +22,20 @@
 ## Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
 ## USA.
 
-MAINT_CHARSET = latin1
-
-mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
+include $(top_srcdir)/fragment.am
 
 # Cross compiler support.
-glibcxx_srcdir=@glibcxx_srcdir@
-glibcxx_builddir=@glibcxx_builddir@
-toolexecdir = @glibcxx_toolexecdir@
-toolexeclibdir = @glibcxx_toolexeclibdir@
 toolexeclib_LTLIBRARIES = libstdc++.la
 
 # Symbol versioning for shared libraries.
 if GLIBCXX_BUILD_VERSIONED_SHLIB
 version_arg = -Wl,--version-script=libstdc++-symbol.ver
-libstdc++-symbol.ver:  ${glibcxx_srcdir}/@SYMVER_MAP@
-	cp ${glibcxx_srcdir}/@SYMVER_MAP@ ./libstdc++-symbol.ver
-	if test "x@port_specific_symbol_files@" != x; then \
+libstdc++-symbol.ver:  ${glibcxx_srcdir}/$(SYMVER_MAP)
+	cp ${glibcxx_srcdir}/$(SYMVER_MAP) ./libstdc++-symbol.ver
+	if test "x$(port_specific_symbol_files)" != x; then \
 	  sed -n '1,/DO NOT DELETE/p' $@ > tmp.top; \
 	  sed -n '/DO NOT DELETE/,$$p' $@ > tmp.bottom; \
-	  cat tmp.top @port_specific_symbol_files@ tmp.bottom > $@; \
+	  cat tmp.top $(port_specific_symbol_files) tmp.bottom > $@; \
 	  rm tmp.top tmp.bottom; \
 	fi
 else
@@ -49,30 +43,6 @@ version_arg =
 libstdc++-symbol.ver:
 endif
 
-# Compile flags that should be constant throughout the build, both for
-# SUBDIRS and for libstdc++-v3 in general.
-OPTIMIZE_CXXFLAGS = @OPTIMIZE_CXXFLAGS@
-
-# These bits are all figured out from configure. Look in acinclude.m4
-# or configure.in to see how they are set. See GLIBCXX_EXPORT_FLAGS
-CONFIG_CXXFLAGS = \
-	@SECTION_FLAGS@ @EXTRA_CXX_FLAGS@
-
-# Warning flags to use.
-WARN_CXXFLAGS = \
-	@WARN_FLAGS@ $(WERROR) -fdiagnostics-show-location=once
-
-# Use common includes from acinclude.m4/GLIBCXX_EXPORT_INCLUDES
-GLIBCXX_INCLUDES = @GLIBCXX_INCLUDES@
-LIBMATH_INCLUDES = @LIBMATH_INCLUDES@
-LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@
-TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@
-
-INCLUDES = \
-	-nostdinc++ \
-	$(GLIBCXX_INCLUDES) \
-	$(LIBSUPCXX_INCLUDES) $(LIBMATH_INCLUDES) \
-	$(TOPLEVEL_INCLUDES)
 
 # Source files linked in via configuration/make substitution for a
 # particular host.
Index: testsuite/Makefile.am
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/testsuite/Makefile.am,v
retrieving revision 1.30
diff -u -3 -p -r1.30 Makefile.am
--- testsuite/Makefile.am	8 Aug 2003 15:24:00 -0000	1.30
+++ testsuite/Makefile.am	17 Aug 2003 19:47:11 -0000
@@ -23,15 +23,12 @@
 
 AUTOMAKE_OPTIONS = dejagnu
 
-mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
+include $(top_srcdir)/fragment.am
 
 AM_MAKEFLAGS = -j1
 AM_RUNTESTFLAGS =
-PWD_COMMAND = $${PWDCMD-pwd}
 
 ## CXX is actually a "C" compiler. These are real C++ programs.
-glibcxx_srcdir=@glibcxx_srcdir@
-glibcxx_builddir=@glibcxx_builddir@
 testsuite_flags_script=${glibcxx_builddir}/scripts/testsuite_flags
 CXX=`${testsuite_flags_script} --build-cxx`
 
@@ -39,13 +36,6 @@ CXXLINK = \
 	LD_RUN_PATH=$${LD_RUN_PATH:+$$LD_RUN_PATH:}${glibcxx_builddir}/src/.libs\
 	$(LIBTOOL) --tag=CXX --mode=link $(CXX) \
 	$(AM_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@
-
-GLIBCXX_INCLUDES = @GLIBCXX_INCLUDES@
-LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@
-TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@
-INCLUDES = \
-	-nostdinc++ \
-	@GLIBCXX_INCLUDES@ @LIBSUPCXX_INCLUDES@ @TOPLEVEL_INCLUDES@ 
 
 # Generated lists of files to run.  All of these names are valid make
 # targets, if you wish to generate a list manually.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]