changeset 21690:b6a686543080

Only include config.h in files that are compiled separately. * build-aux/mk-opts.pl: Don't emit code to include config.h in files that are only included in other files. * module.mk (libinterp_EXTRA_DIST): List ov-base-sparse.cc here. (OV_SPARSE_SRC): Not here. * op-dm-template.cc, op-scm-scm.cc, Array.cc, DiagArray2.cc, MArray.cc, MDiagArray2.cc, Sparse.cc, intNDArray.cc, bsxfun-defs.cc, mx-inlines.cc, kpse.cc, oct-sort.cc, ov-base-diag.cc, ov-base-int.cc, ov-base-mat.cc, ov-base-scalar.cc, ov-base-sparse.cc: Don't include config.h. * op-cdm-cm.cc, op-cdm-dm.cc, op-cdm-m.cc, op-cm-cdm.cc, op-cm-dm.cc, op-dm-cdm.cc, op-dm-cm.cc, op-dm-m.cc, op-fcdm-fcm.cc, op-fcdm-fm.cc, op-fcm-fcdm.cc, op-fcm-fdm.cc, op-fdm-fcdm.cc, op-fdm-fcm.cc, op-fdm-fm.cc, op-fm-fcdm.cc, op-fm-fdm.cc, op-m-cdm.cc, op-m-dm.cc: Do include config.h.
author John W. Eaton <jwe@octave.org>
date Fri, 13 May 2016 09:27:38 -0400
parents 9467549bd5ff
children 263d18409fdf
files build-aux/mk-opts.pl libinterp/octave-value/module.mk libinterp/octave-value/ov-base-diag.cc libinterp/octave-value/ov-base-int.cc libinterp/octave-value/ov-base-mat.cc libinterp/octave-value/ov-base-scalar.cc libinterp/octave-value/ov-base-sparse.cc libinterp/operators/op-cdm-cm.cc libinterp/operators/op-cdm-dm.cc libinterp/operators/op-cdm-m.cc libinterp/operators/op-cm-cdm.cc libinterp/operators/op-cm-dm.cc libinterp/operators/op-dm-cdm.cc libinterp/operators/op-dm-cm.cc libinterp/operators/op-dm-m.cc libinterp/operators/op-dm-template.cc libinterp/operators/op-fcdm-fcm.cc libinterp/operators/op-fcdm-fm.cc libinterp/operators/op-fcm-fcdm.cc libinterp/operators/op-fcm-fdm.cc libinterp/operators/op-fdm-fcdm.cc libinterp/operators/op-fdm-fcm.cc libinterp/operators/op-fdm-fm.cc libinterp/operators/op-fm-fcdm.cc libinterp/operators/op-fm-fdm.cc libinterp/operators/op-m-cdm.cc libinterp/operators/op-m-dm.cc libinterp/operators/op-scm-scm.cc liboctave/array/Array.cc liboctave/array/DiagArray2.cc liboctave/array/MArray.cc liboctave/array/MDiagArray2.cc liboctave/array/Sparse.cc liboctave/array/intNDArray.cc liboctave/numeric/bsxfun-defs.cc liboctave/operators/mx-inlines.cc liboctave/util/kpse.cc liboctave/util/oct-sort.cc
diffstat 38 files changed, 131 insertions(+), 53 deletions(-) [+]
line wrap: on
line diff
--- a/build-aux/mk-opts.pl	Thu May 12 14:46:25 2016 -0400
+++ b/build-aux/mk-opts.pl	Fri May 13 09:27:38 2016 -0400
@@ -375,8 +375,6 @@
 #if ! defined (octave_${CLASS_NAME}_h)
 #define octave_${CLASS_NAME}_h 1
 
-#include "octave-config.h"
-
 #include <cfloat>
 #include <cmath>
 
