]>
Commit | Line | Data |
---|---|---|
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 | ||
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 | ||
b0645c6e MT |
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 | ||
4f357333 MT |
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 = \ | |
9877dda9 | 85 | src/westferry/__init__.py \ |
b0645c6e | 86 | src/westferry/constants.py \ |
9877dda9 | 87 | src/westferry/application.py \ |
3fc6d806 | 88 | src/westferry/i18n.py \ |
208738dd | 89 | src/westferry/logging.py \ |
9877dda9 | 90 | src/westferry/services.py |
4f357333 MT |
91 | |
92 | westferrydir = $(pythondir)/westferry | |
93 | ||
b0645c6e MT |
94 | EXTRA_DIST += \ |
95 | src/westferry/constants.py.in | |
96 | ||
97 | CLEANFILES += \ | |
98 | src/westferry/constants.py | |
99 | ||
4f357333 | 100 | westferry_backend_PYTHON = \ |
21a66327 MT |
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 | |
4f357333 MT |
107 | |
108 | westferry_backenddir = $(pythondir)/westferry/backend | |
109 | ||
9877dda9 MT |
110 | westferry_handlers_PYTHON = \ |
111 | src/westferry/handlers/__init__.py \ | |
21a66327 | 112 | src/westferry/handlers/analytics.py \ |
9877dda9 | 113 | src/westferry/handlers/base.py \ |
f33e1d2f | 114 | src/westferry/handlers/demo.py \ |
84759d58 MT |
115 | src/westferry/handlers/index.py \ |
116 | src/westferry/handlers/system.py | |
9877dda9 MT |
117 | |
118 | westferry_handlersdir = $(pythondir)/westferry/handlers | |
119 | ||
120 | westferry_ui_PYTHON = \ | |
121 | src/westferry/ui/__init__.py \ | |
95da2e86 | 122 | src/westferry/ui/base.py \ |
2ff1c21b | 123 | src/westferry/ui/boxes.py \ |
f33e1d2f | 124 | src/westferry/ui/forms.py \ |
03f518c7 | 125 | src/westferry/ui/graphs.py \ |
9231bd0e | 126 | src/westferry/ui/menus.py \ |
19514d9c | 127 | src/westferry/ui/tabs.py \ |
95da2e86 | 128 | src/westferry/ui/utils.py |
9877dda9 MT |
129 | |
130 | westferry_uidir = $(pythondir)/westferry/ui | |
131 | ||
95da2e86 MT |
132 | # - templates ------------------------------------------------------------------ |
133 | ||
134 | templatesdir = $(datadir)/westferry/templates | |
135 | ||
136 | dist_templates_DATA = \ | |
4cb418ce | 137 | src/templates/base.html \ |
19514d9c | 138 | src/templates/default.html \ |
4cb418ce | 139 | src/templates/graphs.html |
ba309c2c MT |
140 | |
141 | templates_demodir = $(templatesdir)/demo | |
142 | ||
143 | dist_templates_demo_DATA = \ | |
ba309c2c | 144 | src/templates/demo/index.html |
95da2e86 MT |
145 | |
146 | templates_modulesdir = $(templatesdir)/modules | |
147 | ||
2ff1c21b | 148 | dist_templates_modules_DATA = \ |
19514d9c MT |
149 | src/templates/modules/box.html \ |
150 | src/templates/modules/tabs.html | |
03f518c7 | 151 | |
f33e1d2f MT |
152 | templates_modules_formsdir = $(templates_modulesdir)/forms |
153 | ||
154 | dist_templates_modules_forms_DATA = \ | |
1b19941d | 155 | src/templates/modules/forms/elements.html \ |
f33e1d2f | 156 | src/templates/modules/forms/fieldset.html \ |
f33e1d2f MT |
157 | src/templates/modules/forms/index.html |
158 | ||
159 | templates_modules_forms_inputsdir = $(templates_modules_formsdir)/inputs | |
160 | ||
161 | dist_templates_modules_forms_inputs_DATA = \ | |
162 | src/templates/modules/forms/inputs/base.html \ | |
163 | src/templates/modules/forms/inputs/checkbox.html \ | |
164 | src/templates/modules/forms/inputs/text.html \ | |
165 | src/templates/modules/forms/inputs/textarea.html | |
166 | ||
03f518c7 MT |
167 | templates_modules_graphsdir = $(templates_modulesdir)/graphs |
168 | ||
169 | dist_templates_modules_graphs_DATA = \ | |
06986af1 | 170 | src/templates/modules/graphs/box.html |
03f518c7 | 171 | |
9231bd0e | 172 | templates_modules_menusdir = $(templates_modulesdir)/menus |
95da2e86 | 173 | |
9231bd0e MT |
174 | dist_templates_modules_menus_DATA = \ |
175 | src/templates/modules/menus/dropdown.html \ | |
176 | src/templates/modules/menus/link.html \ | |
177 | src/templates/modules/menus/sidebar.html \ | |
178 | src/templates/modules/menus/topbar.html | |
95da2e86 MT |
179 | |
180 | ui_modulesdir = $(datadir)/westferry/templates/modules | |
181 | ||
182 | ui_modules_DATA = | |
183 | ||
184 | dist_webroot_css_DATA = \ | |
185 | src/styles/westferry.css | |
186 | ||
b0645c6e | 187 | EXTRA_DIST += \ |
1db99dd4 | 188 | src/styles/_fonts.scss \ |
df3a69ff | 189 | src/styles/westferry.scss |
b0645c6e | 190 | |
df3a69ff MT |
191 | CLEANFILES += \ |
192 | src/styles/westferry.css | |
b0645c6e | 193 | |
2a681509 MT |
194 | dist_webroot_fonts_DATA = \ |
195 | src/third-party/fonts/ofl/prompt/OFL.txt \ | |
196 | src/third-party/fonts/ofl/prompt/Prompt-Black.ttf \ | |
197 | src/third-party/fonts/ofl/prompt/Prompt-BlackItalic.ttf \ | |
198 | src/third-party/fonts/ofl/prompt/Prompt-Bold.ttf \ | |
199 | src/third-party/fonts/ofl/prompt/Prompt-BoldItalic.ttf \ | |
200 | src/third-party/fonts/ofl/prompt/Prompt-ExtraBold.ttf \ | |
201 | src/third-party/fonts/ofl/prompt/Prompt-ExtraBoldItalic.ttf \ | |
202 | src/third-party/fonts/ofl/prompt/Prompt-ExtraLight.ttf \ | |
203 | src/third-party/fonts/ofl/prompt/Prompt-ExtraLightItalic.ttf \ | |
204 | src/third-party/fonts/ofl/prompt/Prompt-Italic.ttf \ | |
205 | src/third-party/fonts/ofl/prompt/Prompt-Light.ttf \ | |
206 | src/third-party/fonts/ofl/prompt/Prompt-LightItalic.ttf \ | |
207 | src/third-party/fonts/ofl/prompt/Prompt-Medium.ttf \ | |
208 | src/third-party/fonts/ofl/prompt/Prompt-MediumItalic.ttf \ | |
209 | src/third-party/fonts/ofl/prompt/Prompt-Regular.ttf \ | |
210 | src/third-party/fonts/ofl/prompt/Prompt-SemiBold.ttf \ | |
211 | src/third-party/fonts/ofl/prompt/Prompt-SemiBoldItalic.ttf \ | |
212 | src/third-party/fonts/ofl/prompt/Prompt-Thin.ttf \ | |
213 | src/third-party/fonts/ofl/prompt/Prompt-ThinItalic.ttf | |
214 | ||
52b2d2ac MT |
215 | webroot_scripts_DATA = \ |
216 | src/third-party/jquery.min.js \ | |
217 | src/scripts/foundation.min.js \ | |
218 | src/scripts/westferry.min.js | |
b0645c6e | 219 | |
30202071 | 220 | EXTRA_DIST += \ |
52b2d2ac | 221 | src/scripts/westferry.js |
56020c3a | 222 | |
52b2d2ac MT |
223 | CLEANFILES += \ |
224 | src/third-party/jquery.min.js \ | |
225 | src/scripts/foundation.min.js \ | |
226 | src/scripts/westferry.min.js | |
b0645c6e | 227 | |
52b2d2ac MT |
228 | # - third party ---------------------------------------------------------------- |
229 | ||
230 | EXTRA_DIST += \ | |
231 | src/third-party/foundation-sites \ | |
232 | src/third-party/jquery.js | |
b0645c6e | 233 | |
4f357333 MT |
234 | # ------------------------------------------------------------------------------ |
235 | ||
236 | if ENABLE_MANPAGES | |
237 | MANPAGES = | |
238 | ||
239 | MANPAGES_XML = $(patsubst %.1,%.xml,$(patsubst %.5,%.xml,$(MANPAGES))) | |
240 | MANPAGES_HTML = $(patsubst %.xml,%.html,$(MANPAGES_XML)) | |
241 | ||
242 | man: $(MANPAGES) $(MANPAGES_HTML) | |
243 | ||
244 | man_MANS = \ | |
245 | $(MANPAGES) | |
246 | ||
247 | noinst_DATA += \ | |
248 | $(MANPAGES_HTML) | |
249 | ||
250 | CLEANFILES += \ | |
251 | $(man_MANS) \ | |
252 | $(MANPAGES_HTML) | |
253 | ||
254 | EXTRA_DIST += \ | |
255 | $(MANPAGES_XML) \ | |
256 | man/custom-html.xsl | |
257 | ||
258 | XSLTPROC_FLAGS = \ | |
259 | --nonet \ | |
260 | --stringparam man.output.quietly 1 \ | |
261 | --stringparam funcsynopsis.style ansi \ | |
262 | --stringparam man.th.extra1.suppress 1 \ | |
263 | --stringparam man.authors.section.enabled 1 \ | |
264 | --stringparam man.copyright.section.enabled 1 | |
265 | ||
266 | XSLTPROC_COMMAND_MAN = \ | |
267 | $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) \ | |
268 | http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $< | |
269 | ||
270 | XSLTPROC_COMMAND_HTML = \ | |
271 | $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-html.xsl $< | |
272 | ||
273 | man/%.1: man/%.xml | |
274 | $(XSLTPROC_COMMAND_MAN) | |
275 | ||
276 | man/%.5: man/%.xml | |
277 | $(XSLTPROC_COMMAND_MAN) | |
278 | ||
279 | man/%.html: man/%.xml man/custom-html.xsl | |
280 | $(XSLTPROC_COMMAND_HTML) | |
281 | ||
282 | endif | |
283 | ||
284 | # ------------------------------------------------------------------------------ | |
285 | ||
286 | if HAVE_SYSTEMD | |
287 | systemdsystemunit_DATA = \ | |
288 | src/systemd/westferry.service | |
289 | ||
290 | CLEANFILES += \ | |
291 | $(systemdsystemunit_DATA) | |
292 | ||
293 | INSTALL_DIRS += \ | |
294 | $(systemdsystemunitdir) | |
295 | endif | |
296 | ||
297 | EXTRA_DIST += \ | |
298 | src/systemd/westferry.service.in | |
299 | ||
300 | # ------------------------------------------------------------------------------ | |
301 | ||
302 | substitutions = \ | |
303 | '|PACKAGE_NAME=$(PACKAGE_NAME)|' \ | |
304 | '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \ | |
305 | '|configsdir=$(configsdir)|' \ | |
b0645c6e MT |
306 | '|bindir=$(bindir)|' \ |
307 | '|datadir=$(datadir)|' \ | |
95da2e86 | 308 | '|templatesdir=$(templatesdir)|' \ |
b0645c6e | 309 | '|webrootdir=$(webrootdir)|' |
4f357333 MT |
310 | |
311 | SED_PROCESS = \ | |
312 | $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \ | |
313 | $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \ | |
314 | < $< > $@ | |
315 | ||
52b2d2ac MT |
316 | UGLIFYJS_PROCESS = \ |
317 | $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \ | |
318 | $(UGLIFYJS) --compress --mangle -- $< > $@ | |
319 | ||
f75b6d41 | 320 | %.py: %.py.in |
b0645c6e MT |
321 | $(SED_PROCESS) |
322 | ||
f75b6d41 | 323 | %.css: %.scss |
942d841a MT |
324 | $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \ |
325 | $(SASSC) --style compressed $< > $@ | |
326 | ||
f75b6d41 | 327 | %.min.js: %.js |
52b2d2ac MT |
328 | $(UGLIFYJS_PROCESS) |
329 | ||
f75b6d41 | 330 | src/scripts/foundation.min.js: src/third-party/foundation-sites/dist/js/foundation.js |
52b2d2ac MT |
331 | $(UGLIFYJS_PROCESS) |
332 | ||
f75b6d41 | 333 | src/scripts/westferry: src/scripts/westferry.in |
4f357333 MT |
334 | $(SED_PROCESS) |
335 | ||
f75b6d41 | 336 | src/systemd/%: src/systemd/%.in |
4f357333 | 337 | $(SED_PROCESS) |