############################################################################### # # # Westferry - The IPFire web user interface # # Copyright (C) 2015 IPFire development team # # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # # the Free Software Foundation, either version 3 of the License, or # # (at your option) any later version. # # # # This program is distributed in the hope that it will be useful, # # but WITHOUT ANY WARRANTY; without even the implied warranty of # # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # # GNU General Public License for more details. # # # # You should have received a copy of the GNU General Public License # # along with this program. If not, see . # # # ############################################################################### ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} AM_MAKEFLAGS = --no-print-directory AUTOMAKE_OPTIONS = color-tests # remove target it the command fails .DELETE_ON_ERROR: # keep itermediate files .SECONDARY: SUBDIRS = . po pythondir = $(pyexecdir) configsdir = $(sysconfdir)/westferry # Directories for static files webrootdir = $(datadir)/westferry/webroot webroot_cssdir = $(webrootdir)/css webroot_fontsdir = $(webrootdir)/fonts webroot_scriptsdir = $(webrootdir)/scripts webroot_imagesdir = $(webrootdir)/images CLEANFILES = DISTCLEANFILES = EXTRA_DIST = INSTALL_DIRS = noinst_DATA = @INTLTOOL_POLICY_RULE@ .PHONY: update-po update-po: $(MAKE) -C po update-po DISTCHECK_CONFIGURE_FLAGS = \ --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir) # ------------------------------------------------------------------------------ AM_V_XSLT = $(AM_V_XSLT_$(V)) AM_V_XSLT_ = $(AM_V_XSLT_$(AM_DEFAULT_VERBOSITY)) AM_V_XSLT_0 = @echo " XSLT " $@; # ------------------------------------------------------------------------------ dist_doc_DATA = \ COPYING # ------------------------------------------------------------------------------ bin_SCRIPTS = \ src/scripts/westferry EXTRA_DIST += \ src/scripts/westferry.in CLEANFILES += \ src/scripts/westferry dist_configs_DATA = \ westferry.conf.sample westferry_PYTHON = \ src/westferry/__init__.py \ src/westferry/constants.py \ src/westferry/application.py \ src/westferry/i18n.py \ src/westferry/logging.py \ src/westferry/services.py westferrydir = $(pythondir)/westferry EXTRA_DIST += \ src/westferry/constants.py.in CLEANFILES += \ src/westferry/constants.py westferry_backend_PYTHON = \ src/westferry/backend/__init__.py \ src/westferry/backend/__version__.py \ src/westferry/backend/base.py \ src/westferry/backend/graphs.py \ src/westferry/backend/main.py \ src/westferry/backend/system.py westferry_backenddir = $(pythondir)/westferry/backend westferry_handlers_PYTHON = \ src/westferry/handlers/__init__.py \ src/westferry/handlers/analytics.py \ src/westferry/handlers/base.py \ src/westferry/handlers/demo.py \ src/westferry/handlers/index.py \ src/westferry/handlers/system.py westferry_handlersdir = $(pythondir)/westferry/handlers westferry_ui_PYTHON = \ src/westferry/ui/__init__.py \ src/westferry/ui/base.py \ src/westferry/ui/boxes.py \ src/westferry/ui/forms.py \ src/westferry/ui/graphs.py \ src/westferry/ui/menus.py \ src/westferry/ui/tabs.py \ src/westferry/ui/utils.py westferry_uidir = $(pythondir)/westferry/ui # - templates ------------------------------------------------------------------ templatesdir = $(datadir)/westferry/templates dist_templates_DATA = \ src/templates/base.html \ src/templates/default.html \ src/templates/graphs.html templates_demodir = $(templatesdir)/demo dist_templates_demo_DATA = \ src/templates/demo/index.html templates_modulesdir = $(templatesdir)/modules dist_templates_modules_DATA = \ src/templates/modules/box.html \ src/templates/modules/tabs.html templates_modules_formsdir = $(templates_modulesdir)/forms dist_templates_modules_forms_DATA = \ src/templates/modules/forms/elements.html \ src/templates/modules/forms/fieldset.html \ src/templates/modules/forms/index.html templates_modules_forms_inputsdir = $(templates_modules_formsdir)/inputs dist_templates_modules_forms_inputs_DATA = \ src/templates/modules/forms/inputs/base.html \ src/templates/modules/forms/inputs/checkbox.html \ src/templates/modules/forms/inputs/text.html \ src/templates/modules/forms/inputs/textarea.html templates_modules_graphsdir = $(templates_modulesdir)/graphs dist_templates_modules_graphs_DATA = \ src/templates/modules/graphs/box.html templates_modules_menusdir = $(templates_modulesdir)/menus dist_templates_modules_menus_DATA = \ src/templates/modules/menus/dropdown.html \ src/templates/modules/menus/link.html \ src/templates/modules/menus/sidebar.html \ src/templates/modules/menus/topbar.html ui_modulesdir = $(datadir)/westferry/templates/modules ui_modules_DATA = dist_webroot_css_DATA = \ src/styles/westferry.css EXTRA_DIST += \ src/styles/_fonts.scss \ src/styles/westferry.scss CLEANFILES += \ src/styles/westferry.css dist_webroot_fonts_DATA = \ src/third-party/fonts/ofl/prompt/OFL.txt \ src/third-party/fonts/ofl/prompt/Prompt-Black.ttf \ src/third-party/fonts/ofl/prompt/Prompt-BlackItalic.ttf \ src/third-party/fonts/ofl/prompt/Prompt-Bold.ttf \ src/third-party/fonts/ofl/prompt/Prompt-BoldItalic.ttf \ src/third-party/fonts/ofl/prompt/Prompt-ExtraBold.ttf \ src/third-party/fonts/ofl/prompt/Prompt-ExtraBoldItalic.ttf \ src/third-party/fonts/ofl/prompt/Prompt-ExtraLight.ttf \ src/third-party/fonts/ofl/prompt/Prompt-ExtraLightItalic.ttf \ src/third-party/fonts/ofl/prompt/Prompt-Italic.ttf \ src/third-party/fonts/ofl/prompt/Prompt-Light.ttf \ src/third-party/fonts/ofl/prompt/Prompt-LightItalic.ttf \ src/third-party/fonts/ofl/prompt/Prompt-Medium.ttf \ src/third-party/fonts/ofl/prompt/Prompt-MediumItalic.ttf \ src/third-party/fonts/ofl/prompt/Prompt-Regular.ttf \ src/third-party/fonts/ofl/prompt/Prompt-SemiBold.ttf \ src/third-party/fonts/ofl/prompt/Prompt-SemiBoldItalic.ttf \ src/third-party/fonts/ofl/prompt/Prompt-Thin.ttf \ src/third-party/fonts/ofl/prompt/Prompt-ThinItalic.ttf webroot_scripts_DATA = \ src/third-party/jquery.min.js \ src/scripts/foundation.min.js \ src/scripts/westferry.min.js EXTRA_DIST += \ src/scripts/westferry.js CLEANFILES += \ src/third-party/jquery.min.js \ src/scripts/foundation.min.js \ src/scripts/westferry.min.js # - third party ---------------------------------------------------------------- EXTRA_DIST += \ src/third-party/foundation-sites \ src/third-party/jquery.js # ------------------------------------------------------------------------------ if ENABLE_MANPAGES MANPAGES = MANPAGES_XML = $(patsubst %.1,%.xml,$(patsubst %.5,%.xml,$(MANPAGES))) MANPAGES_HTML = $(patsubst %.xml,%.html,$(MANPAGES_XML)) man: $(MANPAGES) $(MANPAGES_HTML) man_MANS = \ $(MANPAGES) noinst_DATA += \ $(MANPAGES_HTML) CLEANFILES += \ $(man_MANS) \ $(MANPAGES_HTML) EXTRA_DIST += \ $(MANPAGES_XML) \ man/custom-html.xsl XSLTPROC_FLAGS = \ --nonet \ --stringparam man.output.quietly 1 \ --stringparam funcsynopsis.style ansi \ --stringparam man.th.extra1.suppress 1 \ --stringparam man.authors.section.enabled 1 \ --stringparam man.copyright.section.enabled 1 XSLTPROC_COMMAND_MAN = \ $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) \ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $< XSLTPROC_COMMAND_HTML = \ $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-html.xsl $< man/%.1: man/%.xml $(XSLTPROC_COMMAND_MAN) man/%.5: man/%.xml $(XSLTPROC_COMMAND_MAN) man/%.html: man/%.xml man/custom-html.xsl $(XSLTPROC_COMMAND_HTML) endif # ------------------------------------------------------------------------------ if HAVE_SYSTEMD systemdsystemunit_DATA = \ src/systemd/westferry.service CLEANFILES += \ $(systemdsystemunit_DATA) INSTALL_DIRS += \ $(systemdsystemunitdir) endif EXTRA_DIST += \ src/systemd/westferry.service.in # ------------------------------------------------------------------------------ substitutions = \ '|PACKAGE_NAME=$(PACKAGE_NAME)|' \ '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \ '|configsdir=$(configsdir)|' \ '|bindir=$(bindir)|' \ '|datadir=$(datadir)|' \ '|templatesdir=$(templatesdir)|' \ '|webrootdir=$(webrootdir)|' SED_PROCESS = \ $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \ $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \ < $< > $@ UGLIFYJS_PROCESS = \ $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \ $(UGLIFYJS) --compress --mangle -- $< > $@ %.py: %.py.in $(SED_PROCESS) %.css: %.scss $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \ $(SASSC) --style compressed $< > $@ %.min.js: %.js $(UGLIFYJS_PROCESS) src/scripts/foundation.min.js: src/third-party/foundation-sites/dist/js/foundation.js $(UGLIFYJS_PROCESS) src/scripts/westferry: src/scripts/westferry.in $(SED_PROCESS) src/systemd/%: src/systemd/%.in $(SED_PROCESS)