ddclient/Makefile.am
Richard Hansen c390e75769 Add unit test infrastructure.
Now all that is needed to add a new unit test is to create a `t/*.pl`
file and list it in the `handwritten_tests` variable.

To run the test suite, run:

    ./autogen && ./configure && make check

Fixes #147
2020-06-29 11:08:32 -04:00

72 lines
1.9 KiB
Makefile

ACLOCAL_AMFLAGS = -I m4
EXTRA_DIST = \
CONTRIBUTING.md \
COPYING \
COPYRIGHT \
ChangeLog.md \
README.cisco \
README.md \
README.ssl \
TODO \
UPGRADE \
autogen \
sample-ddclient-wrapper.sh \
sample-etc_cron.d_ddclient \
sample-etc_dhclient-exit-hooks \
sample-etc_dhcpc_dhcpcd-eth0.exe \
sample-etc_ppp_ip-up.local \
sample-etc_rc.d_init.d_ddclient \
sample-etc_rc.d_init.d_ddclient.alpine \
sample-etc_rc.d_init.d_ddclient.lsb \
sample-etc_rc.d_init.d_ddclient.redhat \
sample-etc_rc.d_init.d_ddclient.ubuntu \
sample-etc_systemd.service \
sample-get-ip-from-fritzbox
CLEANFILES =
# Command that replaces substitution variables with their values.
subst = sed \
-e 's|@PACKAGE_VERSION[@]|$(PACKAGE_VERSION)|g' \
-e 's|@PERL[@]|$(PERL)|g' \
-e 's|@localstatedir[@]|$(localstatedir)|g' \
-e 's|@runstatedir[@]|$(runstatedir)|g' \
-e 's|@sysconfdir[@]|$(sysconfdir)|g'
# Files that will be generated by passing their *.template file
# through $(subst).
subst_files = ddclient ddclient.conf
EXTRA_DIST += $(subst_files:=.template)
CLEANFILES += $(subst_files)
$(subst_files): Makefile
rm -f '$@' '$@'.tmp
in='$@'.template; \
test -f "$${in}" || in='$(srcdir)/'$${in}; \
$(subst) "$${in}" >'$@'.tmp && \
{ ! test -x "$${in}" || chmod +x '$@'.tmp; }
mv '$@'.tmp '$@'
ddclient: $(srcdir)/ddclient.template
ddclient.conf: $(srcdir)/ddclient.conf.template
bin_SCRIPTS = ddclient
sysconf_DATA = ddclient.conf
install-data-local:
$(MKDIR_P) '$(DESTDIR)$(localstatedir)'/cache/ddclient
LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) \
$(top_srcdir)/build-aux/tap-driver.sh
TEST_EXTENSIONS = .pl
PL_LOG_DRIVER = $(LOG_DRIVER)
PL_LOG_COMPILER = $(PERL)
AM_PL_LOG_FLAGS = -Mstrict -w \
-I'$(abs_top_builddir)' \
-I'$(abs_top_srcdir)'/t/lib
handwritten_tests =
generated_tests = \
t/version.pl
TESTS = $(handwritten_tests) $(generated_tests)
EXTRA_DIST += $(handwritten_tests)