[master] 90757fc Clean up and systematize our blessed vmod's Makefile.am

Poul-Henning Kamp phk at FreeBSD.org
Mon Sep 11 07:46:05 UTC 2017


commit 90757fc3aef6a08b2211804284f62f389c1bb862
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Mon Sep 11 07:39:39 2017 +0000

    Clean up and systematize our blessed vmod's Makefile.am

diff --git a/lib/libvmod_blob/Makefile.am b/lib/libvmod_blob/Makefile.am
index b0de15f..bb7b363 100644
--- a/lib/libvmod_blob/Makefile.am
+++ b/lib/libvmod_blob/Makefile.am
@@ -1,4 +1,23 @@
 #
+
+libvmod_blob_la_SOURCES = \
+	vmod_blob.c \
+	vmod_blob.h \
+	id.c \
+	base64.h \
+	base64.c \
+	hex.h \
+	hex.c \
+	url.c \
+	wb.h \
+	wb.c \
+	parse_encoding.h \
+	parse_encoding.c
+
+base64.o: base64.c base64.h
+
+# Boilerplate, do not change
+
 AM_LDFLAGS  = $(AM_LT_LDFLAGS)
 
 AM_CPPFLAGS = \
@@ -10,42 +29,34 @@ vmoddir = $(pkglibdir)/vmods
 vmod_srcdir = $(top_srcdir)/lib/libvmod_blob
 vmodtool = $(top_srcdir)/lib/libvcc/vmodtool.py
 vmodtoolargs = --strict
+
 vmod_LTLIBRARIES = libvmod_blob.la
 
 libvmod_blob_la_CFLAGS = \
 	@SAN_CFLAGS@
 
-libvmod_blob_la_LDFLAGS = $(AM_LDFLAGS) -module -export-dynamic -avoid-version -shared \
+libvmod_blob_la_LDFLAGS = \
+	$(AM_LDFLAGS) \
+	-module \
+	-export-dynamic \
+	-avoid-version \
+	-shared \
+	-export-symbols-regex '^Vmod_std_Data' \
+	-rpath /nowhere \
 	@SAN_LDFLAGS@
 
-libvmod_blob_la_SOURCES = \
-	vmod_blob.c \
-	vmod_blob.h \
-	id.c \
-	base64.h \
-	base64.c \
-	hex.h \
-	hex.c \
-	url.c \
-	wb.h \
-	wb.c \
-	parse_encoding.h \
-	parse_encoding.c
-
 nodist_libvmod_blob_la_SOURCES = \
 	vcc_if.c \
 	vcc_if.h
 
 # BUILT_SOURCES is only a hack and dependency tracking does not help for the first build
-$(libvmod_blob_la_OBJECTS):vcc_if.h
+$(libvmod_blob_la_OBJECTS): vcc_if.h
 
 vcc_if.h vmod_blob.rst vmod_blob.man.rst: vcc_if.c
 
 vcc_if.c: $(vmodtool) $(vmod_srcdir)/vmod.vcc
 	@PYTHON@ $(vmodtool) $(vmodtoolargs) $(vmod_srcdir)/vmod.vcc
 
-base64.o: base64.c base64.h
-
 EXTRA_DIST = vmod.vcc
 
 CLEANFILES = $(builddir)/vcc_if.c $(builddir)/vcc_if.h \
diff --git a/lib/libvmod_debug/Makefile.am b/lib/libvmod_debug/Makefile.am
index 4376ef5..58bd825 100644
--- a/lib/libvmod_debug/Makefile.am
+++ b/lib/libvmod_debug/Makefile.am
@@ -1,4 +1,12 @@
 #
+
+libvmod_debug_la_SOURCES = \
+	vmod_debug.c \
+	vmod_debug_obj.c \
+	vmod_debug_dyn.c
+
+# Boilerplate, do not change
+
 AM_LDFLAGS  = $(AM_LT_LDFLAGS)
 
 AM_CPPFLAGS = \
@@ -9,27 +17,30 @@ AM_CPPFLAGS = \
 vmoddir = $(pkglibdir)/vmods
 vmod_srcdir = $(top_srcdir)/lib/libvmod_debug
 vmodtool = $(top_srcdir)/lib/libvcc/vmodtool.py
-vmodtoolargs =
+vmodtoolargs = --strict
+
 
 noinst_LTLIBRARIES = libvmod_debug.la
 
 libvmod_debug_la_CFLAGS = \
 	@SAN_CFLAGS@
 
-libvmod_debug_la_LDFLAGS = $(AM_LDFLAGS) -module -export-dynamic -avoid-version -shared -rpath /nowhere \
+libvmod_debug_la_LDFLAGS = \
+	$(AM_LDFLAGS) \
+	-module \
+	-export-dynamic \
+	-avoid-version \
+	-shared \
+	-export-symbols-regex '^Vmod_std_Data' \
+	-rpath /nowhere \
 	@SAN_LDFLAGS@
 