@@ -509,9 +507,9 @@
 // DO NOT EDIT!
 // Generated automatically from $DEFN_FILE.
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
+// This file should not include config.h.  It is only included in other
+// C++ source files that should have included config.h before including
+// this file.
 
 #include <iomanip>
 #include <iostream>
--- a/libinterp/octave-value/module.mk	Thu May 12 14:46:25 2016 -0400
+++ b/libinterp/octave-value/module.mk	Fri May 13 09:27:38 2016 -0400
@@ -75,7 +75,6 @@
   libinterp/octave-value/ov-uint8.cc
 
 OV_SPARSE_SRC = \
-  libinterp/octave-value/ov-base-sparse.cc \
   libinterp/octave-value/ov-bool-sparse.cc \
   libinterp/octave-value/ov-cx-sparse.cc \
   libinterp/octave-value/ov-re-sparse.cc
@@ -131,7 +130,8 @@
   libinterp/octave-value/ov-base-diag.cc \
   libinterp/octave-value/ov-base-int.cc \
   libinterp/octave-value/ov-base-mat.cc \
-  libinterp/octave-value/ov-base-scalar.cc
+  libinterp/octave-value/ov-base-scalar.cc \
+  libinterp/octave-value/ov-base-sparse.cc
 
 OV_JAVA_DF = \
   libinterp/octave-value/ov.df \
--- a/libinterp/octave-value/ov-base-diag.cc	Thu May 12 14:46:25 2016 -0400
+++ b/libinterp/octave-value/ov-base-diag.cc	Fri May 13 09:27:38 2016 -0400
@@ -20,9 +20,9 @@
 
 */
 
-#ifdef HAVE_CONFIG_H
-#  include "config.h"
-#endif
+// This file should not include config.h.  It is only included in other
+// C++ source files that should have included config.h before including
+// this file.
 
 #include <iostream>
 
--- a/libinterp/octave-value/ov-base-int.cc	Thu May 12 14:46:25 2016 -0400
+++ b/libinterp/octave-value/ov-base-int.cc	Fri May 13 09:27:38 2016 -0400
@@ -20,9 +20,9 @@
 
 */
 
-#ifdef HAVE_CONFIG_H
-#  include "config.h"
-#endif
+// This file should not include config.h.  It is only included in other
+// C++ source files that should have included config.h before including
+// this file.
 
 #include <iostream>
 #include <limits>
--- a/libinterp/octave-value/ov-base-mat.cc	Thu May 12 14:46:25 2016 -0400
+++ b/libinterp/octave-value/ov-base-mat.cc	Fri May 13 09:27:38 2016 -0400
@@ -21,9 +21,9 @@
 
 */
 
-#ifdef HAVE_CONFIG_H
-#  include "config.h"
-#endif
+// This file should not include config.h.  It is only included in other
+// C++ source files that should have included config.h before including
+// this file.
 
 #include <iostream>
 
--- a/libinterp/octave-value/ov-base-scalar.cc	Thu May 12 14:46:25 2016 -0400
+++ b/libinterp/octave-value/ov-base-scalar.cc	Fri May 13 09:27:38 2016 -0400
@@ -20,9 +20,9 @@
 
 */
 
-#ifdef HAVE_CONFIG_H
-#  include "config.h"
-#endif
+// This file should not include config.h.  It is only included in other
+// C++ source files that should have included config.h before including
+// this file.
 
 #include <iostream>
 
--- a/libinterp/octave-value/ov-base-sparse.cc	Thu May 12 14:46:25 2016 -0400
+++ b/libinterp/octave-value/ov-base-sparse.cc	Fri May 13 09:27:38 2016 -0400
@@ -22,9 +22,9 @@
 
 */
 
-#ifdef HAVE_CONFIG_H
-#  include "config.h"
-#endif
+// This file should not include config.h.  It is only included in other
+// C++ source files that should have included config.h before including
+// this file.
 
 #include <iomanip>
 #include <iostream>
