[master] ad99f14 libvcc/generate.py creates code all over the place
Nils Goroll
nils.goroll at uplex.de
Wed Jan 17 15:41:05 UTC 2018
commit ad99f144c44f034b54c972c712862afbdfd94280
Author: Nils Goroll <nils.goroll at uplex.de>
Date: Wed Jan 17 16:35:19 2018 +0100
libvcc/generate.py creates code all over the place
so tell make in lib/libvcc how to invoke it.
Exposed by 062234c19e62fac492bf6559ca2a296d4cc1020a: Now code changes
(as when switching branches) may require a rebuild in lib/libvcc only
diff --git a/include/Makefile.am b/include/Makefile.am
index c11ba2b..27a557a 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -98,11 +98,12 @@ nobase_noinst_HEADERS = \
vtcp.h \
vtree.h
+## keep in sync with lib/libvcc/Makefile.am
vmod_abi.h: \
$(top_srcdir)/lib/libvcc/generate.py \
$(top_srcdir)/include/vdef.h \
$(top_srcdir)/include/vrt.h
- mkdir -p tbl
+ mkdir -p $(top_builddir)/include/tbl
@PYTHON@ $(top_srcdir)/lib/libvcc/generate.py \
$(top_srcdir) $(top_builddir)
diff --git a/lib/libvcc/Makefile.am b/lib/libvcc/Makefile.am
index 133dd1b..2b141b5 100644
--- a/lib/libvcc/Makefile.am
+++ b/lib/libvcc/Makefile.am
@@ -39,9 +39,23 @@ dist_pkgdata_SCRIPTS = \
vmodtool.py \
vsctool.py
-vcc_obj.c vcc_fixed_token.c vcc_token_defs.h: \
- $(top_builddir)/include/vcl.h
+## keep in sync with include/Makefile.am
+vcc_obj.c: \
+ $(top_srcdir)/lib/libvcc/generate.py \
+ $(top_srcdir)/include/vdef.h \
+ $(top_srcdir)/include/vrt.h
+ mkdir -p $(top_builddir)/include/tbl
+ @PYTHON@ $(top_srcdir)/lib/libvcc/generate.py \
+ $(top_srcdir) $(top_builddir)
+
+GEN_H = \
+ vcc_fixed_token.c \
+ vcc_token_defs.h
+
+$(GEN_H): vcc_obj.c
+
+GENERATED_H = vcc_obj.c $(GEN_H)
+
+BUILT_SOURCES = $(GENERATED_H)
-CLEANFILES = $(builddir)/vcc_token_defs.h \
- $(builddir)/vcc_fixed_token.c \
- $(builddir)/vcc_obj.c
+MAINTAINERCLEANFILES = $(GENERATED_H)
More information about the varnish-commit
mailing list