这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 20 additions & 5 deletions src/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
INCLUDES = -I$(VARNISHSRC)/include -I$(VARNISHSRC)
# if VARNISHSRC is defined on the command-line, use that. Otherwise, build
# this the same as the modules that come with varnish (i.e. we're building
# within the varnish src dir itself, and $(top_srcdir) is the varnish source).
#
ifdef $(VARNISHSRC):
SRC = $(VARNISHSRC)
DIR_PREFIX = /
else:
SRC = $(top_srcdir)
DIR_PREFIX = lib/libvmod-timers/

INCLUDES = -I$(SRC)/include -I$(SRC)

ifdef $(VMODDIR):
vmoddir = $(VMODDIR)
else:
vmoddir = $(pkglibdir)/vmods

vmoddir = $(VMODDIR)
vmod_LTLIBRARIES = libvmod_statsd.la

libvmod_statsd_la_LDFLAGS = -module -export-dynamic -avoid-version
Expand All @@ -10,14 +25,14 @@ libvmod_statsd_la_SOURCES = \
vcc_if.h \
vmod_statsd.c

vcc_if.c vcc_if.h: $(VARNISHSRC)/lib/libvmod_std/vmod.py $(top_srcdir)/src/vmod_statsd.vcc
@PYTHON@ $(VARNISHSRC)/lib/libvmod_std/vmod.py $(top_srcdir)/src/vmod_statsd.vcc
vcc_if.c vcc_if.h: $(SRC)/lib/libvmod_std/vmod.py $(top_srcdir)/$(DIR_PREFIX)src/vmod_statsd.vcc
@PYTHON@ $(SRC)/lib/libvmod_std/vmod.py $(top_srcdir)/$(DIR_PREFIX)src/vmod_statsd.vcc

VMOD_TESTS = tests/*.vtc
.PHONY: $(VMOD_TESTS)

tests/*.vtc:
$(VARNISHSRC)/bin/varnishtest/varnishtest -Dvarnishd=$(VARNISHSRC)/bin/varnishd/varnishd -Dvmod_topbuild=$(abs_top_builddir) $@
$(SRC)/bin/varnishtest/varnishtest -Dvarnishd=$(top_srcdir)/bin/varnishd/varnishd -Dvmod_topbuild=$(abs_top_builddir) $@

check: $(VMOD_TESTS)

Expand Down