--- a/libinterp/operators/op-cdm-cm.cc	Thu May 12 14:46:25 2016 -0400
+++ b/libinterp/operators/op-cdm-cm.cc	Fri May 13 09:27:38 2016 -0400
@@ -20,6 +20,10 @@
 
 */
 
+#ifdef HAVE_CONFIG_H
+#  include "config.h"
+#endif
+
 #define LINCLUDE "ov-cx-diag.h"
 #define RINCLUDE "ov-cx-mat.h"
 
--- a/libinterp/operators/op-cdm-dm.cc	Thu May 12 14:46:25 2016 -0400
+++ b/libinterp/operators/op-cdm-dm.cc	Fri May 13 09:27:38 2016 -0400
@@ -20,6 +20,10 @@
 
 */
 
+#ifdef HAVE_CONFIG_H
+#  include "config.h"
+#endif
+
 #define LINCLUDE "ov-cx-diag.h"
 #define RINCLUDE "ov-re-diag.h"
 
--- a/libinterp/operators/op-cdm-m.cc	Thu May 12 14:46:25 2016 -0400
+++ b/libinterp/operators/op-cdm-m.cc	Fri May 13 09:27:38 2016 -0400
@@ -20,6 +20,10 @@
 
 */
 
+#ifdef HAVE_CONFIG_H
+#  include "config.h"
+#endif
+
 #define LINCLUDE "ov-cx-diag.h"
 #define RINCLUDE "ov-re-mat.h"
 
--- a/libinterp/operators/op-cm-cdm.cc	Thu May 12 14:46:25 2016 -0400
+++ b/libinterp/operators/op-cm-cdm.cc	Fri May 13 09:27:38 2016 -0400
@@ -20,6 +20,10 @@
 
 */
 
+#ifdef HAVE_CONFIG_H
+#  include "config.h"
+#endif
+
 #define LINCLUDE "ov-cx-mat.h"
 #define RINCLUDE "ov-cx-diag.h"
 
--- a/libinterp/operators/op-cm-dm.cc	Thu May 12 14:46:25 2016 -0400
+++ b/libinterp/operators/op-cm-dm.cc	Fri May 13 09:27:38 2016 -0400
@@ -20,6 +20,10 @@
 
 */
 
+#ifdef HAVE_CONFIG_H
+#  include "config.h"
+#endif
+
 #define LINCLUDE "ov-cx-mat.h"
 #define RINCLUDE "ov-re-diag.h"
 
--- a/libinterp/operators/op-dm-cdm.cc	Thu May 12 14:46:25 2016 -0400
+++ b/libinterp/operators/op-dm-cdm.cc	Fri May 13 09:27:38 2016 -0400
@@ -20,6 +20,10 @@
 
 */
 
+#ifdef HAVE_CONFIG_H
+#  include "config.h"
+#endif
+
 #define LINCLUDE "ov-re-diag.h"
 #define RINCLUDE "ov-cx-diag.h"
 
--- a/libinterp/operators/op-dm-cm.cc	Thu May 12 14:46:25 2016 -0400
+++ b/libinterp/operators/op-dm-cm.cc	Fri May 13 09:27:38 2016 -0400
@@ -20,6 +20,10 @@
 
 */
 
+#ifdef HAVE_CONFIG_H
+#  include "config.h"
+#endif
+
 #define LINCLUDE "ov-re-diag.h"
 #define RINCLUDE "ov-cx-mat.h"
 
--- a/libinterp/operators/op-dm-m.cc	Thu May 12 14:46:25 2016 -0400
+++ b/libinterp/operators/op-dm-m.cc	Fri May 13 09:27:38 2016 -0400
@@ -20,6 +20,10 @@
 
 */
 
+#ifdef HAVE_CONFIG_H
+#  include "config.h"
+#endif
+
 #define LINCLUDE "ov-re-diag.h"
 #define RINCLUDE "ov-re-mat.h"
 
