]> git.ipfire.org Git - people/ms/westferry.git/blob - Makefile.am
Create a basic, modular frontend web service
[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 CLEANFILES =
38 DISTCLEANFILES =
39 EXTRA_DIST =
40 INSTALL_DIRS =
41 noinst_DATA =
42
43 @INTLTOOL_POLICY_RULE@
44
45 .PHONY: update-po
46 update-po:
47 $(MAKE) -C po update-po
48
49 DISTCHECK_CONFIGURE_FLAGS = \
50 --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir)
51
52 # ------------------------------------------------------------------------------
53
54 AM_V_XSLT = $(AM_V_XSLT_$(V))
55 AM_V_XSLT_ = $(AM_V_XSLT_$(AM_DEFAULT_VERBOSITY))
56 AM_V_XSLT_0 = @echo " XSLT " $@;
57
58 # ------------------------------------------------------------------------------
59
60 dist_doc_DATA = \
61 COPYING
62
63 # ------------------------------------------------------------------------------
64
65 bin_SCRIPTS = \
66 src/scripts/westferry
67
68 EXTRA_DIST += \
69 src/scripts/westferry.in
70
71 CLEANFILES += \
72 src/scripts/westferry
73
74 dist_configs_DATA = \
75 westferry.conf.sample
76
77 westferry_PYTHON = \
78 src/westferry/__init__.py \
79 src/westferry/application.py \
80 src/westferry/services.py
81
82 westferrydir = $(pythondir)/westferry
83
84 westferry_backend_PYTHON = \
85 src/westferry/backend/__version__.py
86
87 westferry_backenddir = $(pythondir)/westferry/backend
88
89 westferry_handlers_PYTHON = \
90 src/westferry/handlers/__init__.py \
91 src/westferry/handlers/base.py \
92 src/westferry/handlers/index.py
93
94 westferry_handlersdir = $(pythondir)/westferry/handlers
95
96 westferry_ui_PYTHON = \
97 src/westferry/ui/__init__.py \
98 src/westferry/ui/base.py
99
100 westferry_uidir = $(pythondir)/westferry/ui
101
102 # ------------------------------------------------------------------------------
103
104 if ENABLE_MANPAGES
105 MANPAGES =
106
107 MANPAGES_XML = $(patsubst %.1,%.xml,$(patsubst %.5,%.xml,$(MANPAGES)))
108 MANPAGES_HTML = $(patsubst %.xml,%.html,$(MANPAGES_XML))
109
110 man: $(MANPAGES) $(MANPAGES_HTML)
111
112 man_MANS = \
113 $(MANPAGES)
114
115 noinst_DATA += \
116 $(MANPAGES_HTML)
117
118 CLEANFILES += \
119 $(man_MANS) \
120 $(MANPAGES_HTML)
121
122 EXTRA_DIST += \
123 $(MANPAGES_XML) \
124 man/custom-html.xsl
125
126 XSLTPROC_FLAGS = \
127 --nonet \
128 --stringparam man.output.quietly 1 \
129 --stringparam funcsynopsis.style ansi \
130 --stringparam man.th.extra1.suppress 1 \
131 --stringparam man.authors.section.enabled 1 \
132 --stringparam man.copyright.section.enabled 1
133
134 XSLTPROC_COMMAND_MAN = \
135 $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) \
136 http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
137
138 XSLTPROC_COMMAND_HTML = \
139 $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-html.xsl $<
140
141 man/%.1: man/%.xml
142 $(XSLTPROC_COMMAND_MAN)
143
144 man/%.5: man/%.xml
145 $(XSLTPROC_COMMAND_MAN)
146
147 man/%.html: man/%.xml man/custom-html.xsl
148 $(XSLTPROC_COMMAND_HTML)
149
150 endif
151
152 # ------------------------------------------------------------------------------
153
154 if HAVE_SYSTEMD
155 systemdsystemunit_DATA = \
156 src/systemd/westferry.service
157
158 CLEANFILES += \
159 $(systemdsystemunit_DATA)
160
161 INSTALL_DIRS += \
162 $(systemdsystemunitdir)
163 endif
164
165 EXTRA_DIST += \
166 src/systemd/westferry.service.in
167
168 # ------------------------------------------------------------------------------
169
170 substitutions = \
171 '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
172 '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \
173 '|configsdir=$(configsdir)|' \
174 '|bindir=$(bindir)|'
175
176 SED_PROCESS = \
177 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
178 $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
179 < $< > $@
180
181 src/scripts/westferry: src/scripts/westferry.in Makefile
182 $(SED_PROCESS)
183
184 src/systemd/%: src/systemd/%.in Makefile
185 $(SED_PROCESS)