Remove some code duplication for guessing IP addresses.
[oddments/ddns.git] / Makefile.am
1 ###############################################################################
2 # #
3 # Pakfire - The IPFire package management system #
4 # Copyright (C) 2013 Pakfire development team #
5 # #
6 # This program is free software: you can redistribute it and/or modify #
7 # it under the terms of the GNU General Public License as published by #
8 # the Free Software Foundation, either version 3 of the License, or #
9 # (at your option) any later version. #
10 # #
11 # This program is distributed in the hope that it will be useful, #
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of #
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
14 # GNU General Public License for more details. #
15 # #
16 # You should have received a copy of the GNU General Public License #
17 # along with this program. If not, see <http://www.gnu.org/licenses/>. #
18 # #
19 ###############################################################################
20
21 ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
22 AM_MAKEFLAGS = --no-print-directory
23 AUTOMAKE_OPTIONS = color-tests
24
25 # remove target it the command fails
26 .DELETE_ON_ERROR:
27
28 # keep itermediate files
29 .SECONDARY:
30
31 SUBDIRS = . po
32
33 pythondir = $(pyexecdir)
34
35 configsdir = $(sysconfdir)/ddns
36
37 CLEANFILES =
38 DISTCLEANFILES =
39 EXTRA_DIST =
40
41 @INTLTOOL_POLICY_RULE@
42
43 .PHONY: update-po
44 update-po:
45 $(MAKE) -C po update-po
46
47 # ------------------------------------------------------------------------------
48
49 dist_doc_DATA = \
50 COPYING
51
52 # ------------------------------------------------------------------------------
53
54 bin_SCRIPTS = \
55 ddns
56
57 EXTRA_DIST += \
58 ddns.in
59
60 CLEANFILES += \
61 ddns
62
63 dist_configs_DATA = \
64 ddns.conf
65
66 ddns_PYTHON = \
67 src/ddns/__init__.py \
68 src/ddns/__version__.py \
69 src/ddns/errors.py \
70 src/ddns/i18n.py \
71 src/ddns/providers.py \
72 src/ddns/system.py
73
74 ddnsdir = $(pythondir)/ddns
75
76 # ------------------------------------------------------------------------------
77
78 substitutions = \
79 '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
80 '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \
81 '|configsdir=$(configsdir)|'
82
83 SED_PROCESS = \
84 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
85 $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
86 < $< > $@
87
88 ddns: ddns.in Makefile
89 $(SED_PROCESS)