--- a/libinterp/operators/op-dm-template.cc	Thu May 12 14:46:25 2016 -0400
+++ b/libinterp/operators/op-dm-template.cc	Fri May 13 09:27:38 2016 -0400
@@ -20,9 +20,9 @@
 
 */
 
-#ifdef HAVE_CONFIG_H
-#  include "config.h"
-#endif
+// This file should not include config.h.  It is only included in other
+// C++ source files that should have included config.h before including
+// this file.
 
 // FIXME: it might be nice to only include the declarations of the
 // operators that are actually needed instead of including all of them.
--- a/libinterp/operators/op-fcdm-fcm.cc	Thu May 12 14:46:25 2016 -0400
+++ b/libinterp/operators/op-fcdm-fcm.cc	Fri May 13 09:27:38 2016 -0400
@@ -20,6 +20,10 @@
 
 */
 
+#ifdef HAVE_CONFIG_H
+#  include "config.h"
+#endif
+
 #define LINCLUDE "ov-flt-cx-diag.h"
 #define RINCLUDE "ov-flt-cx-mat.h"
 
--- a/libinterp/operators/op-fcdm-fm.cc	Thu May 12 14:46:25 2016 -0400
+++ b/libinterp/operators/op-fcdm-fm.cc	Fri May 13 09:27:38 2016 -0400
@@ -20,6 +20,10 @@
 
 */
 
+#ifdef HAVE_CONFIG_H
+#  include "config.h"
+#endif
+
 #define LINCLUDE "ov-flt-cx-diag.h"
 #define RINCLUDE "ov-flt-re-mat.h"
 
--- a/libinterp/operators/op-fcm-fcdm.cc	Thu May 12 14:46:25 2016 -0400
+++ b/libinterp/operators/op-fcm-fcdm.cc	Fri May 13 09:27:38 2016 -0400
@@ -20,6 +20,10 @@
 
 */
 
+#ifdef HAVE_CONFIG_H
+#  include "config.h"
+#endif
+
 #define LINCLUDE "ov-flt-cx-mat.h"
 #define RINCLUDE "ov-flt-cx-diag.h"
 
--- a/libinterp/operators/op-fcm-fdm.cc	Thu May 12 14:46:25 2016 -0400
+++ b/libinterp/operators/op-fcm-fdm.cc	Fri May 13 09:27:38 2016 -0400
@@ -20,6 +20,10 @@
 
 */
 
+#ifdef HAVE_CONFIG_H
+#  include "config.h"
+#endif
+
 #define LINCLUDE "ov-flt-cx-mat.h"
 #define RINCLUDE "ov-flt-re-diag.h"
 
--- a/libinterp/operators/op-fdm-fcdm.cc	Thu May 12 14:46:25 2016 -0400
+++ b/libinterp/operators/op-fdm-fcdm.cc	Fri May 13 09:27:38 2016 -0400
@@ -20,6 +20,10 @@
 
 */
 
+#ifdef HAVE_CONFIG_H
+#  include "config.h"
+#endif
+
 #define LINCLUDE "ov-flt-re-diag.h"
 #define RINCLUDE "ov-flt-cx-diag.h"
 
--- a/libinterp/operators/op-fdm-fcm.cc	Thu May 12 14:46:25 2016 -0400
+++ b/libinterp/operators/op-fdm-fcm.cc	Fri May 13 09:27:38 2016 -0400
@@ -20,6 +20,10 @@
 
 */
 
+#ifdef HAVE_CONFIG_H
+#  include "config.h"
+#endif
+
 #define LINCLUDE "ov-flt-re-diag.h"
 #define RINCLUDE "ov-flt-cx-mat.h"
 
--- a/libinterp/operators/op-fdm-fm.cc	Thu May 12 14:46:25 2016 -0400
+++ b/libinterp/operators/op-fdm-fm.cc	Fri May 13 09:27:38 2016 -0400
@@ -20,6 +20,10 @@
 
 */
 
