]> git.ipfire.org Git - people/ms/westferry.git/blob - Makefile.am
664a197b7279391614cf393055ca4f3281b03476
[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/services.py
89
90 westferrydir = $(pythondir)/westferry
91
92 EXTRA_DIST += \
93 src/westferry/constants.py.in
94
95 CLEANFILES += \
96 src/westferry/constants.py
97
98 westferry_backend_PYTHON = \
99 src/westferry/backend/__version__.py
100
101 westferry_backenddir = $(pythondir)/westferry/backend
102
103 westferry_handlers_PYTHON = \
104 src/westferry/handlers/__init__.py \
105 src/westferry/handlers/base.py \
106 src/westferry/handlers/index.py
107
108 westferry_handlersdir = $(pythondir)/westferry/handlers
109
110 westferry_ui_PYTHON = \
111 src/westferry/ui/__init__.py \
112 src/westferry/ui/base.py
113
114 westferry_uidir = $(pythondir)/westferry/ui
115
116 # - third party ----------------------------------------------------------------
117
118 # We currently ship a copy of Bootstrap which eventually has to go away
119
120 dist_webroot_css_DATA = \
121 src/third-party/bootstrap/css/bootstrap.min.css
122
123 EXTRA_DIST += \
124 src/third-party/bootstrap/css/bootstrap.css \
125 src/third-party/bootstrap/css/bootstrap-theme.css \
126 src/third-party/bootstrap/css/bootstrap-theme.css.map \
127 src/third-party/bootstrap/css/bootstrap.min.css \
128 src/third-party/bootstrap/css/bootstrap-theme.min.css \
129 src/third-party/bootstrap/css/bootstrap.css.map
130
131 dist_webroot_fonts_DATA = \
132 src/third-party/bootstrap/fonts/glyphicons-halflings-regular.ttf \
133 src/third-party/bootstrap/fonts/glyphicons-halflings-regular.svg \
134 src/third-party/bootstrap/fonts/glyphicons-halflings-regular.woff \
135 src/third-party/bootstrap/fonts/glyphicons-halflings-regular.eot \
136 src/third-party/bootstrap/fonts/glyphicons-halflings-regular.woff2
137
138 dist_webroot_scripts_DATA = \
139 src/third-party/bootstrap/js/bootstrap.min.js
140
141 EXTRA_DIST += \
142 src/third-party/bootstrap/js/npm.js \
143 src/third-party/bootstrap/js/bootstrap.js
144
145 # Also shipping jQuery
146
147 dist_webroot_scripts_DATA = \
148 src/third-party/jquery.min.js
149
150 # ------------------------------------------------------------------------------
151
152 if ENABLE_MANPAGES
153 MANPAGES =
154
155 MANPAGES_XML = $(patsubst %.1,%.xml,$(patsubst %.5,%.xml,$(MANPAGES)))
156 MANPAGES_HTML = $(patsubst %.xml,%.html,$(MANPAGES_XML))
157
158 man: $(MANPAGES) $(MANPAGES_HTML)
159
160 man_MANS = \
161 $(MANPAGES)
162
163 noinst_DATA += \
164 $(MANPAGES_HTML)
165
166 CLEANFILES += \
167 $(man_MANS) \
168 $(MANPAGES_HTML)
169
170 EXTRA_DIST += \
171 $(MANPAGES_XML) \
172 man/custom-html.xsl
173
174 XSLTPROC_FLAGS = \
175 --nonet \
176 --stringparam man.output.quietly 1 \
177 --stringparam funcsynopsis.style ansi \
178 --stringparam man.th.extra1.suppress 1 \
179 --stringparam man.authors.section.enabled 1 \
180 --stringparam man.copyright.section.enabled 1
181
182 XSLTPROC_COMMAND_MAN = \
183 $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) \
184 http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
185
186 XSLTPROC_COMMAND_HTML = \
187 $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-html.xsl $<
188
189 man/%.1: man/%.xml
190 $(XSLTPROC_COMMAND_MAN)
191
192 man/%.5: man/%.xml
193 $(XSLTPROC_COMMAND_MAN)
194
195 man/%.html: man/%.xml man/custom-html.xsl
196 $(XSLTPROC_COMMAND_HTML)
197
198 endif
199
200 # ------------------------------------------------------------------------------
201
202 if HAVE_SYSTEMD
203 systemdsystemunit_DATA = \
204 src/systemd/westferry.service
205
206 CLEANFILES += \
207 $(systemdsystemunit_DATA)
208
209 INSTALL_DIRS += \
210 $(systemdsystemunitdir)
211 endif
212
213 EXTRA_DIST += \
214 src/systemd/westferry.service.in
215
216 # ------------------------------------------------------------------------------
217
218 substitutions = \
219 '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
220 '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \
221 '|configsdir=$(configsdir)|' \
222 '|bindir=$(bindir)|' \
223 '|datadir=$(datadir)|' \
224 '|webrootdir=$(webrootdir)|'
225
226 SED_PROCESS = \
227 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
228 $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
229 < $< > $@
230
231 %.py: %.py.in Makefile
232 $(SED_PROCESS)
233
234 src/scripts/westferry: src/scripts/westferry.in Makefile
235 $(SED_PROCESS)
236
237 src/systemd/%: src/systemd/%.in Makefile
238 $(SED_PROCESS)