From 74f21e2d288b83a1e810a20eaa6503bb25b7059f Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Thu, 19 Jan 2012 10:24:17 -0500 Subject: [PATCH] Fix parallel build for lib/ When we have a dependency from a library on another library (with LIBADD), we need to put the lib we depend on in another directory, and build that directory prior to the current directory. This is what is done in the http://sourceware.org/autobook/autobook/autobook_92.html "11.5 Convenience Libraries" example. Signed-off-by: Mathieu Desnoyers --- configure.ac | 1 + lib/Makefile.am | 8 ++++---- lib/prio_heap/Makefile.am | 5 +++++ lib/{ => prio_heap}/prio_heap.c | 0 4 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 lib/prio_heap/Makefile.am rename lib/{ => prio_heap}/prio_heap.c (100%) diff --git a/configure.ac b/configure.ac index 1e980b9b..2241681c 100644 --- a/configure.ac +++ b/configure.ac @@ -67,6 +67,7 @@ AC_CONFIG_FILES([ formats/ctf/metadata/Makefile converter/Makefile lib/Makefile + lib/prio_heap/Makefile include/Makefile tests/Makefile ]) diff --git a/lib/Makefile.am b/lib/Makefile.am index ba24d21c..fccf9ab5 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -1,8 +1,8 @@ -AM_CFLAGS = $(PACKAGE_CFLAGS) -I$(top_srcdir)/include +SUBDIRS = prio_heap . -lib_LTLIBRARIES = libprio_heap.la libbabeltrace.la +AM_CFLAGS = $(PACKAGE_CFLAGS) -I$(top_srcdir)/include -libprio_heap_la_SOURCES = prio_heap.c +lib_LTLIBRARIES = libbabeltrace.la libbabeltrace_la_SOURCES = babeltrace.c \ callbacks.c \ @@ -10,4 +10,4 @@ libbabeltrace_la_SOURCES = babeltrace.c \ libbabeltrace_la_LIBADD = \ $(top_builddir)/types/libbabeltrace_types.la \ - $(top_builddir)/lib/libprio_heap.la + prio_heap/libprio_heap.la diff --git a/lib/prio_heap/Makefile.am b/lib/prio_heap/Makefile.am new file mode 100644 index 00000000..95613054 --- /dev/null +++ b/lib/prio_heap/Makefile.am @@ -0,0 +1,5 @@ +AM_CFLAGS = $(PACKAGE_CFLAGS) -I$(top_srcdir)/include + +lib_LTLIBRARIES = libprio_heap.la + +libprio_heap_la_SOURCES = prio_heap.c diff --git a/lib/prio_heap.c b/lib/prio_heap/prio_heap.c similarity index 100% rename from lib/prio_heap.c rename to lib/prio_heap/prio_heap.c -- 2.34.1