changeset 21384:ad1dbbd23f1d

Makefile.am: Add libgnu.la to BUILT_SOURCES to generate it early (partial fix bug #45578). * Makefile.am: Add libgnu.la to BUILT_SOURCES. Add a rule for libgnu.la to that enters directory and runs 'make all'.
author Rik <rik@octave.org>
date Tue, 01 Mar 2016 09:53:59 -0800
parents c9f967cfe7c1
children 89fa0694aa2e
files Makefile.am
diffstat 1 files changed, 15 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile.am	Tue Mar 01 09:00:33 2016 -0800
+++ b/Makefile.am	Tue Mar 01 09:53:59 2016 -0800
@@ -107,6 +107,21 @@
 
 ALL_LOCAL_TARGETS =
 
+# Subdirectories in which to run make recursively.
+# Other directories are handled directly from this Makefile,
+# but also review the included module.mk makefile fragments.
+
+SUBDIRS = libgnu
+
+# All of build depends on having libgnu.
+# Add the library to BUILT_SOURCES so it is created early in the build process
+# This is only a partial solution which works when 'make all' is used.
+# See bug #45578.
+BUILT_SOURCES += libgnu/libgnu.la
+
+libgnu/libgnu.la:
+	cd libgnu; $(MAKE) all
+
 include liboctave/module.mk
 include liboctave/link-deps.mk
 include libinterp/module.mk
@@ -122,12 +137,6 @@
 include m4/module.mk
 include test/module.mk
 
-# Subdirectories in which to run make recursively.  Other
-# directories are handled directly from this Makefile (see also the
-# included makefile fragments).
-
-SUBDIRS = libgnu
-
 dist-hook: doc-interpreter-dist-hook docs-dist-hook icons-dist-hook scripts-dist-hook
 
 if AMCOND_BUILD_DOCS