[master] c661cb725 build: Use vsc.am for varnish-counters(3) includes
Dridi Boukelmoune
dridi.boukelmoune at gmail.com
Wed Jun 7 14:32:10 UTC 2023
commit c661cb7253b319f4dfd4d14114a6dfc2d4af6cfd
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date: Mon May 22 17:40:32 2023 +0200
build: Use vsc.am for varnish-counters(3) includes
With that we lose the ability to rebuild the manual from the doc/sphinx
directory if the sources were modified, just like any other dependency
on $(top_builddir) sources. This one is linked once and for all, but
doesn't fit the link_srcdir target.
diff --git a/doc/sphinx/Makefile.am b/doc/sphinx/Makefile.am
index 96fc5fc1a..2dcdcd55f 100644
--- a/doc/sphinx/Makefile.am
+++ b/doc/sphinx/Makefile.am
@@ -85,22 +85,8 @@ include/params.rst: $(top_builddir)/bin/varnishd/varnishd
mv -f ${@}_ ${@}
BUILT_SOURCES += include/params.rst
-COUNTERS = \
- $(top_srcdir)/lib/libvsc/VSC_main.vsc \
- $(top_srcdir)/lib/libvsc/VSC_mgt.vsc \
- $(top_srcdir)/lib/libvsc/VSC_mempool.vsc \
- $(top_srcdir)/lib/libvsc/VSC_sma.vsc \
- $(top_srcdir)/lib/libvsc/VSC_smu.vsc \
- $(top_srcdir)/lib/libvsc/VSC_smf.vsc \
- $(top_srcdir)/lib/libvsc/VSC_vbe.vsc \
- $(top_srcdir)/lib/libvsc/VSC_lck.vsc
-
-include/counters.rst: $(top_srcdir)/lib/libvsc/vsctool.py $(COUNTERS)
- echo -n '' > ${@}_
- for i in $(COUNTERS); do \
- $(PYTHON) $(top_srcdir)/lib/libvsc/vsctool.py -r $$i >> ${@}_ ; \
- done
- mv -f ${@}_ ${@}
+include/counters.rst:
+ ln -s $(abs_top_builddir)/lib/libvsc/counters.rst $@
BUILT_SOURCES += include/counters.rst
include/varnishncsa_options.rst: $(top_builddir)/bin/varnishncsa/varnishncsa
diff --git a/lib/libvsc/Makefile.am b/lib/libvsc/Makefile.am
index 9f9ae0373..992b4d94c 100644
--- a/lib/libvsc/Makefile.am
+++ b/lib/libvsc/Makefile.am
@@ -22,3 +22,11 @@ libvsc_la_SOURCES = $(VSC_SRC)
BUILT_SOURCES = $(VSC_GEN)
dist_pkgdata_SCRIPTS = vsctool.py
+
+nodist_noinst_DATA = counters.rst
+
+counters.rst: $(VSC_RST)
+ $(AM_V_GEN)cat $(VSC_RST) >${@}_
+ @mv ${@}_ $@
+
+CLEANFILES = $(nodist_noinst_DATA)
More information about the varnish-commit
mailing list