Commit e429b8f0 authored by Dag Haavi Finstad's avatar Dag Haavi Finstad

Merge pull request #20 from nigoroll/master

better error handling, fixes for parallel make, remove generated files from dist
parents 24f4ce91 b1865358
......@@ -35,10 +35,17 @@ else
esac
fi
set -ex
# check for varnishapi.m4 in custom paths
dataroot=$(pkg-config --variable=datarootdir varnishapi)
dataroot=$(pkg-config --variable=datarootdir varnishapi 2>/dev/null)
if [ -z "$dataroot" ] ; then
cat >&2 <<'EOF'
Package varnishapi was not found in the pkg-config search path.
Perhaps you should add the directory containing `varnishapi.pc'
to the PKG_CONFIG_PATH environment variable
EOF
exit 1
fi
set -ex
aclocal -I m4 -I ${dataroot}/aclocal
$LIBTOOLIZE --copy --force
autoheader
......
......@@ -6,17 +6,23 @@ vmod_LTLIBRARIES = libvmod_example.la
libvmod_example_la_LDFLAGS = -module -export-dynamic -avoid-version -shared
libvmod_example_la_SOURCES = \
vcc_if.c \
vcc_if.h \
vmod_example.c
vcc_if.c vcc_if.h: @VMODTOOL@ $(top_srcdir)/src/vmod_example.vcc
nodist_libvmod_example_la_SOURCES = \
vcc_if.c \
vcc_if.h
vmod_example.lo: vcc_if.c vcc_if.h
vcc_if.c: vcc_if.h
vcc_if.h: @VMODTOOL@ $(top_srcdir)/src/vmod_example.vcc
@VMODTOOL@ $(top_srcdir)/src/vmod_example.vcc
VMOD_TESTS = $(top_srcdir)/src/tests/*.vtc
.PHONY: $(VMOD_TESTS)
$(top_srcdir)/src/tests/*.vtc:
$(top_srcdir)/src/tests/*.vtc: libvmod_example.la
@VARNISHTEST@ -Dvarnishd=@VARNISHD@ -Dvmod_topbuild=$(abs_top_builddir) $@
check: $(VMOD_TESTS)
......@@ -25,4 +31,8 @@ EXTRA_DIST = \
vmod_example.vcc \
$(VMOD_TESTS)
CLEANFILES = $(builddir)/vcc_if.c $(builddir)/vcc_if.h
CLEANFILES = \
$(builddir)/vcc_if.c \
$(builddir)/vcc_if.h \
$(builddir)/vmod_example.rst \
$(builddir)/vmod_example.man.rst
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment