parallel builds (make -jX) failed sporadically for the first compilation
(before dependency tracking information was available) due to the race
with python building vcc_if.h
>From 8e2751a28b7cb6331b386fbf6e1a7b1bdeafb4b7 Mon Sep 17 00:00:00 2001
From: Nils Goroll <[email protected]>
Date: Wed, 9 Jan 2013 20:46:13 +0100
Subject: [PATCH] proper dependencies for vmod automake

parallel builds (make -jX) failed sporadically for the first compilation
(before dependency tracking information was available) due to the race
with python building vcc_if.h
---
 lib/libvmod_debug/Makefile.am |    9 +++++++--
 lib/libvmod_std/Makefile.am   |    9 +++++++--
 2 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/lib/libvmod_debug/Makefile.am b/lib/libvmod_debug/Makefile.am
index f199ecf..c77a9da 100644
--- a/lib/libvmod_debug/Makefile.am
+++ b/lib/libvmod_debug/Makefile.am
@@ -14,10 +14,15 @@ noinst_LTLIBRARIES = libvmod_debug.la
 libvmod_debug_la_LDFLAGS = $(AM_LDFLAGS) -module -export-dynamic 
-avoid-version -rpath /nowhere
 
 libvmod_debug_la_SOURCES = \
-       vcc_if.c \
-       vcc_if.h \
        vmod_debug.c
 
+nodist_libvmod_debug_la_SOURCES = \
+       vcc_if.c \
+       vcc_if.h
+
+# BUILT_SOURCES is only a hack and dependency tracking does not help for the 
first build
+vmod_debug.lo: vcc_if.h
+
 vcc_if.c vcc_if.h: $(vmodtool) $(vmod_srcdir)/vmod.vcc
        @PYTHON@ $(vmodtool) $(vmod_srcdir)/vmod.vcc
 
diff --git a/lib/libvmod_std/Makefile.am b/lib/libvmod_std/Makefile.am
index b8fa7bb..59648e8 100644
--- a/lib/libvmod_std/Makefile.am
+++ b/lib/libvmod_std/Makefile.am
@@ -17,12 +17,17 @@ vmod_LTLIBRARIES = libvmod_std.la
 libvmod_std_la_LDFLAGS = $(AM_LDFLAGS) -module -export-dynamic -avoid-version
 
 libvmod_std_la_SOURCES = \
-       vcc_if.c \
-       vcc_if.h \
        vmod_std.c \
        vmod_std_fileread.c \
        vmod_std_conversions.c
 
+nodist_libvmod_std_la_SOURCES = \
+       vcc_if.c \
+       vcc_if.h
+
+# BUILT_SOURCES is only a hack and dependency tracking does not help for the 
first build
+vmod_std.lo vmod_std_fileread.lo vmod_std_conversions.lo: vcc_if.h
+
 vcc_if.c vcc_if.h: $(vmodtool) $(vmod_srcdir)/vmod.vcc
        @PYTHON@ $(vmodtool) $(vmod_srcdir)/vmod.vcc
 
-- 
1.5.6.5

_______________________________________________
varnish-dev mailing list
[email protected]
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev

Reply via email to