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