[master] b54c7f6 proper dependencies for vmod automake

Tollef Fog Heen tfheen at varnish-cache.org
Thu Jan 24 11:10:41 CET 2013


commit b54c7f6d2bc0f1bda7d61fafccdb412cbfa1a18d
Author: Nils Goroll <slink at schokola.de>
Date:   Wed Jan 9 20:49:41 2013 +0100

    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
    
    From 8e2751a28b7cb6331b386fbf6e1a7b1bdeafb4b7 Mon Sep 17 00:00:00 2001
    From: Nils Goroll <nils.goroll at uplex.de>
    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

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
 



More information about the varnish-commit mailing list