]> git.ipfire.org Git - nitsi.git/blame - Makefile.am
Rework file checks in test
[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 \
4ac093dc 34 src/nitsi/cmd.py \
2fa4467d 35 src/nitsi/disk.py \
23bfbec7 36 src/nitsi/logger.py \
2fa4467d
JS
37 src/nitsi/machine.py \
38 src/nitsi/network.py \
39 src/nitsi/recipe.py \
40 src/nitsi/serial_connection.py \
f33494aa 41 src/nitsi/settings.py \
2fa4467d
JS
42 src/nitsi/test.py \
43 src/nitsi/virtual_environ.py
44
2fa4467d
JS
45nitsidir = $(pythondir)/nitsi
46
47# ------------------------------------------------------------------------------
48
49.PHONY: man
50man: $(MANPAGES) $(MANPAGES_HTML)
51
52if ENABLE_MANPAGES
53MANPAGES = \
20b41754 54 man/nitsi.1 \
9a27a648
MT
55 man/nitsi.settings.5 \
56 man/nitsi.recipe.5
2fa4467d
JS
57
58MANPAGES_XML = $(patsubst %.1,%.xml,$(patsubst %.5,%.xml,$(MANPAGES)))
59MANPAGES_HTML = $(patsubst %.xml,%.html,$(MANPAGES_XML))
60
61man_MANS = \
62 $(MANPAGES)
63
64noinst_DATA += \
65 $(MANPAGES_HTML)
66
67CLEANFILES += \
68 $(man_MANS) \
69 $(MANPAGES_HTML)
70
71EXTRA_DIST += \
72 $(MANPAGES_XML) \
73 man/custom-html.xsl
74
75XSLTPROC_FLAGS = \
76 --nonet \
77 --stringparam man.output.quietly 1 \
78 --stringparam funcsynopsis.style ansi \
79 --stringparam man.th.extra1.suppress 1 \
80 --stringparam man.authors.section.enabled 1 \
81 --stringparam man.copyright.section.enabled 1
82
83XSLTPROC_COMMAND_MAN = \
84 $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) \
85 http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
86
87XSLTPROC_COMMAND_HTML = \
88 $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-html.xsl $<
89
90man/%.1: man/%.xml
91 $(XSLTPROC_COMMAND_MAN)
92
93man/%.5: man/%.xml
94 $(XSLTPROC_COMMAND_MAN)
95
96man/%.html: man/%.xml man/custom-html.xsl
97 $(XSLTPROC_COMMAND_HTML)
2fa4467d
JS
98endif
99
100# ------------------------------------------------------------------------------
101
102substitutions = \
103 '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
104 '|PACKAGE_VERSION=$(PACKAGE_VERSION)|'
105
106SED_PROCESS = \
107 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
108 $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
109 < $< > $@
110
111nitsi: nitsi.in Makefile
9a27a648 112 $(SED_PROCESS)