]> git.ipfire.org Git - nitsi.git/blame - Makefile.am
Fix check if we get an valid recipe file
[nitsi.git] / Makefile.am
CommitLineData
2fa4467d
JS
1ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
2AM_MAKEFLAGS = --no-print-directory
3AUTOMAKE_OPTIONS = color-tests
4
5# remove target it the command fails
6.DELETE_ON_ERROR:
7
8# keep itermediate files
9.SECONDARY:
10
11pythondir = $(pyexecdir)
12
13CLEANFILES =
14DISTCLEANFILES =
15EXTRA_DIST =
16INSTALL_DIRS =
17noinst_DATA =
18
2fa4467d
JS
19AM_V_XSLT = $(AM_V_XSLT_$(V))
20AM_V_XSLT_ = $(AM_V_XSLT_$(AM_DEFAULT_VERBOSITY))
21AM_V_XSLT_0 = @echo " XSLT " $@;
22
23bin_SCRIPTS = \
24 nitsi
25
26CLEANFILES += \
27 nitsi
28
dcf87b0a
MT
29EXTRA_DIST += \
30 nitsi.in
31
2fa4467d
JS
32nitsi_PYTHON = \
33 src/nitsi/__init__.py \
34 src/nitsi/disk.py \
23bfbec7 35 src/nitsi/logger.py \
2fa4467d
JS
36 src/nitsi/machine.py \
37 src/nitsi/network.py \
38 src/nitsi/recipe.py \
39 src/nitsi/serial_connection.py \
f33494aa 40 src/nitsi/settings.py \
2fa4467d
JS
41 src/nitsi/test.py \
42 src/nitsi/virtual_environ.py
43
2fa4467d
JS
44nitsidir = $(pythondir)/nitsi
45
46# ------------------------------------------------------------------------------
47
48.PHONY: man
49man: $(MANPAGES) $(MANPAGES_HTML)
50
51if ENABLE_MANPAGES
52MANPAGES = \
20b41754 53 man/nitsi.1 \
9a27a648
MT
54 man/nitsi.settings.5 \
55 man/nitsi.recipe.5
2fa4467d
JS
56
57MANPAGES_XML = $(patsubst %.1,%.xml,$(patsubst %.5,%.xml,$(MANPAGES)))
58MANPAGES_HTML = $(patsubst %.xml,%.html,$(MANPAGES_XML))
59
60man_MANS = \
61 $(MANPAGES)
62
63noinst_DATA += \
64 $(MANPAGES_HTML)
65
66CLEANFILES += \
67 $(man_MANS) \
68 $(MANPAGES_HTML)
69
70EXTRA_DIST += \
71 $(MANPAGES_XML) \
72 man/custom-html.xsl
73
74XSLTPROC_FLAGS = \
75 --nonet \
76 --stringparam man.output.quietly 1 \
77 --stringparam funcsynopsis.style ansi \
78 --stringparam man.th.extra1.suppress 1 \
79 --stringparam man.authors.section.enabled 1 \
80 --stringparam man.copyright.section.enabled 1
81
82XSLTPROC_COMMAND_MAN = \
83 $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) \
84 http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
85
86XSLTPROC_COMMAND_HTML = \
87 $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-html.xsl $<
88
89man/%.1: man/%.xml
90 $(XSLTPROC_COMMAND_MAN)
91
92man/%.5: man/%.xml
93 $(XSLTPROC_COMMAND_MAN)
94
95man/%.html: man/%.xml man/custom-html.xsl
96 $(XSLTPROC_COMMAND_HTML)
2fa4467d
JS
97endif
98
99# ------------------------------------------------------------------------------
100
101substitutions = \
102 '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
103 '|PACKAGE_VERSION=$(PACKAGE_VERSION)|'
104
105SED_PROCESS = \
106 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
107 $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
108 < $< > $@
109
110nitsi: nitsi.in Makefile
9a27a648 111 $(SED_PROCESS)