+#ifdef HAVE_CONFIG_H
+#  include "config.h"
+#endif
+
 #define LINCLUDE "ov-flt-re-diag.h"
 #define RINCLUDE "ov-flt-re-mat.h"
 
--- a/libinterp/operators/op-fm-fcdm.cc	Thu May 12 14:46:25 2016 -0400
+++ b/libinterp/operators/op-fm-fcdm.cc	Fri May 13 09:27:38 2016 -0400
@@ -20,6 +20,10 @@
 
 */
 
+#ifdef HAVE_CONFIG_H
+#  include "config.h"
+#endif
+
 #define LINCLUDE "ov-flt-re-mat.h"
 #define RINCLUDE "ov-flt-cx-diag.h"
 
--- a/libinterp/operators/op-fm-fdm.cc	Thu May 12 14:46:25 2016 -0400
+++ b/libinterp/operators/op-fm-fdm.cc	Fri May 13 09:27:38 2016 -0400
@@ -20,6 +20,10 @@
 
 */
 
+#ifdef HAVE_CONFIG_H
+#  include "config.h"
+#endif
+
 #define LINCLUDE "ov-flt-re-mat.h"
 #define RINCLUDE "ov-flt-re-diag.h"
 
--- a/libinterp/operators/op-m-cdm.cc	Thu May 12 14:46:25 2016 -0400
+++ b/libinterp/operators/op-m-cdm.cc	Fri May 13 09:27:38 2016 -0400
@@ -20,6 +20,10 @@
 
 */
 
+#ifdef HAVE_CONFIG_H
+#  include "config.h"
+#endif
+
 #define LINCLUDE "ov-re-mat.h"
 #define RINCLUDE "ov-cx-diag.h"
 
--- a/libinterp/operators/op-m-dm.cc	Thu May 12 14:46:25 2016 -0400
+++ b/libinterp/operators/op-m-dm.cc	Fri May 13 09:27:38 2016 -0400
@@ -20,6 +20,10 @@
 
 */
 
+#ifdef HAVE_CONFIG_H
+#  include "config.h"
+#endif
+
 #define LINCLUDE "ov-re-mat.h"
 #define RINCLUDE "ov-re-diag.h"
 
--- a/libinterp/operators/op-scm-scm.cc	Thu May 12 14:46:25 2016 -0400
+++ b/libinterp/operators/op-scm-scm.cc	Fri May 13 09:27:38 2016 -0400
@@ -37,10 +37,6 @@
 #include "ov-re-sparse.h"
 #include "ov-cx-sparse.h"
 
-#ifdef HAVE_CONFIG_H
-#  include "config.h"
-#endif
-
 #include "errwarn.h"
 #include "ovl.h"
 #include "ov.h"
--- a/liboctave/array/Array.cc	Thu May 12 14:46:25 2016 -0400
+++ b/liboctave/array/Array.cc	Fri May 13 09:27:38 2016 -0400
@@ -23,9 +23,9 @@
 
 */
 
-#ifdef HAVE_CONFIG_H
-#  include "config.h"
-#endif
+// This file should not include config.h.  It is only included in other
+// C++ source files that should have included config.h before including
+// this file.
 
 #include <cassert>
 
--- a/liboctave/array/DiagArray2.cc	Thu May 12 14:46:25 2016 -0400
+++ b/liboctave/array/DiagArray2.cc	Fri May 13 09:27:38 2016 -0400
@@ -22,9 +22,9 @@
 
 */
 
-#ifdef HAVE_CONFIG_H
-#  include "config.h"
-#endif
+// This file should not include config.h.  It is only included in other
+// C++ source files that should have included config.h before including
+// this file.
 
 #include <cassert>
 
--- a/liboctave/array/MArray.cc	Thu May 12 14:46:25 2016 -0400
+++ b/liboctave/array/MArray.cc	Fri May 13 09:27:38 2016 -0400
@@ -21,9 +21,9 @@
 
 */
 
