aboutsummaryrefslogtreecommitdiff
path: root/src/clients/accerso/Makefile.am
blob: 6be9fd7a6349f0e0313d440121c3a96fdfbe0a7c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
include $(top_srcdir)/misc/common-makefile.am

AM_CXXFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src \
	      @PALUDIS_CXXFLAGS@ @PALUDIS_CXXFLAGS_VISIBILITY@
DEFS= \
	-DSYSCONFDIR=\"$(sysconfdir)\" \
	-DDATADIR=\"$(datadir)\" \
	-DLIBEXECDIR=\"$(libexecdir)\" \
	-DLIBDIR=\"$(libdir)\"

SUBDIRS = .

bin_PROGRAMS = accerso
man_MANS = accerso.1

SUFFIXES = .1 .txt .xml .html-man-fragment

man_MANS_txts = accerso.txt
man_MANS_xmls = accerso.xml
man_MANS_html_man_fragments = accerso.html-man-fragment

if USE_PREBUILT_DOCUMENTATION
else

noinst_PROGRAMS = man-accerso

$(man_MANS_txts) : man-accerso
	if ! ./man-accerso `echo $@ | sed -e 's.^accerso-*..' -e 's,\.txt$$,,'` > $@ ; then rm -f $@ ; exit 1 ; fi

.txt.xml : $(man_MANS_txts)
	asciidoc --doctype=manpage --backend=docbook --out-file=$@ $<

.xml.1 : $(man_MANS_xmls)
	xmlto man $<

.xml.html-man-fragment : $(man_MANS_xmls)
	xmlto html $< -o $@-dir
	sed \
	    -e '1s,^.*\(<div class="refnamediv">\),\1,' \
	    -e '$$s,</body>.*,,' -e '$$s,</div><div class="navfooter"><hr></div>,,' \
	    -e 's,<a name="[^"]*"></a>,,g' \
	    $@-dir/index.html > $@
	rm -fr $@-dir

man_accerso_SOURCES = \
	man_accerso.cc \
	command_line.hh \
	command_line.cc

man_accerso_LDADD = \
	$(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
	$(top_builddir)/paludis/args/libpaludisargs_@PALUDIS_PC_SLOT@.la \
	$(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
	$(top_builddir)/src/output/liboutput.a \
	$(DYNAMIC_LD_LIBS)

endif

accerso_SOURCES = \
	command_line.hh      command_line.cc      \
	accerso.cc

accerso_LDADD = \
	$(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
	$(top_builddir)/paludis/args/libpaludisargs_@PALUDIS_PC_SLOT@.la \
	$(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
	$(top_builddir)/src/output/liboutput.a \
	$(DYNAMIC_LD_LIBS)

TESTS = version_TEST \
	help_TEST

noinst_DATA = $(man_MANS_html_man_fragments)

EXTRA_DIST = \
	$(man_MANS) \
	$(man_MANS_html_man_fragments) \
	$(TESTS)

DISTCLEANFILES = \
	$(man_MANS) \
	$(man_MANS_txts) \
	$(man_MANS_xmls) \
	$(man_MANS_html_man_fragments)