1## Process this file with automake to produce Makefile.in
2info_TEXINFOS = sed.texi
3sed_TEXINFOS = config.texi version.texi
4dist_man_MANS = sed.1
5dist_noinst_DATA = sed.x sed-in.texi pcre.html
6dist_noinst_SCRIPTS = groupify.sed
7CLEANFILES = sed.html
8TEXI2DVI = $(top_srcdir)/config/texi2dvi --expand
9HELP2MAN = $(top_srcdir)/config/help2man
10SED = $(top_builddir)/sed/sed
11
12# To produce better quality output, in the example sed
13# scripts we group comments with lines following them;
14# since mantaining the "@group...@end group" manually
15# is a burden, we do this automatically
16$(srcdir)/sed.texi: sed-in.texi $(srcdir)/groupify.sed
17	sed -nf $(srcdir)/groupify.sed \
18	  < $(srcdir)/sed-in.texi > $(srcdir)/sed.texi
19
20sed.1: $(top_srcdir)/sed/sed.c $(top_srcdir)/configure.ac $(srcdir)/sed.x
21	$(HELP2MAN) -p sed --include $(srcdir)/sed.x $(SED) > $(srcdir)/sed.1
22
23dist-hook:
24	touch $(distdir)/sed.1
25
26# This rule is used if --enable-html is passed
27if BUILD_HTML
28docdir = $(datadir)/doc
29doc_DATA = sed.html
30
31all: html
32
33html: sed.html
34
35.PHONY: html
36endif
37
38# Having a dependancy on sed.info automatically makes
39# sed.html dependant on sed.texi and all the included
40# sources
41if MAKEINFO_HTML
42sed.html: sed.texi sed.info
43	builddir=`pwd` && cd $(srcdir) && \
44	  $(MAKEINFO) --html --no-split -o $$builddir/sed.html sed.texi
45endif
46
47# These rules are used together with TEXI2HTML
48if TEXI2HTML_HTML
49sed.html: sed.texi sed.info
50	cp $(srcdir)/*.texi . && \
51	  $(TEXI2HTML) sed.texi && \
52	  rn *.texi
53endif
54