-libvmod_debug_la_SOURCES = \
-	vmod_debug.c \
-	vmod_debug_obj.c \
-	vmod_debug_dyn.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
-$(libvmod_debug_la_OBJECTS):vcc_if.h
+$(libvmod_debug_la_OBJECTS): vcc_if.h
 
 vcc_if.h vmod_debug.rst vmod_debug.man.rst: vcc_if.c
 
diff --git a/lib/libvmod_debug/vmod.vcc b/lib/libvmod_debug/vmod.vcc
index 324d389..2ed8a9e 100644
--- a/lib/libvmod_debug/vmod.vcc
+++ b/lib/libvmod_debug/vmod.vcc
@@ -37,8 +37,6 @@ of VMOD handling in Varnish.
 
 $Event event_function
 
-You are not supposed to be able to see this text in the .RST
-
 $Function VOID panic(STRING_LIST)
 
 Don't.
diff --git a/lib/libvmod_directors/Makefile.am b/lib/libvmod_directors/Makefile.am
index dfcbbee..23bcf94 100644
--- a/lib/libvmod_directors/Makefile.am
+++ b/lib/libvmod_directors/Makefile.am
@@ -1,22 +1,4 @@
 #
-AM_LDFLAGS  = $(AM_LT_LDFLAGS)
-
-AM_CPPFLAGS = \
-	-I$(top_srcdir)/include \
-	-I$(top_srcdir)/bin/varnishd \
-	-I$(top_builddir)/include
-
-vmoddir = $(pkglibdir)/vmods
-vmod_srcdir = $(top_srcdir)/lib/libvmod_directors
-vmodtool = $(top_srcdir)/lib/libvcc/vmodtool.py
-vmodtoolargs = --strict
-vmod_LTLIBRARIES = libvmod_directors.la
-
-libvmod_directors_la_CFLAGS = \
-	@SAN_CFLAGS@
-
-libvmod_directors_la_LDFLAGS = $(AM_LDFLAGS) -module -export-dynamic -avoid-version -shared \
-	@SAN_LDFLAGS@
 
 libvmod_directors_la_SOURCES = \
 	vdir.c \
@@ -35,19 +17,47 @@ libvmod_directors_la_SOURCES = \
 	shard_parse_vcc_enums.h \
 	shard_parse_vcc_enums.c
 
+# Boilerplate, do not change
+
+AM_LDFLAGS  = $(AM_LT_LDFLAGS)
+
+AM_CPPFLAGS = \
+	-I$(top_srcdir)/include \
+	-I$(top_srcdir)/bin/varnishd \
+	-I$(top_builddir)/include
+
+vmoddir = $(pkglibdir)/vmods
+vmod_srcdir = $(top_srcdir)/lib/libvmod_directors
+vmodtool = $(top_srcdir)/lib/libvcc/vmodtool.py
+vmodtoolargs = --strict
+
+vmod_LTLIBRARIES = libvmod_directors.la
+
+libvmod_directors_la_CFLAGS = \
+	@SAN_CFLAGS@
+
+libvmod_directors_la_LDFLAGS = \
+	$(AM_LDFLAGS) \
+	-module \
+	-export-dynamic \
+	-avoid-version \
+	-shared \
+	-export-symbols-regex '^Vmod_std_Data' \
+	-rpath /nowhere \
+	@SAN_LDFLAGS@
+
 nodist_libvmod_directors_la_SOURCES = \
 	vcc_if.c \
 	vcc_if.h
 
 # BUILT_SOURCES is only a hack and dependency tracking does not help for the first build
-$(libvmod_directors_la_OBJECTS):vcc_if.h
+$(libvmod_directors_la_OBJECTS): vcc_if.h
 
 vcc_if.h vmod_directors.rst vmod_directors.man.rst: vcc_if.c
 
 vcc_if.c: $(vmodtool) $(vmod_srcdir)/vmod.vcc
 	@PYTHON@ $(vmodtool) $(vmodtoolargs) $(vmod_srcdir)/vmod.vcc
 
-
 EXTRA_DIST = vmod.vcc
 
 CLEANFILES = $(builddir)/vcc_if.c $(builddir)/vcc_if.h \
diff --git a/lib/libvmod_purge/Makefile.am b/lib/libvmod_purge/Makefile.am
index 4a1098b..44a69cb 100644
--- a/lib/libvmod_purge/Makefile.am
+++ b/lib/libvmod_purge/Makefile.am
@@ -1,5 +1,10 @@
 #
 
+libvmod_purge_la_SOURCES = \
+	vmod_purge.c
+
+# Boilerplate, do not change
+
 AM_LDFLAGS  = $(AM_LT_LDFLAGS)
 
 AM_CPPFLAGS = \
@@ -11,16 +16,22 @@ vmoddir = $(pkglibdir)/vmods
 vmod_srcdir = $(top_srcdir)/lib/libvmod_purge
 vmodtool = $(top_srcdir)/lib/libvcc/vmodtool.py
 vmodtoolargs = --strict
