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