]> git.ipfire.org Git - nitsi.git/blame_incremental - Makefile.am
Add configure.ac and Makefile.am and make them work
[nitsi.git] / Makefile.am
... / ...
CommitLineData
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
19
20AM_V_XSLT = $(AM_V_XSLT_$(V))
21AM_V_XSLT_ = $(AM_V_XSLT_$(AM_DEFAULT_VERBOSITY))
22AM_V_XSLT_0 = @echo " XSLT " $@;
23
24bin_SCRIPTS = \
25 nitsi
26
27CLEANFILES += \
28 nitsi
29
30nitsi_PYTHON = \
31 src/nitsi/__init__.py \
32 src/nitsi/disk.py \
33 src/nitsi/machine.py \
34 src/nitsi/network.py \
35 src/nitsi/recipe.py \
36 src/nitsi/serial_connection.py \
37 src/nitsi/test.py \
38 src/nitsi/virtual_environ.py
39
40
41nitsidir = $(pythondir)/nitsi
42
43# ------------------------------------------------------------------------------
44
45.PHONY: man
46man: $(MANPAGES) $(MANPAGES_HTML)
47
48if ENABLE_MANPAGES
49MANPAGES = \
50 man/nitsi.1
51
52MANPAGES_XML = $(patsubst %.1,%.xml,$(patsubst %.5,%.xml,$(MANPAGES)))
53MANPAGES_HTML = $(patsubst %.xml,%.html,$(MANPAGES_XML))
54
55man_MANS = \
56 $(MANPAGES)
57
58noinst_DATA += \
59 $(MANPAGES_HTML)
60
61CLEANFILES += \
62 $(man_MANS) \
63 $(MANPAGES_HTML)
64
65EXTRA_DIST += \
66 $(MANPAGES_XML) \
67 man/custom-html.xsl
68
69XSLTPROC_FLAGS = \
70 --nonet \
71 --stringparam man.output.quietly 1 \
72 --stringparam funcsynopsis.style ansi \
73 --stringparam man.th.extra1.suppress 1 \
74 --stringparam man.authors.section.enabled 1 \
75 --stringparam man.copyright.section.enabled 1
76
77XSLTPROC_COMMAND_MAN = \
78 $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) \
79 http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
80
81XSLTPROC_COMMAND_HTML = \
82 $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-html.xsl $<
83
84man/%.1: man/%.xml
85 $(XSLTPROC_COMMAND_MAN)
86
87man/%.5: man/%.xml
88 $(XSLTPROC_COMMAND_MAN)
89
90man/%.html: man/%.xml man/custom-html.xsl
91 $(XSLTPROC_COMMAND_HTML)
92
93endif
94
95# ------------------------------------------------------------------------------
96
97substitutions = \
98 '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
99 '|PACKAGE_VERSION=$(PACKAGE_VERSION)|'
100
101SED_PROCESS = \
102 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
103 $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
104 < $< > $@
105
106nitsi: nitsi.in Makefile
107 $(SED_PROCESS)