[master] b701fb54d build: Add $(VSC_GEN) to $(BUILT_SOURCES)

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Wed Jun 7 14:32:10 UTC 2023


commit b701fb54d69cd2bd30b5fad8dd3db524e4e819fd
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Tue May 16 14:36:22 2023 +0200

    build: Add $(VSC_GEN) to $(BUILT_SOURCES)
    
    This guarantees that VSC code is generated before compiling anything.
    
    Fixes #3928

diff --git a/lib/libvsc/Makefile.am b/lib/libvsc/Makefile.am
index 243f82587..9f9ae0373 100644
--- a/lib/libvsc/Makefile.am
+++ b/lib/libvsc/Makefile.am
@@ -19,4 +19,6 @@ VSC_SRC = \
 noinst_LTLIBRARIES = libvsc.la
 libvsc_la_SOURCES = $(VSC_SRC)
 
+BUILT_SOURCES = $(VSC_GEN)
+
 dist_pkgdata_SCRIPTS = vsctool.py
diff --git a/vmod/Makefile.am b/vmod/Makefile.am
index a485c0372..694e6c284 100644
--- a/vmod/Makefile.am
+++ b/vmod/Makefile.am
@@ -41,6 +41,8 @@ VSC_SRC = VSC_debug.vsc
 
 libvmod_debug_la_SOURCES += $(VSC_SRC)
 
+BUILT_SOURCES = $(VSC_GEN)
+
 # Allow Vmod_wrong*_Data to be exported
 vmod_debug_symbols_regex = 'Vmod_.*_Data'
 
diff --git a/vsc.am b/vsc.am
index e38d43e19..49fe25e43 100644
--- a/vsc.am
+++ b/vsc.am
@@ -1,6 +1,7 @@
 # Generic rule to generate C code from VSC files. VSC files must be listed
 # in the $(VSC_SRC) variable. The $(VSCTOOL) variable must point to the
 # location of vsctool.py, normally set up by varnish.m4 at configure time.
+# The resulting $(VSC_GEN) variable must be added to $(BUILT_SOURCES).
 
 VSC_GEN = $(VSC_SRC:.vsc=.c) $(VSC_SRC:.vsc=.h)
 


More information about the varnish-commit mailing list