
This makes it easier to package ddclient, especially as enhancements are made such as unit tests or a man page. I chose GNU Autoconf and Automake mostly because I'm familiar with them, but also because I know they are well supported. Unfortunately they can be difficult to understand/maintain (especially Autoconf), so we may want to convert to something else later. Addresses #146, #147
58 lines
1.5 KiB
Makefile
58 lines
1.5 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
|