Bump version to 006
[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 noinst_DATA =
41
42 @INTLTOOL_POLICY_RULE@
43
44 .PHONY: update-po
45 update-po:
46         $(MAKE) -C po update-po
47
48 # ------------------------------------------------------------------------------
49
50 AM_V_XSLT   = $(AM_V_XSLT_$(V))
51 AM_V_XSLT_  = $(AM_V_XSLT_$(AM_DEFAULT_VERBOSITY))
52 AM_V_XSLT_0 = @echo "  XSLT    " $@;
53
54 # ------------------------------------------------------------------------------
55
56 dist_doc_DATA = \
57         COPYING
58
59 # ------------------------------------------------------------------------------
60
61 bin_SCRIPTS = \
62         ddns
63
64 EXTRA_DIST += \
65         ddns.in
66
67 CLEANFILES += \
68         ddns
69
70 dist_configs_DATA = \
71         ddns.conf.sample
72
73 ddns_PYTHON = \
74         src/ddns/__init__.py \
75         src/ddns/__version__.py \
76         src/ddns/database.py \
77         src/ddns/errors.py \
78         src/ddns/i18n.py \
79         src/ddns/providers.py \
80         src/ddns/system.py
81
82 ddnsdir = $(pythondir)/ddns
83
84 # ------------------------------------------------------------------------------
85
86 if ENABLE_MANPAGES
87 MANPAGES = \
88         man/ddns.1 \
89         man/ddns.conf.5
90
91 MANPAGES_XML  = $(patsubst %.1,%.xml,$(patsubst %.5,%.xml,$(MANPAGES)))
92 MANPAGES_HTML = $(patsubst %.xml,%.html,$(MANPAGES_XML))
93
94 man: $(MANPAGES) $(MANPAGES_HTML)
95
96 man_MANS = \
97         $(MANPAGES)
98
99 noinst_DATA += \
100         $(MANPAGES_HTML)
101
102 CLEANFILES += \
103         $(man_MANS) \
104         $(MANPAGES_HTML)
105
106 EXTRA_DIST += \
107         $(MANPAGES_XML) \
108         man/custom-html.xsl
109
110 XSLTPROC_FLAGS = \
111         --nonet \
112         --stringparam man.output.quietly 1 \
113         --stringparam funcsynopsis.style ansi \
114         --stringparam man.th.extra1.suppress 1 \
115         --stringparam man.authors.section.enabled 1 \
116         --stringparam man.copyright.section.enabled 1
117
118 XSLTPROC_COMMAND_MAN = \
119         $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) \
120                 http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
121
122 XSLTPROC_COMMAND_HTML = \
123         $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-html.xsl $<
124
125 man/%.1: man/%.xml
126         $(XSLTPROC_COMMAND_MAN)
127
128 man/%.5: man/%.xml
129         $(XSLTPROC_COMMAND_MAN)
130
131 man/%.html: man/%.xml man/custom-html.xsl
132         $(XSLTPROC_COMMAND_HTML)
133
134 endif
135
136 # ------------------------------------------------------------------------------
137
138 substitutions = \
139         '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
140         '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \
141         '|configsdir=$(configsdir)|'
142
143 SED_PROCESS = \
144         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
145         $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
146                 < $< > $@
147
148 ddns: ddns.in Makefile
149         $(SED_PROCESS)