changeset 15417:a0fb36acbd0d

build: Only use extra CPPFLAGS in the convenience libraries that need them. * liboctave/Makefile.am: Remove XCPPFLAGS from liboctave_la_CPPFLAGS. * liboctave/array/module.mk: Add SPARSE_XCPPFLAGS to convenience library CPPFLAGS. * liboctave/cruft/Makefile.am: Place all CPPFLAGS on one line. * liboctave/numeric/module.mk: Add ARPACK_CPPFLAGS, FFTW_XCPPFLAGS, SPARSE_XCPPFLAGS to convenience library CPPFLAGS. * liboctave/util/module.mk: Add SPARSE_XCPPFLAGS to convenience library CPPFLAGS.
author Rik <rik@octave.org>
date Wed, 19 Sep 2012 10:05:15 -0700
parents 15c435992d3c
children dd371063e414
files liboctave/Makefile.am liboctave/array/module.mk liboctave/cruft/Makefile.am liboctave/numeric/module.mk liboctave/util/module.mk
diffstat 5 files changed, 16 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/liboctave/Makefile.am
+++ b/liboctave/Makefile.am
@@ -85,18 +85,11 @@
 ## It has no source code itself.
 liboctave_la_SOURCES = 
 
-## FIXME: SPARSE, FFTW, and ARPACK flags should probably only be in the
-##        particular convenience library that needs them.  
-liboctave_la_CPPFLAGS = \
-  @OCTAVE_DLL_DEFS@ \
-  $(SPARSE_XCPPFLAGS) \
-  $(FFTW_XCPPFLAGS) \
-  $(ARPACK_CPPFLAGS) \
-  $(AM_CPPFLAGS)
+liboctave_la_CPPFLAGS = @OCTAVE_DLL_DEFS@ $(AM_CPPFLAGS)
 
 include link-deps.mk
 
-# Dummy C++ source to cause C++ linking.
+# Dummy C++ source to force C++ linking.
 nodist_EXTRA_liboctave_la_SOURCES = dummy.cc
 
 liboctave_la_LIBADD = \
--- a/liboctave/array/module.mk
+++ b/liboctave/array/module.mk
@@ -137,5 +137,7 @@
 noinst_LTLIBRARIES += array/libarray.la
 
 array_libarray_la_SOURCES = $(ARRAY_SRC)
-array_libarray_la_CPPFLAGS = $(liboctave_la_CPPFLAGS)
+array_libarray_la_CPPFLAGS = \
+  $(liboctave_la_CPPFLAGS) \
+  $(SPARSE_XCPPFLAGS)
 
--- a/liboctave/cruft/Makefile.am
+++ b/liboctave/cruft/Makefile.am
@@ -36,9 +36,7 @@
 
 libcruft_la_FFLAGS = $(F77_INTEGER_8_FLAG)
 
-libcruft_la_CPPFLAGS = \
-  @CRUFT_DLL_DEFS@ \
-  $(AM_CPPFLAGS)
+libcruft_la_CPPFLAGS = @CRUFT_DLL_DEFS@ $(AM_CPPFLAGS)
 
 libcruft_la_DEPENDENCIES = cruft.def
 
--- a/liboctave/numeric/module.mk
+++ b/liboctave/numeric/module.mk
@@ -1,5 +1,5 @@
 EXTRA_DIST += \
-	numeric/module.mk \
+  numeric/module.mk \
   $(OPT_IN)
 
 OPT_INC = \
@@ -156,7 +156,7 @@
   numeric/SparsedbleCHOL.cc \
   numeric/SparsedbleLU.cc \
   numeric/SparseQR.cc \
-	$(NUMERIC_C_SRC)
+  $(NUMERIC_C_SRC)
 
 TEMPLATE_SRC += \
   numeric/base-lu.cc \
@@ -176,5 +176,9 @@
 noinst_LTLIBRARIES += numeric/libnumeric.la
 
 numeric_libnumeric_la_SOURCES = $(NUMERIC_SRC)
-numeric_libnumeric_la_CPPFLAGS = $(liboctave_la_CPPFLAGS)
+numeric_libnumeric_la_CPPFLAGS = \
+  $(liboctave_la_CPPFLAGS) \
+  $(ARPACK_CPPFLAGS) \
+  $(FFTW_XCPPFLAGS) \
+  $(SPARSE_XCPPFLAGS)
 
--- a/liboctave/util/module.mk
+++ b/liboctave/util/module.mk
@@ -82,5 +82,7 @@
 noinst_LTLIBRARIES += util/libutil.la
 
 util_libutil_la_SOURCES = $(UTIL_SRC)
-util_libutil_la_CPPFLAGS = $(liboctave_la_CPPFLAGS)
+util_libutil_la_CPPFLAGS = \
+  $(liboctave_la_CPPFLAGS) \
+  $(SPARSE_XCPPFLAGS)