]> git.ipfire.org Git - people/ms/westferry.git/blame - Makefile.am
Makefile: Fix re-definition of EXTRA_DIST
[people/ms/westferry.git] / Makefile.am
CommitLineData
4f357333
MT
1###############################################################################
2# #
3# Westferry - The IPFire web user interface #
4# Copyright (C) 2015 IPFire 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
21ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
22AM_MAKEFLAGS = --no-print-directory
23AUTOMAKE_OPTIONS = color-tests
24
25# remove target it the command fails
26.DELETE_ON_ERROR:
27
28# keep itermediate files
29.SECONDARY:
30
31SUBDIRS = . po
32
33pythondir = $(pyexecdir)
34
35configsdir = $(sysconfdir)/westferry
36
b0645c6e
MT
37# Directories for static files
38webrootdir = $(datadir)/westferry/webroot
39webroot_cssdir = $(webrootdir)/css
40webroot_fontsdir = $(webrootdir)/fonts
41webroot_scriptsdir = $(webrootdir)/scripts
42webroot_imagesdir = $(webrootdir)/images
43
4f357333
MT
44CLEANFILES =
45DISTCLEANFILES =
46EXTRA_DIST =
47INSTALL_DIRS =
48noinst_DATA =
49
50@INTLTOOL_POLICY_RULE@
51
52.PHONY: update-po
53update-po:
54 $(MAKE) -C po update-po
55
56DISTCHECK_CONFIGURE_FLAGS = \
57 --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir)
58
59# ------------------------------------------------------------------------------
60
61AM_V_XSLT = $(AM_V_XSLT_$(V))
62AM_V_XSLT_ = $(AM_V_XSLT_$(AM_DEFAULT_VERBOSITY))
63AM_V_XSLT_0 = @echo " XSLT " $@;
64
65# ------------------------------------------------------------------------------
66
67dist_doc_DATA = \
68 COPYING
69
70# ------------------------------------------------------------------------------
71
72bin_SCRIPTS = \
73 src/scripts/westferry
74
75EXTRA_DIST += \
76 src/scripts/westferry.in
77
78CLEANFILES += \
79 src/scripts/westferry
80
81dist_configs_DATA = \
82 westferry.conf.sample
83
84westferry_PYTHON = \
9877dda9 85 src/westferry/__init__.py \
b0645c6e 86 src/westferry/constants.py \
9877dda9 87 src/westferry/application.py \
3fc6d806 88 src/westferry/i18n.py \
9877dda9 89 src/westferry/services.py
4f357333
MT
90
91westferrydir = $(pythondir)/westferry
92
b0645c6e
MT
93EXTRA_DIST += \
94 src/westferry/constants.py.in
95
96CLEANFILES += \
97 src/westferry/constants.py
98
4f357333 99westferry_backend_PYTHON = \
21a66327
MT
100 src/westferry/backend/__init__.py \
101 src/westferry/backend/__version__.py \
102 src/westferry/backend/base.py \
103 src/westferry/backend/graphs.py \
104 src/westferry/backend/main.py \
105 src/westferry/backend/system.py
4f357333
MT
106
107westferry_backenddir = $(pythondir)/westferry/backend
108
f33e1d2f
MT
109westferry_backend_forms_PYTHON = \
110 src/westferry/backend/forms/__init__.py \
111 src/westferry/backend/forms/base.py \
112 src/westferry/backend/forms/choice.py \
113 src/westferry/backend/forms/main.py \
114 src/westferry/backend/forms/text.py \
115 src/westferry/backend/forms/yesno.py
116
117westferry_backend_formsdir = $(westferry_backenddir)/forms
118
9877dda9
MT
119westferry_handlers_PYTHON = \
120 src/westferry/handlers/__init__.py \
21a66327 121 src/westferry/handlers/analytics.py \
9877dda9 122 src/westferry/handlers/base.py \
f33e1d2f 123 src/westferry/handlers/demo.py \
9877dda9
MT
124 src/westferry/handlers/index.py
125
126westferry_handlersdir = $(pythondir)/westferry/handlers
127
128westferry_ui_PYTHON = \
129 src/westferry/ui/__init__.py \
95da2e86 130 src/westferry/ui/base.py \
f33e1d2f 131 src/westferry/ui/forms.py \
03f518c7 132 src/westferry/ui/graphs.py \
95da2e86
MT
133 src/westferry/ui/menu.py \
134 src/westferry/ui/utils.py
9877dda9
MT
135
136westferry_uidir = $(pythondir)/westferry/ui
137
95da2e86
MT
138# - templates ------------------------------------------------------------------
139
140templatesdir = $(datadir)/westferry/templates
141
142dist_templates_DATA = \
f33e1d2f
MT
143 src/templates/base.html \
144 src/templates/demo.html
95da2e86
MT
145
146templates_modulesdir = $(templatesdir)/modules
147
03f518c7
MT
148dist_templates_modules_DATA =
149
f33e1d2f
MT
150templates_modules_formsdir = $(templates_modulesdir)/forms
151
152dist_templates_modules_forms_DATA = \
1b19941d 153 src/templates/modules/forms/elements.html \
f33e1d2f 154 src/templates/modules/forms/fieldset.html \
f33e1d2f
MT
155 src/templates/modules/forms/index.html
156
157templates_modules_forms_inputsdir = $(templates_modules_formsdir)/inputs
158
159dist_templates_modules_forms_inputs_DATA = \
160 src/templates/modules/forms/inputs/base.html \
161 src/templates/modules/forms/inputs/checkbox.html \
162 src/templates/modules/forms/inputs/text.html \
163 src/templates/modules/forms/inputs/textarea.html
164
03f518c7
MT
165templates_modules_graphsdir = $(templates_modulesdir)/graphs
166
167dist_templates_modules_graphs_DATA = \
168 src/templates/modules/graphs/box.html \
0ac359f3
MT
169 src/templates/modules/graphs/preview.html \
170 src/templates/modules/graphs/thumbnail.html \
171 src/templates/modules/graphs/thumbnail-bar.html
03f518c7 172
95da2e86
MT
173templates_modules_menudir = $(templates_modulesdir)/menu
174
175dist_templates_modules_menu_DATA = \
a6144752 176 src/templates/modules/menu/sidebar.html \
3c9a9d48 177 src/templates/modules/menu/sidebar-link.html
95da2e86
MT
178
179ui_modulesdir = $(datadir)/westferry/templates/modules
180
181ui_modules_DATA =
182
183dist_webroot_css_DATA = \
184 src/styles/westferry.css
185
b0645c6e 186EXTRA_DIST += \
1db99dd4 187 src/styles/_fonts.scss \
df3a69ff 188 src/styles/westferry.scss
b0645c6e 189
df3a69ff
MT
190CLEANFILES += \
191 src/styles/westferry.css
b0645c6e 192
2a681509
MT
193dist_webroot_fonts_DATA = \
194 src/third-party/fonts/ofl/prompt/OFL.txt \
195 src/third-party/fonts/ofl/prompt/Prompt-Black.ttf \
196 src/third-party/fonts/ofl/prompt/Prompt-BlackItalic.ttf \
197 src/third-party/fonts/ofl/prompt/Prompt-Bold.ttf \
198 src/third-party/fonts/ofl/prompt/Prompt-BoldItalic.ttf \
199 src/third-party/fonts/ofl/prompt/Prompt-ExtraBold.ttf \
200 src/third-party/fonts/ofl/prompt/Prompt-ExtraBoldItalic.ttf \
201 src/third-party/fonts/ofl/prompt/Prompt-ExtraLight.ttf \
202 src/third-party/fonts/ofl/prompt/Prompt-ExtraLightItalic.ttf \
203 src/third-party/fonts/ofl/prompt/Prompt-Italic.ttf \
204 src/third-party/fonts/ofl/prompt/Prompt-Light.ttf \
205 src/third-party/fonts/ofl/prompt/Prompt-LightItalic.ttf \
206 src/third-party/fonts/ofl/prompt/Prompt-Medium.ttf \
207 src/third-party/fonts/ofl/prompt/Prompt-MediumItalic.ttf \
208 src/third-party/fonts/ofl/prompt/Prompt-Regular.ttf \
209 src/third-party/fonts/ofl/prompt/Prompt-SemiBold.ttf \
210 src/third-party/fonts/ofl/prompt/Prompt-SemiBoldItalic.ttf \
211 src/third-party/fonts/ofl/prompt/Prompt-Thin.ttf \
212 src/third-party/fonts/ofl/prompt/Prompt-ThinItalic.ttf
213
df3a69ff 214# - third party ----------------------------------------------------------------
b0645c6e 215
30202071 216EXTRA_DIST += \
56020c3a
MT
217 src/third-party/foundation-sites
218
b0645c6e
MT
219# Also shipping jQuery
220
df3a69ff 221dist_webroot_scripts_DATA = \
b0645c6e
MT
222 src/third-party/jquery.min.js
223
4f357333
MT
224# ------------------------------------------------------------------------------
225
226if ENABLE_MANPAGES
227MANPAGES =
228
229MANPAGES_XML = $(patsubst %.1,%.xml,$(patsubst %.5,%.xml,$(MANPAGES)))
230MANPAGES_HTML = $(patsubst %.xml,%.html,$(MANPAGES_XML))
231
232man: $(MANPAGES) $(MANPAGES_HTML)
233
234man_MANS = \
235 $(MANPAGES)
236
237noinst_DATA += \
238 $(MANPAGES_HTML)
239
240CLEANFILES += \
241 $(man_MANS) \
242 $(MANPAGES_HTML)
243
244EXTRA_DIST += \
245 $(MANPAGES_XML) \
246 man/custom-html.xsl
247
248XSLTPROC_FLAGS = \
249 --nonet \
250 --stringparam man.output.quietly 1 \
251 --stringparam funcsynopsis.style ansi \
252 --stringparam man.th.extra1.suppress 1 \
253 --stringparam man.authors.section.enabled 1 \
254 --stringparam man.copyright.section.enabled 1
255
256XSLTPROC_COMMAND_MAN = \
257 $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) \
258 http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
259
260XSLTPROC_COMMAND_HTML = \
261 $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-html.xsl $<
262
263man/%.1: man/%.xml
264 $(XSLTPROC_COMMAND_MAN)
265
266man/%.5: man/%.xml
267 $(XSLTPROC_COMMAND_MAN)
268
269man/%.html: man/%.xml man/custom-html.xsl
270 $(XSLTPROC_COMMAND_HTML)
271
272endif
273
274# ------------------------------------------------------------------------------
275
276if HAVE_SYSTEMD
277systemdsystemunit_DATA = \
278 src/systemd/westferry.service
279
280CLEANFILES += \
281 $(systemdsystemunit_DATA)
282
283INSTALL_DIRS += \
284 $(systemdsystemunitdir)
285endif
286
287EXTRA_DIST += \
288 src/systemd/westferry.service.in
289
290# ------------------------------------------------------------------------------
291
292substitutions = \
293 '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
294 '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \
295 '|configsdir=$(configsdir)|' \
b0645c6e
MT
296 '|bindir=$(bindir)|' \
297 '|datadir=$(datadir)|' \
95da2e86 298 '|templatesdir=$(templatesdir)|' \
b0645c6e 299 '|webrootdir=$(webrootdir)|'
4f357333
MT
300
301SED_PROCESS = \
302 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
303 $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
304 < $< > $@
305
b0645c6e
MT
306%.py: %.py.in Makefile
307 $(SED_PROCESS)
308
942d841a
MT
309%.css: %.scss Makefile
310 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
311 $(SASSC) --style compressed $< > $@
312
4f357333
MT
313src/scripts/westferry: src/scripts/westferry.in Makefile
314 $(SED_PROCESS)
315
316src/systemd/%: src/systemd/%.in Makefile
317 $(SED_PROCESS)