1 CG_IGNORE
=$(wildcard ..
/cg-X
* ..
/cg-
*.
*)
2 CG_SRC
=$(filter-out $(CG_IGNORE
), $(wildcard ..
/cg
*))
6 MAN1_TXT
=$(patsubst ..
/cg
%,cg
%.1.txt
,$(CG_SRC
))
7 MAN7_TXT
=$(PACKAGE
).7.txt cg-ref
.7.txt
9 DOC_HTML
=$(patsubst %.txt
,%.html
,$(MAN1_TXT
) $(MAN7_TXT
)) cg-ref.html introduction.html
11 DOC_MAN1
=$(patsubst %.txt
,%,$(MAN1_TXT
))
12 DOC_MAN7
=$(patsubst %.txt
,%,$(MAN7_TXT
))
14 DOC_PDF
=$(patsubst %.txt
,%.pdf
,$(MAN1_TXT
) $(MAN7_TXT
)) cg-ref.pdf introduction.pdf
20 docdir
=$(prefix)/share
/doc
/$(PACKAGE
)
22 htmldir
=$(docdir
)/html
27 # Please note that there is a minor bug in asciidoc.
28 # The version after 6.0.3 _will_ include the patch found here:
29 # http://marc.theaimsgroup.com/?l=git&m=111558757202243&w=2
31 # Until that version is released you may have to apply the patch
32 # yourself - yes, all 6 characters of it!
51 $(INSTALL
) -m755
-d
$(DESTDIR
)/$(txtdir
)
52 $(INSTALL
) $(MAN1_TXT
) $(MAN7_TXT
) $(DESTDIR
)/$(txtdir
)
53 $(INSTALL
) -m755
-d
$(DESTDIR
)/$(man1
) $(DESTDIR
)/$(man7
)
54 $(INSTALL
) $(DOC_MAN1
) $(DESTDIR
)/$(man1
)
55 $(INSTALL
) $(DOC_MAN7
) $(DESTDIR
)/$(man7
)
58 $(INSTALL
) -m755
-d
$(DESTDIR
)/$(htmldir
)
59 $(INSTALL
) $(DOC_HTML
) $(DESTDIR
)/$(htmldir
)
62 $(MAKE
) -C tutorial-script
test
65 $(MAKE
) -C tutorial-script
clean
66 rm -f
*.xml
*.html
*.pdf
*.1 *.7 cg
*.
[17].txt
$(PACKAGE
).7.txt
68 .PRECIOUS
: cg
%.txt introduction.txt
71 asciidoc
-b xhtml11
-d manpage
-f asciidoc.conf
$<
74 asciidoc
-b xhtml11
-d manpage
-f asciidoc.conf
$<
77 asciidoc
-b xhtml11
-d article
-f asciidoc.conf
-o
$@
$<
80 asciidoc
-b docbook
-d manpage
-f asciidoc.conf
$<
83 asciidoc
-b docbook
-d manpage
-f asciidoc.conf
$<
86 asciidoc
-b docbook
-d article
-f asciidoc.conf
$<
97 $(PACKAGE
).7.txt
: make-
$(PACKAGE
)-asciidoc
98 .
/make-
$(PACKAGE
)-asciidoc
> $@
100 cg-ref
.7.txt
: cg-ref.txt make-cg-ref-asciidoc
101 CGPACKAGE
=$(PACKAGE
) .
/make-cg-ref-asciidoc
$< > $@
103 # It seems that cg%.txt won't match this so use an explicit rule
104 cg
.1.txt
: ..
/cg make-cg-asciidoc
105 CGPACKAGE
=$(PACKAGE
) .
/make-cg-asciidoc
$< > $@
107 cg-
%.1.txt
: ..
/cg-
% make-cg-asciidoc
108 CGPACKAGE
=$(PACKAGE
) .
/make-cg-asciidoc
$< > $@
110 introduction.txt
: ..
/README
111 sed
-e
's/\([a-zA-Z0-9_-]*\)(\([0-9]\))/gitlink:\1[\2]/g' $< >$@