Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
6bf7a9ed
Commit
6bf7a9ed
authored
Sep 11, 2017
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
De-boilerplate the "normal" vmods in the tree.
There are undoubtedly better ways, but I couldn't find them...
parent
7f7be284
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
270 additions
and
225 deletions
+270
-225
vmodtool.py
lib/libvcc/vmodtool.py
+55
-0
Makefile.am
lib/libvmod_blob/Makefile.am
+2
-45
automake_boilerplate.am
lib/libvmod_blob/automake_boilerplate.am
+41
-0
Makefile.am
lib/libvmod_directors/Makefile.am
+2
-45
automake_boilerplate.am
lib/libvmod_directors/automake_boilerplate.am
+41
-0
Makefile.am
lib/libvmod_purge/Makefile.am
+2
-45
automake_boilerplate.am
lib/libvmod_purge/automake_boilerplate.am
+41
-0
Makefile.am
lib/libvmod_std/Makefile.am
+2
-45
automake_boilerplate.am
lib/libvmod_std/automake_boilerplate.am
+41
-0
Makefile.am
lib/libvmod_vtc/Makefile.am
+2
-45
automake_boilerplate.am
lib/libvmod_vtc/automake_boilerplate.am
+41
-0
No files found.
lib/libvcc/vmodtool.py
View file @
6bf7a9ed
...
...
@@ -46,6 +46,49 @@ import random
rstfmt
=
False
strict_abi
=
True
AMBOILERPLATE
=
'''
# Boilerplate generated by vmodtool.py - changes will be overwritten
AM_LDFLAGS = $(AM_LT_LDFLAGS)
AM_CPPFLAGS =
\\
-I$(top_srcdir)/include
\\
-I$(top_srcdir)/bin/varnishd
\\
-I$(top_builddir)/include
vmoddir = $(pkglibdir)/vmods
vmodtool = $(top_srcdir)/lib/libvcc/vmodtool.py
vmodtoolargs = --strict --boilerplate
vmod_LTLIBRARIES = libvmod_XXX.la
libvmod_XXX_la_CFLAGS =
\\
@SAN_CFLAGS@
libvmod_XXX_la_LDFLAGS =
\\
$(AM_LDFLAGS)
\\
$(VMOD_LDFLAGS)
\\
@SAN_LDFLAGS@
nodist_libvmod_XXX_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_XXX_la_OBJECTS): vcc_if.h
vcc_if.h vmod_XXX.rst vmod_XXX.man.rst: vcc_if.c
vcc_if.c: $(vmodtool) $(srcdir)/vmod.vcc
@PYTHON@ $(vmodtool) $(vmodtoolargs) $(srcdir)/vmod.vcc
EXTRA_DIST = vmod.vcc automake_boilerplate.am
CLEANFILES = $(builddir)/vcc_if.c $(builddir)/vcc_if.h
\\
$(builddir)/vmod_XXX.rst
\\
$(builddir)/vmod_XXX.man.rst
'''
ctypes
=
{
'ACL'
:
"VCL_ACL"
,
'BACKEND'
:
"VCL_BACKEND"
,
...
...
@@ -701,6 +744,13 @@ class vcc(object):
fo
.
close
()
def
amboilerplate
(
self
):
fn
=
"automake_boilerplate.am"
self
.
commit_files
.
append
(
fn
)
fo
=
open
(
fn
+
".tmp"
,
"w"
)
fo
.
write
(
AMBOILERPLATE
.
replace
(
"XXX"
,
self
.
modname
))
fo
.
close
()
def
hfile
(
self
):
fn
=
self
.
pfx
+
".h"
self
.
commit_files
.
append
(
fn
)
...
...
@@ -831,6 +881,8 @@ def runmain(inputvcc, rstdir, outputprefix):
v
.
rstfile
(
man
=
True
)
v
.
hfile
()
v
.
cfile
()
if
opts
.
boilerplate
:
v
.
amboilerplate
()
v
.
commit
()
...
...
@@ -838,6 +890,9 @@ if __name__ == "__main__":
usagetext
=
"Usage:
%
prog [options] <vmod.vcc>"
oparser
=
optparse
.
OptionParser
(
usage
=
usagetext
)
oparser
.
add_option
(
'-b'
,
'--boilerplate'
,
action
=
'store_true'
,
default
=
False
,
help
=
"Be strict when parsing the input file"
)
oparser
.
add_option
(
'-N'
,
'--strict'
,
action
=
'store_true'
,
default
=
False
,
help
=
"Be strict when parsing the input file"
)
oparser
.
add_option
(
'-o'
,
'--output'
,
metavar
=
"prefix"
,
default
=
'vcc_if'
,
...
...
lib/libvmod_blob/Makefile.am
View file @
6bf7a9ed
...
...
@@ -16,48 +16,5 @@ libvmod_blob_la_SOURCES = \
base64.o
:
base64.c base64.h
# 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_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
\
-rpath
/nowhere
\
@SAN_LDFLAGS@
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
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
EXTRA_DIST
=
vmod.vcc
CLEANFILES
=
$(builddir)
/vcc_if.c
$(builddir)
/vcc_if.h
\
$(builddir)
/vmod_blob.rst
\
$(builddir)
/vmod_blob.man.rst
# Use vmodtool.py generated automake boilerplate
include
$(srcdir)/automake_boilerplate.am
lib/libvmod_blob/automake_boilerplate.am
0 → 100644
View file @
6bf7a9ed
# Boilerplate generated by vmodtool.py - changes will be overwritten
AM_LDFLAGS = $(AM_LT_LDFLAGS)
AM_CPPFLAGS = \
-I$(top_srcdir)/include \
-I$(top_srcdir)/bin/varnishd \
-I$(top_builddir)/include
vmoddir = $(pkglibdir)/vmods
vmodtool = $(top_srcdir)/lib/libvcc/vmodtool.py
vmodtoolargs = --strict --boilerplate
vmod_LTLIBRARIES = libvmod_blob.la
libvmod_blob_la_CFLAGS = \
@SAN_CFLAGS@
libvmod_blob_la_LDFLAGS = \
$(AM_LDFLAGS) \
$(VMOD_LDFLAGS) \
@SAN_LDFLAGS@
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
vcc_if.h vmod_blob.rst vmod_blob.man.rst: vcc_if.c
vcc_if.c: $(vmodtool) $(srcdir)/vmod.vcc
@PYTHON@ $(vmodtool) $(vmodtoolargs) $(srcdir)/vmod.vcc
EXTRA_DIST = vmod.vcc automake_boilerplate.am
CLEANFILES = $(builddir)/vcc_if.c $(builddir)/vcc_if.h \
$(builddir)/vmod_blob.rst \
$(builddir)/vmod_blob.man.rst
lib/libvmod_directors/Makefile.am
View file @
6bf7a9ed
...
...
@@ -17,48 +17,5 @@ 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
\
-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
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
\
$(builddir)
/vmod_directors.rst
\
$(builddir)
/vmod_directors.man.rst
# Use vmodtool.py generated automake boilerplate
include
$(srcdir)/automake_boilerplate.am
lib/libvmod_directors/automake_boilerplate.am
0 → 100644
View file @
6bf7a9ed
# Boilerplate generated by vmodtool.py - changes will be overwritten
AM_LDFLAGS = $(AM_LT_LDFLAGS)
AM_CPPFLAGS = \
-I$(top_srcdir)/include \
-I$(top_srcdir)/bin/varnishd \
-I$(top_builddir)/include
vmoddir = $(pkglibdir)/vmods
vmodtool = $(top_srcdir)/lib/libvcc/vmodtool.py
vmodtoolargs = --strict --boilerplate
vmod_LTLIBRARIES = libvmod_directors.la
libvmod_directors_la_CFLAGS = \
@SAN_CFLAGS@
libvmod_directors_la_LDFLAGS = \
$(AM_LDFLAGS) \
$(VMOD_LDFLAGS) \
@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
vcc_if.h vmod_directors.rst vmod_directors.man.rst: vcc_if.c
vcc_if.c: $(vmodtool) $(srcdir)/vmod.vcc
@PYTHON@ $(vmodtool) $(vmodtoolargs) $(srcdir)/vmod.vcc
EXTRA_DIST = vmod.vcc automake_boilerplate.am
CLEANFILES = $(builddir)/vcc_if.c $(builddir)/vcc_if.h \
$(builddir)/vmod_directors.rst \
$(builddir)/vmod_directors.man.rst
lib/libvmod_purge/Makefile.am
View file @
6bf7a9ed
...
...
@@ -3,48 +3,5 @@
libvmod_purge_la_SOURCES
=
\
vmod_purge.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_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
\
-rpath
/nowhere
\
@SAN_LDFLAGS@
nodist_libvmod_purge_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_purge_la_OBJECTS)
:
vcc_if.h
vcc_if.h vmod_purge.rst vmod_purge.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
\
$(builddir)
/vmod_purge.rst
\
$(builddir)
/vmod_purge.man.rst
# Use vmodtool.py generated automake boilerplate
include
$(srcdir)/automake_boilerplate.am
lib/libvmod_purge/automake_boilerplate.am
0 → 100644
View file @
6bf7a9ed
# Boilerplate generated by vmodtool.py - changes will be overwritten
AM_LDFLAGS = $(AM_LT_LDFLAGS)
AM_CPPFLAGS = \
-I$(top_srcdir)/include \
-I$(top_srcdir)/bin/varnishd \
-I$(top_builddir)/include
vmoddir = $(pkglibdir)/vmods
vmodtool = $(top_srcdir)/lib/libvcc/vmodtool.py
vmodtoolargs = --strict --boilerplate
vmod_LTLIBRARIES = libvmod_purge.la
libvmod_purge_la_CFLAGS = \
@SAN_CFLAGS@
libvmod_purge_la_LDFLAGS = \
$(AM_LDFLAGS) \
$(VMOD_LDFLAGS) \
@SAN_LDFLAGS@
nodist_libvmod_purge_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_purge_la_OBJECTS): vcc_if.h
vcc_if.h vmod_purge.rst vmod_purge.man.rst: vcc_if.c
vcc_if.c: $(vmodtool) $(srcdir)/vmod.vcc
@PYTHON@ $(vmodtool) $(vmodtoolargs) $(srcdir)/vmod.vcc
EXTRA_DIST = vmod.vcc automake_boilerplate.am
CLEANFILES = $(builddir)/vcc_if.c $(builddir)/vcc_if.h \
$(builddir)/vmod_purge.rst \
$(builddir)/vmod_purge.man.rst
lib/libvmod_std/Makefile.am
View file @
6bf7a9ed
...
...
@@ -6,48 +6,5 @@ libvmod_std_la_SOURCES = \
vmod_std_fileread.c
\
vmod_std_querysort.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_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
\
-rpath
/nowhere
\
@SAN_LDFLAGS@
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
$(libvmod_std_la_OBJECTS)
:
vcc_if.h
vcc_if.h vmod_std.rst vmod_std.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
\
$(builddir)
/vmod_std.rst
\
$(builddir)
/vmod_std.man.rst
# Use vmodtool.py generated automake boilerplate
include
$(srcdir)/automake_boilerplate.am
lib/libvmod_std/automake_boilerplate.am
0 → 100644
View file @
6bf7a9ed
# Boilerplate generated by vmodtool.py - changes will be overwritten
AM_LDFLAGS = $(AM_LT_LDFLAGS)
AM_CPPFLAGS = \
-I$(top_srcdir)/include \
-I$(top_srcdir)/bin/varnishd \
-I$(top_builddir)/include
vmoddir = $(pkglibdir)/vmods
vmodtool = $(top_srcdir)/lib/libvcc/vmodtool.py
vmodtoolargs = --strict --boilerplate
vmod_LTLIBRARIES = libvmod_std.la
libvmod_std_la_CFLAGS = \
@SAN_CFLAGS@
libvmod_std_la_LDFLAGS = \
$(AM_LDFLAGS) \
$(VMOD_LDFLAGS) \
@SAN_LDFLAGS@
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
$(libvmod_std_la_OBJECTS): vcc_if.h
vcc_if.h vmod_std.rst vmod_std.man.rst: vcc_if.c
vcc_if.c: $(vmodtool) $(srcdir)/vmod.vcc
@PYTHON@ $(vmodtool) $(vmodtoolargs) $(srcdir)/vmod.vcc
EXTRA_DIST = vmod.vcc automake_boilerplate.am
CLEANFILES = $(builddir)/vcc_if.c $(builddir)/vcc_if.h \
$(builddir)/vmod_std.rst \
$(builddir)/vmod_std.man.rst
lib/libvmod_vtc/Makefile.am
View file @
6bf7a9ed
...
...
@@ -3,48 +3,5 @@
libvmod_vtc_la_SOURCES
=
\
vmod_vtc.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_vtc
vmodtool
=
$(top_srcdir)
/lib/libvcc/vmodtool.py
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
\
@SAN_LDFLAGS@
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
vcc_if.h vmod_vtc.rst vmod_vtc.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
\
$(builddir)
/vmod_vtc.rst
\
$(builddir)
/vmod_vtc.man.rst
# Use vmodtool.py generated automake boilerplate
include
$(srcdir)/automake_boilerplate.am
lib/libvmod_vtc/automake_boilerplate.am
0 → 100644
View file @
6bf7a9ed
# Boilerplate generated by vmodtool.py - changes will be overwritten
AM_LDFLAGS = $(AM_LT_LDFLAGS)
AM_CPPFLAGS = \
-I$(top_srcdir)/include \
-I$(top_srcdir)/bin/varnishd \
-I$(top_builddir)/include
vmoddir = $(pkglibdir)/vmods
vmodtool = $(top_srcdir)/lib/libvcc/vmodtool.py
vmodtoolargs = --strict --boilerplate
vmod_LTLIBRARIES = libvmod_vtc.la
libvmod_vtc_la_CFLAGS = \
@SAN_CFLAGS@
libvmod_vtc_la_LDFLAGS = \
$(AM_LDFLAGS) \
$(VMOD_LDFLAGS) \
@SAN_LDFLAGS@
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
vcc_if.h vmod_vtc.rst vmod_vtc.man.rst: vcc_if.c
vcc_if.c: $(vmodtool) $(srcdir)/vmod.vcc
@PYTHON@ $(vmodtool) $(vmodtoolargs) $(srcdir)/vmod.vcc
EXTRA_DIST = vmod.vcc automake_boilerplate.am
CLEANFILES = $(builddir)/vcc_if.c $(builddir)/vcc_if.h \
$(builddir)/vmod_vtc.rst \
$(builddir)/vmod_vtc.man.rst
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment