This is the mail archive of the libstdc++@sources.redhat.com mailing list for the libstdc++ project.


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

Fwd: Re: makefiles aren't passing variables "correctly"


On Mon, 09 Oct 2000, Phil Edwards wrote:
> Where "correctly" is defined as "the way we want," at least.

  ...and because the definitions passed on the command line override any macros
defined in the makefile, merely changing src/Makefile.am isn't enough.  Its a
bit of a hack, but the following patch worked for me.  Apply, and then autoconf
and automake.

Index: Makefile.am
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/Makefile.am,v
retrieving revision 1.11
diff -c -p -3 -r1.11 Makefile.am
*** Makefile.am	2000/10/09 08:55:04	1.11
--- Makefile.am	2000/10/09 19:26:16
*************** AM_MAKEFLAGS = \
*** 175,184 ****
  	"WERROR=$(WERROR)" \
  	"OPTIMIZE_CXXFLAGS=$(OPTIMIZE_CXXFLAGS)" \
  	"WARN_CXXFLAGS=$(WARN_CXXFLAGS)" \
! 	"CONFIG_CXXFLAGS=$(CONFIG_CXXFLAGS)" \
! 	"GLIBCPP_INCLUDES=$(GLIBCPP_INCLUDES)" \
! 	"TOPLEVEL_INCLUDES=$(TOPLEVEL_INCLUDES)" \
! 	"LIBMATH_INCLUDES=$(LIBMATH_INCLUDES)" \
! 	"LIBIO_INCLUDES=$(LIBIO_INCLUDES)" \
! 	"CSHADOW_INCLUDES=$(CSHADOW_INCLUDES)"
  
--- 175,184 ----
  	"WERROR=$(WERROR)" \
  	"OPTIMIZE_CXXFLAGS=$(OPTIMIZE_CXXFLAGS)" \
  	"WARN_CXXFLAGS=$(WARN_CXXFLAGS)" \
! 	"CONFIG_CXXFLAGS=$(CONFIG_CXXFLAGS)"
! #	"GLIBCPP_INCLUDES=$(GLIBCPP_INCLUDES)" \
! #	"TOPLEVEL_INCLUDES=$(TOPLEVEL_INCLUDES)" \
! #	"LIBMATH_INCLUDES=$(LIBMATH_INCLUDES)" \
! #	"LIBIO_INCLUDES=$(LIBIO_INCLUDES)" \
! #	"CSHADOW_INCLUDES=$(CSHADOW_INCLUDES)"
  
Index: src/Makefile.am
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/src/Makefile.am,v
retrieving revision 1.37
diff -c -p -3 -r1.37 Makefile.am
*** Makefile.am	2000/10/09 08:55:06	1.37
--- Makefile.am	2000/10/09 19:26:18
*************** endif
*** 39,44 ****
--- 39,69 ----
  toolexeclib_LTLIBRARIES = libstdc++.la
  EXTRA_LTLIBRARIES = libinst-string.la libinst-wstring.la
  
+ # Root level of the include sources.
+ GLIBCPP_INCLUDES = $(top_srcdir)/include
+ 
+ # 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
+ 
+ # XXX may need to add this in later to enabled shadow header includes
+ #	-I$(top_builddir)/cshadow
+ if GLIBCPP_USE_CSHADOW
+ CSHADOW_INCLUDES = \
+ 	-I$(GLIBCPP_INCLUDES)/std -I$(GLIBCPP_INCLUDES)/c_std
+ else
+ CSHADOW_INCLUDES = \
+ 	-I$(GLIBCPP_INCLUDES)/std -I$(GLIBCPP_INCLUDES)/c
+ endif
+ 
  
  INCLUDES = \
  	-D_GNU_SOURCE -D_ISOC99_SOURCE -nostdinc++ $(CSHADOW_INCLUDES) \


-- 
Steven King
sxking@uswest.net

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