This is the mail archive of the
libstdc++@sources.redhat.com
mailing list for the libstdc++ project.
Re: Fwd: Re: makefiles aren't passing variables "correctly"
- To: libstdc++ at sources dot redhat dot com,Benjamin Kosnik <bkoz at redhat dot com>
- Subject: Re: Fwd: Re: makefiles aren't passing variables "correctly"
- From: Steven King <sxking at uswest dot net>
- Date: Wed, 11 Oct 2000 11:13:55 -0700
- Organization: is the root of all evil
- References: <200010111757.e9BHv5f20812@fillmore.constant.com>
- Reply-To: sxking at uswest dot net
On Wed, 11 Oct 2000, Benjamin Kosnik wrote:
> As Steven pointed out, common defines and macros have moved up the
> Makefile.am heirarchy, from src/Makefile.am to ./Makefile.am.
>
> The reason for this is that
>
> src/Makefile.am
> libio/Makefile.am
> libsupc++/Makefile.am
>
> have a lot in common (and thus had a lot of duplication.) I felt like
> it was in the best interest to try and consolidate some of this stuff.
So, does the attached patch work for you? It factors out the common section
into a separate file, and include's it in each of the subdir/Makefile.am. The
Makefile.extra goes in libstdc++-v3 (does anyone know how to get cvs diff to
include new files in a patch?).
2000-10-11 Steven King sxking@uswest.net
* Makefile.extra: New file contains definitions of includes for subdirs
* Makefile.am: Don't pass definitions of includes to subdirs
* libio/Makefile.am: Add include of $(top_srcdir)/Makefile.extra
* libmath/Makefile.am: Add include of $(top_srcdir)/Makefile.extra
* libsupc++/Makefile.am: Add include of $(top_srcdir)/Makefile.extra
* src/Makefile.am: Add include of $(top_srcdir)/makefile.extra
--
Steven King
sxking@uswest.net
Index: Makefile.am
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/Makefile.am,v
retrieving revision 1.12
diff -c -p -3 -r1.12 Makefile.am
*** Makefile.am 2000/10/10 23:50:37 1.12
--- Makefile.am 2000/10/11 19:02:34
*************** AM_MAKEFLAGS = \
*** 176,187 ****
"DESTDIR=$(DESTDIR)" \
"WERROR=$(WERROR)" \
"OPTIMIZE_CXXFLAGS=$(OPTIMIZE_CXXFLAGS)" \
! "WARN_CXXFLAGS=$(WARN_CXXFLAGS)" \
! "CONFIG_CXXFLAGS=$(CONFIG_CXXFLAGS)" \
! "GLIBCPP_INCLUDE_DIR=$(GLIBCPP_INCLUDE_DIR)" \
! "C_INCLUDE_DIR=$(C_INCLUDE_DIR)" \
! "TOPLEVEL_INCLUDES=$(TOPLEVEL_INCLUDES)" \
! "LIBMATH_INCLUDES=$(LIBMATH_INCLUDES)" \
! "LIBIO_INCLUDES=$(LIBIO_INCLUDES)" \
! "CSHADOW_INCLUDES=$(CSHADOW_INCLUDES)" \
! "LIBSUPCXX_INCLUDES=$(LIBSUPCXX_INCLUDES)"
--- 176,179 ----
"DESTDIR=$(DESTDIR)" \
"WERROR=$(WERROR)" \
"OPTIMIZE_CXXFLAGS=$(OPTIMIZE_CXXFLAGS)" \
! "WARN_CXXFLAGS=$(WARN_CXXFLAGS)"
Index: libio/Makefile.am
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/libio/Makefile.am,v
retrieving revision 1.14
diff -c -p -3 -r1.14 Makefile.am
*** Makefile.am 2000/10/10 23:50:38 1.14
--- Makefile.am 2000/10/11 19:02:36
***************
*** 23,28 ****
--- 23,30 ----
AUTOMAKE_OPTIONS = 1.3 cygnus
+ include $(top_srcdir)/Makefile.extra
+
noinst_LTLIBRARIES = libio.la
Index: libmath/Makefile.am
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/libmath/Makefile.am,v
retrieving revision 1.3
diff -c -p -3 -r1.3 Makefile.am
*** Makefile.am 2000/10/10 23:50:38 1.3
--- Makefile.am 2000/10/11 19:02:36
***************
*** 23,28 ****
--- 23,30 ----
AUTOMAKE_OPTIONS = 1.3 cygnus
+ include $(top_srcdir)/Makefile.extra
+
noinst_LTLIBRARIES = libmath.la
EXTRA_LONG_DOUBLE_yes = \
Index: libsupc++/Makefile.am
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/libsupc++/Makefile.am,v
retrieving revision 1.6
diff -c -p -3 -r1.6 Makefile.am
*** Makefile.am 2000/10/10 23:50:39 1.6
--- Makefile.am 2000/10/11 19:02:36
***************
*** 21,26 ****
--- 21,28 ----
## the Free Software Foundation, 59 Temple Place - Suite 330,
## Boston, MA 02111-1307, USA.
+ include $(top_srcdir)/Makefile.extra
+
AUTOMAKE_OPTIONS = 1.3 cygnus
MAINT_CHARSET = latin1
Index: src/Makefile.am
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/src/Makefile.am,v
retrieving revision 1.38
diff -c -p -3 -r1.38 Makefile.am
*** Makefile.am 2000/10/10 23:50:39 1.38
--- Makefile.am 2000/10/11 19:02:37
***************
*** 26,31 ****
--- 26,33 ----
AUTOMAKE_OPTIONS = 1.3 gnits
MAINT_CHARSET = latin1
+ include $(top_srcdir)/Makefile.extra
+
# Cross compiler and multilib support.
# Install a library built with a cross compiler in tooldir, not libdir.
if USE_LIBDIR
## $Id$
# Root level of the include sources.
GLIBCPP_INCLUDE_DIR = $(top_srcdir)/include
# Can either use include/c or include/c_std to grab "C" headers. This
# variable is set to the include directory currently in use.
C_INCLUDE_DIR = $(GLIBCPP_INCLUDE_DIR)/@c_include_dir@
# Passed down for cross compilers, canadian crosses.
TOPLEVEL_INCLUDES = -I$(includedir)
LIBMATH_INCLUDES = -I$(top_srcdir)/libmath
if GLIBCPP_NEED_LIBIO
LIBIO_INCLUDES = \
-I$(top_builddir)/libio -I$(top_srcdir)/libio
else
LIBIO_INCLUDES = -I$(top_srcdir)/libio
endif
LIBSUPCXX_INCLUDES = -I$(top_srcdir)/libsupc++
# XXX May need to add this in later to enabled shadow header includes
# -I$(top_builddir)/cshadow
CSHADOW_INCLUDES = \
-I$(GLIBCPP_INCLUDE_DIR)/std -I$(C_INCLUDE_DIR)