+
 vmod_LTLIBRARIES = libvmod_purge.la
 
 libvmod_purge_la_CFLAGS = \
 	@SAN_CFLAGS@
 
-libvmod_purge_la_LDFLAGS = $(AM_LDFLAGS) -module -export-dynamic -avoid-version -shared \
+libvmod_purge_la_LDFLAGS = \
+	$(AM_LDFLAGS) \
+	-module \
+	-export-dynamic \
+	-avoid-version \
+	-shared \
+	-export-symbols-regex '^Vmod_std_Data' \
+	-rpath /nowhere \
 	@SAN_LDFLAGS@
 
-libvmod_purge_la_SOURCES = vmod_purge.c
-
 nodist_libvmod_purge_la_SOURCES = \
 	vcc_if.c \
 	vcc_if.h
diff --git a/lib/libvmod_std/Makefile.am b/lib/libvmod_std/Makefile.am
index ec9580c..2ddf28b 100644
--- a/lib/libvmod_std/Makefile.am
+++ b/lib/libvmod_std/Makefile.am
@@ -1,5 +1,13 @@
 #
 
+libvmod_std_la_SOURCES = \
+	vmod_std.c \
+	vmod_std_conversions.c \
+	vmod_std_fileread.c \
+	vmod_std_querysort.c
+
+# Boilerplate, do not change
+
 AM_LDFLAGS  = $(AM_LT_LDFLAGS)
 
 AM_CPPFLAGS = \
@@ -11,20 +19,22 @@ vmoddir = $(pkglibdir)/vmods
 vmod_srcdir = $(top_srcdir)/lib/libvmod_std
 vmodtool = $(top_srcdir)/lib/libvcc/vmodtool.py
 vmodtoolargs = --strict
+
 vmod_LTLIBRARIES = libvmod_std.la
 
 libvmod_std_la_CFLAGS = \
 	@SAN_CFLAGS@
 
-libvmod_std_la_LDFLAGS = $(AM_LDFLAGS) -module -export-dynamic -avoid-version -shared \
+libvmod_std_la_LDFLAGS = \
+	$(AM_LDFLAGS) \
+	-module \
+	-export-dynamic \
+	-avoid-version \
+	-shared \
+	-export-symbols-regex '^Vmod_std_Data' \
+	-rpath /nowhere \
 	@SAN_LDFLAGS@
 
-libvmod_std_la_SOURCES = \
-	vmod_std.c \
-	vmod_std_conversions.c \
-	vmod_std_fileread.c \
-	vmod_std_querysort.c
-
 nodist_libvmod_std_la_SOURCES = \
 	vcc_if.c \
 	vcc_if.h
diff --git a/lib/libvmod_vtc/Makefile.am b/lib/libvmod_vtc/Makefile.am
index 98baa91..fbf1d0d 100644
--- a/lib/libvmod_vtc/Makefile.am
+++ b/lib/libvmod_vtc/Makefile.am
@@ -1,4 +1,10 @@
 #
+
+libvmod_vtc_la_SOURCES = \
+	vmod_vtc.c
+
+# Boilerplate, do not change
+
 AM_LDFLAGS  = $(AM_LT_LDFLAGS)
 
 AM_CPPFLAGS = \
@@ -9,25 +15,29 @@ AM_CPPFLAGS = \
 vmoddir = $(pkglibdir)/vmods
 vmod_srcdir = $(top_srcdir)/lib/libvmod_vtc
 vmodtool = $(top_srcdir)/lib/libvcc/vmodtool.py
-vmodtoolargs =
+vmodtoolargs = --strict
 
 vmod_LTLIBRARIES = libvmod_vtc.la
 
 libvmod_vtc_la_CFLAGS = \
 	@SAN_CFLAGS@
 
-libvmod_vtc_la_LDFLAGS = $(AM_LDFLAGS) -module -export-dynamic -avoid-version -shared -rpath /nowhere \
+libvmod_vtc_la_LDFLAGS = \
+	$(AM_LDFLAGS) \
+	-module \
+	-export-dynamic \
+	-avoid-version \
+	-shared \
+	-export-symbols-regex '^Vmod_std_Data' \
+	-rpath /nowhere \
 	@SAN_LDFLAGS@
 
-libvmod_vtc_la_SOURCES = \
-	vmod_vtc.c
-
 nodist_libvmod_vtc_la_SOURCES = \
 	vcc_if.c \
 	vcc_if.h
 
 # BUILT_SOURCES is only a hack and dependency tracking does not help for the first build
-$(libvmod_vtc_la_OBJECTS):vcc_if.h
+$(libvmod_vtc_la_OBJECTS): vcc_if.h
 
 vcc_if.h vmod_vtc.rst vmod_vtc.man.rst: vcc_if.c
 


More information about the varnish-commit mailing list