diff Makefile.am @ 17878:0d660785098e

work around GCC bug in stl_algo.h (nth_element and sort; bug #40436) * build-aux/stl_algo.h-fixed: New file. * acinclude.m4 (OCTAVE_CHECK_BROKEN_STL_ALGO_H): New macro. * configure.ac: Use it. Set AMCOND_HAVE_BROKEN_STL_ALGO_H. * Makefile.am (bits/stl_algo.h): New target. (BUILT_SOURCES): Add bits/stl_algo.h to the list if AMCOND_HAVE_BROKEN_STL_ALGO_H is true. (EXTRA_DIST): Include built-aux/stl_algo.h-fixed in the list.
author John W. Eaton <jwe@octave.org>
date Thu, 07 Nov 2013 14:03:58 -0500
parents 32344942ee6e
children 51a3b3fa981f
line wrap: on
line diff
--- a/Makefile.am	Thu Nov 07 12:37:13 2013 -0500
+++ b/Makefile.am	Thu Nov 07 14:03:58 2013 -0500
@@ -44,6 +44,7 @@
   build-aux/mk-opts.pl \
   build-aux/move-if-change \
   build-aux/OctJavaQry.class \
+  build-aux/stl_algo.h-fixed \
   etc/NEWS.1 \
   etc/NEWS.2 \
   etc/NEWS.3 \
@@ -92,6 +93,10 @@
 
 BUILT_SOURCES = run-octave
 
+if AMCOND_HAVE_BROKEN_STL_ALGO_H
+  BUILT_SOURCES += bits/stl_algo.h
+endif
+
 noinst_SCRIPTS = run-octave
 
 INFO_FILES = \
@@ -128,6 +133,10 @@
 	@$(do_subst_script_vals)
 	chmod a+rx "$@"
 
+bits/stl_algo.h: build-aux/stl_algo.h-fixed
+	$(MKDIR_P) bits
+	$(INSTALL_HEADER) $< $@
+
 .gdbinit: etc/gdbinit
 	@$(gdbinit_install_rule)