-#ifdef HAVE_CONFIG_H
-#  include "config.h"
-#endif
+// This file should not include config.h.  It is only included in other
+// C++ source files that should have included config.h before including
+// this file.
 
 #include "MArray.h"
 #include "Array-util.h"
--- a/liboctave/array/MDiagArray2.cc	Thu May 12 14:46:25 2016 -0400
+++ b/liboctave/array/MDiagArray2.cc	Fri May 13 09:27:38 2016 -0400
@@ -21,9 +21,9 @@
 
 */
 
-#ifdef HAVE_CONFIG_H
-#  include "config.h"
-#endif
+// This file should not include config.h.  It is only included in other
+// C++ source files that should have included config.h before including
+// this file.
 
 #include "MDiagArray2.h"
 #include "Array-util.h"
--- a/liboctave/array/Sparse.cc	Thu May 12 14:46:25 2016 -0400
+++ b/liboctave/array/Sparse.cc	Fri May 13 09:27:38 2016 -0400
@@ -23,9 +23,9 @@
 
 */
 
-#ifdef HAVE_CONFIG_H
-#  include "config.h"
-#endif
+// This file should not include config.h.  It is only included in other
+// C++ source files that should have included config.h before including
+// this file.
 
 #include <cassert>
 
--- a/liboctave/array/intNDArray.cc	Thu May 12 14:46:25 2016 -0400
+++ b/liboctave/array/intNDArray.cc	Fri May 13 09:27:38 2016 -0400
@@ -22,9 +22,9 @@
 
 */
 
-#ifdef HAVE_CONFIG_H
-#  include "config.h"
-#endif
+// This file should not include config.h.  It is only included in other
+// C++ source files that should have included config.h before including
+// this file.
 
 #include "Array-util.h"
 #include "mx-base.h"
--- a/liboctave/numeric/bsxfun-defs.cc	Thu May 12 14:46:25 2016 -0400
+++ b/liboctave/numeric/bsxfun-defs.cc	Fri May 13 09:27:38 2016 -0400
@@ -24,6 +24,10 @@
 #if ! defined (octave_bsxfun_defs_h)
 #define octave_bsxfun_defs_h 1
 
+// This file should not include config.h.  It is only included in other
+// C++ source files that should have included config.h before including
+// this file.
+
 #include <algorithm>
 #include <iostream>
 
--- a/liboctave/operators/mx-inlines.cc	Thu May 12 14:46:25 2016 -0400
+++ b/liboctave/operators/mx-inlines.cc	Fri May 13 09:27:38 2016 -0400
@@ -25,6 +25,10 @@
 #if ! defined (octave_mx_inlines_h)
 #define octave_mx_inlines_h 1
 
+// This file should not include config.h.  It is only included in other
+// C++ source files that should have included config.h before including
+// this file.
+
 #include <cstddef>
 #include <cmath>
 #include <cstring>
--- a/liboctave/util/kpse.cc	Thu May 12 14:46:25 2016 -0400
+++ b/liboctave/util/kpse.cc	Fri May 13 09:27:38 2016 -0400
@@ -26,9 +26,9 @@
 
 */
 
-#if defined (HAVE_CONFIG_H)
-#include "config.h"
-#endif
+// This file should not include config.h.  It is only included in other
+// C++ source files that should have included config.h before including
+// this file.
 
 #include <map>
 #include <string>
--- a/liboctave/util/oct-sort.cc	Thu May 12 14:46:25 2016 -0400
+++ b/liboctave/util/oct-sort.cc	Fri May 13 09:27:38 2016 -0400
@@ -101,9 +101,9 @@
   Agreement.
 */
 
-#ifdef HAVE_CONFIG_H
-#  include "config.h"
-#endif
+// This file should not include config.h.  It is only included in other
+// C++ source files that should have included config.h before including
+// this file.
 
 #include <cassert>
 #include <algorithm>