mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
Simplify the doc Makefile tremendously
This commit is contained in:
parent
857138d391
commit
32238b625f
113
doc/Makefile
113
doc/Makefile
@ -56,69 +56,36 @@ IMPORT_FEATURES_CONF = $(top_srcdir)/doc/tools/import-features.conf
|
||||
MAKE_ELINKS_MANPAGE = $(top_srcdir)/doc/tools/make-elinks-manpage
|
||||
MAKE_ELINKSKEYS_MANPAGE = $(top_srcdir)/doc/tools/make-elinkskeys-manpage
|
||||
|
||||
ifeq ($(CONFIG_ASCIIDOC),yes)
|
||||
HTML_DOCS_WITH_ASCIIDOC = \
|
||||
$(HTML_DIR)/elinks.1.html \
|
||||
$(HTML_DIR)/elinkskeys.5.html \
|
||||
$(HTML_DIR)/hacking.html \
|
||||
$(HTML_DIR)/manual.html
|
||||
endif
|
||||
HTML_DOCS-$(CONFIG_ASCIIDOC) += \
|
||||
elinks.1.html \
|
||||
elinkskeys.5.html \
|
||||
hacking.html \
|
||||
manual.html
|
||||
|
||||
HTML_DOCS-$(CONFIG_XMLTO) += \
|
||||
manual.html-chunked
|
||||
|
||||
HTML_DOCS-$(CONFIG_POD2HTML) += \
|
||||
perl.html \
|
||||
perl-hooks.html
|
||||
|
||||
MAN_DOCS-$(CONFIG_XMLTO) += \
|
||||
man1/elinks.1.in \
|
||||
man5/elinkskeys.5
|
||||
|
||||
# Only jw is used for generating PDF.
|
||||
ifeq ($(CONFIG_XMLTO),yes)
|
||||
HTML_DOCS_WITH_XMLTO = \
|
||||
$(HTML_DIR)/manual.html-chunked
|
||||
PDF_DOCS-$(CONFIG_JW) += \
|
||||
manual.pdf
|
||||
|
||||
MAN_DOCS_WITH_XMLTO = \
|
||||
$(MAN_DIR)/man1/elinks.1.in \
|
||||
$(MAN_DIR)/man5/elinkskeys.5
|
||||
endif
|
||||
MAN_DOCS += man5/elinks.conf.5
|
||||
|
||||
# Only jw is used for generating PDF.
|
||||
ifeq ($(CONFIG_JW),yes)
|
||||
PDF_DOCS_WITH_JW = \
|
||||
$(PDF_DIR)/manual.pdf
|
||||
endif
|
||||
MAN_DOCS += $(MAN_DOCS-yes)
|
||||
HTML_DOCS += $(HTML_DOCS-yes)
|
||||
PDF_DOCS += $(PDF_DOCS-yes)
|
||||
|
||||
ifeq ($(CONFIG_POD2HTML),yes)
|
||||
HTML_DOCS_WITH_POD2HTML = \
|
||||
$(HTML_DIR)/perl.html \
|
||||
$(HTML_DIR)/perl-hooks.html
|
||||
endif
|
||||
|
||||
MAN_DOCS_WITH_SHELL = $(MAN_DIR)/man5/elinks.conf.5
|
||||
|
||||
MAN_DOCS = \
|
||||
$(MAN_DOCS_WITH_SHELL)
|
||||
$(MAN_DOCS_WITH_ASCIIDOC)
|
||||
|
||||
HTML_DOCS = \
|
||||
$(HTML_DOCS_WITH_ASCIIDOC) \
|
||||
$(HTML_DOCS_WITH_POD2HTML) \
|
||||
$(HTML_DOCS_WITH_JW)
|
||||
|
||||
PDF_DOCS = \
|
||||
$(PDF_DOCS_WITH_JW)
|
||||
|
||||
html-asciidoc-yes: doc-dirs $(HTML_DOCS_WITH_ASCIIDOC)
|
||||
html-asciidoc-no:
|
||||
|
||||
html-pod2html-yes: doc-dirs $(HTML_DOCS_WITH_POD2HTML)
|
||||
html-pod2html-no:
|
||||
|
||||
html-xmlto-yes: doc-dirs $(HTML_DOCS_WITH_XMLTO)
|
||||
html-xmlto-no:
|
||||
|
||||
man-xmlto-yes: doc-dirs $(MAN_DOCS_WITH_XMLTO)
|
||||
man-xmlto-no:
|
||||
|
||||
pdf-jw-yes: doc-dirs $(PDF_DOCS_WITH_JW)
|
||||
pdf-jw-no:
|
||||
|
||||
man-docs: man-xmlto-$(CONFIG_XMLTO) $(MAN_DOCS_WITH_SHELL)
|
||||
html-docs: html-asciidoc-$(CONFIG_ASCIIDOC) html-xmlto-$(CONFIG_XMLTO) html-pod2html-$(CONFIG_POD2HTML)
|
||||
pdf-docs: pdf-jw-$(CONFIG_JW)
|
||||
man-docs: doc-dirs $(addprefix $(MAN_DIR)/,$(MAN_DOCS))
|
||||
html-docs: doc-dirs $(addprefix $(HTML_DIR)/,$(HTML_DOCS))
|
||||
pdf-docs: doc-dirs $(addprefix $(PDF_DIR)/,$(PDF_DOCS))
|
||||
|
||||
all-docs: man-docs html-docs pdf-docs
|
||||
|
||||
@ -135,36 +102,36 @@ clean-local:
|
||||
|
||||
# Autogenerated asciidoc files.
|
||||
|
||||
$(TXT_DIR)/import-features.conf.txt: $(FEATURES) doc-dirs $(IMPORT_FEATURES_CONF)
|
||||
$(TXT_DIR)/import-features.conf.txt: $(FEATURES) $(IMPORT_FEATURES_CONF)
|
||||
$(IMPORT_FEATURES_CONF) > $@
|
||||
|
||||
$(TXT_DIR)/elinks.1.%.txt: $(MAKE_ELINKS_MANPAGE) doc-dirs $(ELINKS)
|
||||
$(TXT_DIR)/elinks.1.%.txt: $(MAKE_ELINKS_MANPAGE) $(ELINKS)
|
||||
$(MAKE_ELINKS_MANPAGE) $@ $(ELINKS) $(HELP2DOC) > $@
|
||||
|
||||
$(TXT_DIR)/elinkskeys.5.%.txt: $(MAKE_ELINKSKEYS_MANPAGE) doc-dirs $(KBDBIND)
|
||||
$(TXT_DIR)/elinkskeys.5.%.txt: $(MAKE_ELINKSKEYS_MANPAGE) $(KBDBIND)
|
||||
$(MAKE_ELINKSKEYS_MANPAGE) $@ $(KBDBIND) > $@
|
||||
|
||||
|
||||
# Man Pages
|
||||
|
||||
$(XML_DIR)/%.man.xml: $(TXT_DIR)/%.man.txt doc-dirs
|
||||
$(XML_DIR)/%.man.xml: $(TXT_DIR)/%.man.txt
|
||||
$(ASCIIDOC) -b docbook -d manpage -o $@ $<
|
||||
|
||||
$(MAN_DIR)/man1/elinks.1.in: $(XML_DIR)/elinks.1.man.xml doc-dirs
|
||||
$(MAN_DIR)/man1/elinks.1.in: $(XML_DIR)/elinks.1.man.xml
|
||||
$(XMLTO) -o $(MAN_DIR)/man1 man $<
|
||||
mv $(MAN_DIR)/man1/elinks.1 $@
|
||||
|
||||
$(MAN_DIR)/man5/elinkskeys.5: $(XML_DIR)/elinkskeys.5.man.xml doc-dirs
|
||||
$(MAN_DIR)/man5/elinkskeys.5: $(XML_DIR)/elinkskeys.5.man.xml
|
||||
$(XMLTO) -o $(MAN_DIR)/man5 man $<
|
||||
sed -e 's/\\fI\\fR'\''/\\fI\\'\''\\fR/' < $@ > $@.tmp
|
||||
mv $@.tmp $@
|
||||
|
||||
$(MAN_DIR)/man5/elinks.conf.5: doc-dirs $(ELINKS)
|
||||
$(MAN_DIR)/man5/elinks.conf.5: $(ELINKS)
|
||||
$(HELP2DOC) --elinks=$(ELINKS) --elinksconf > $@
|
||||
|
||||
# XHTML/CSS Man Pages
|
||||
|
||||
$(HTML_DIR)/%.html: $(TXT_DIR)/%.html.txt doc-dirs
|
||||
$(HTML_DIR)/%.html: $(TXT_DIR)/%.html.txt
|
||||
$(ASCIIDOC) -b xhtml11 -d manpage -o $@ $<
|
||||
|
||||
# The Manual
|
||||
@ -174,28 +141,28 @@ MANUAL_EXTRA_FILES = \
|
||||
$(TXT_DIR)/elinks.1.html.txt \
|
||||
$(TXT_DIR)/elinkskeys.5.html.txt
|
||||
|
||||
$(HTML_DIR)/manual.html: $(MANUAL_FILES) doc-dirs $(MANUAL_EXTRA_FILES)
|
||||
$(HTML_DIR)/manual.html: $(MANUAL_FILES) $(MANUAL_EXTRA_FILES)
|
||||
$(ASCIIDOC) -b xhtml11 -d book -o $@ -n $<
|
||||
|
||||
$(HTML_DIR)/hacking.html: $(top_srcdir)/doc/hacking.txt doc-dirs
|
||||
$(HTML_DIR)/hacking.html: $(top_srcdir)/doc/hacking.txt
|
||||
$(ASCIIDOC) -b xhtml11 -d book -o $@ -n $<
|
||||
|
||||
$(HTML_DIR)/dev-intro.html: $(top_srcdir)/doc/dev-intro.txt doc-dirs
|
||||
$(HTML_DIR)/dev-intro.html: $(top_srcdir)/doc/dev-intro.txt
|
||||
$(ASCIIDOC) -b xhtml11 -d book -o $@ -n $<
|
||||
|
||||
$(XML_DIR)/manual.xml: $(MANUAL_FILES) doc-dirs $(MANUAL_EXTRA_FILES)
|
||||
$(XML_DIR)/manual.xml: $(MANUAL_FILES) $(MANUAL_EXTRA_FILES)
|
||||
$(ASCIIDOC) -b docbook -d book -o $@ $<
|
||||
|
||||
$(HTML_DIR)/manual.html-chunked: $(XML_DIR)/manual.xml doc-dirs
|
||||
$(HTML_DIR)/manual.html-chunked: $(XML_DIR)/manual.xml
|
||||
$(XMLTO) -o $@ html $<
|
||||
|
||||
$(PDF_DIR)/manual.pdf: $(XML_DIR)/manual.xml doc-dirs
|
||||
$(PDF_DIR)/manual.pdf: $(XML_DIR)/manual.xml
|
||||
$(JW) -o $(PDF_DIR) -b pdf $<
|
||||
|
||||
$(HTML_DIR)/perl.html: $(top_srcdir)/doc/perl.pod doc-dirs
|
||||
$(HTML_DIR)/perl.html: $(top_srcdir)/doc/perl.pod
|
||||
$(POD2HTML) --outfile=$@ < $<
|
||||
|
||||
$(HTML_DIR)/perl-hooks.html: $(top_srcdir)/contrib/perl/hooks.pl doc-dirs
|
||||
$(HTML_DIR)/perl-hooks.html: $(top_srcdir)/contrib/perl/hooks.pl
|
||||
$(POD2HTML) --outfile=$@ < $<
|
||||
|
||||
include $(top_srcdir)/Makefile.lib
|
||||
|
Loading…
Reference in New Issue
Block a user