diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2014-11-01 16:28:19 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2014-11-01 16:34:10 +0200 |
commit | fffbbfb089847644e2b0281faba2fa892df4f8b9 (patch) | |
tree | 83899ca03d92bdb4100c413904c83385ca0c7d6c /src/Makefile.am | |
parent | c16de06862f9b2106dcb7810fc20856689ef2aa6 (diff) | |
download | vmod-binlog-fffbbfb089847644e2b0281faba2fa892df4f8b9.tar.gz vmod-binlog-fffbbfb089847644e2b0281faba2fa892df4f8b9.tar.bz2 |
Support for VCL 4.0
* configure.ac: Version 1.0.91
Detect varnish version and set variables and conditionals accordingly.
* NEWS: Update.
* src/.gitignore: Update.
* src/Makefile.am: Always build vcc_if.c and vcc_if.h. Don't
distribute them.
* src/binlog.c: Use VCL data type. Define them for VCL 3.0.
(vmod_init): Fix premature memory deallocation.
* src/vmod.vcc: Rewrite in VCL 4.0 syntax.
* tests/atlocal.in (ret_vcl_recv): New variable.
* tests/test01.at (vcl_recv): Return $ret_vcl_recv.
* tests/test02.at: Likewise.
Diffstat (limited to 'src/Makefile.am')
-rw-r--r-- | src/Makefile.am | 37 |
1 files changed, 28 insertions, 9 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index a20f9cb..7917730 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,5 +1,5 @@ # This file is part of vmod-binlog -# Copyright (C) 2013 Sergey Poznyakoff +# Copyright (C) 2013-2014 Sergey Poznyakoff # # Vmod-binlog is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -14,7 +14,10 @@ # You should have received a copy of the GNU General Public License # along with vmod-binlog. If not, see <http://www.gnu.org/licenses/>. -AM_CPPFLAGS = -I$(VARNISHSRC)/include -I$(VARNISHSRC) +AM_CPPFLAGS =\ + -I$(VARNISHSRC)/include\ + -I$(VARNISHSRC)/bin/varnishd\ + -I$(VARNISHSRC) noinst_LIBRARIES = libbinlog.a libbinlog_a_SOURCES = pack.c err.c parse-datetime.y xalloc.c @@ -38,17 +41,33 @@ libvmod_binlog_la_LIBADD= libvmod_binlog_la_SOURCES = \ binlog.c\ pack.c\ - vmod-binlog.h\ - vcc_if.c vcc_if.h - + vmod-binlog.h +nodist_libvmod_binlog_la_SOURCES = vcc_if.c vcc_if.h noinst_HEADERS = pack.h err.h parse-datetime.h xalloc.h -BUILT_SOURCES = vcc_if.c vcc_if.h +binlog.lo: vcc_if.c vcc_if.h + +CLEANFILES = vcc_if.c vcc_if.h *.rst + +if VARNISH4 + vmodtool = $(VARNISHSRC)/lib/libvcc/vmodtool.py + vmodtoolargs = --strict + vccfile = $(top_srcdir)/src/vmod.vcc +else + vmodtool = $(VARNISHSRC)/lib/libvmod_std/vmod.py + vmodtoolargs = + vccfile = vmod.vcc3 + +vmod.vcc3: $(top_srcdir)/src/vmod.vcc + CLEANFILES += vmod.vcc3 +endif + +.vcc.vcc3: + sed -n '/^\$$/{s///;s/\(Module *[^ ][^ ]*\).*/\1/;p}' $< > $@ -vcc_if.c vcc_if.h: $(VARNISHSRC)/lib/libvmod_std/vmod.py $(top_srcdir)/src/vmod.vcc - @PYTHON@ $(VARNISHSRC)/lib/libvmod_std/vmod.py $(top_srcdir)/src/vmod.vcc +vcc_if.c vcc_if.h: $(vmodtool) $(vccfile) + @PYTHON@ $(vmodtool) $(vmodtoolargs) $(vccfile) EXTRA_DIST = vmod.vcc -CLEANFILES = $(builddir)/vcc_if.c $(builddir)/vcc_if.h |