2005-10-19 22:00:35 -04:00
|
|
|
top_builddir=..
|
|
|
|
include $(top_builddir)/Makefile.config
|
2005-09-15 09:58:31 -04:00
|
|
|
|
|
|
|
SUBDIRS = man
|
|
|
|
|
|
|
|
HTML_DIR = $(DESTDIR)html
|
|
|
|
MAN_DIR = $(DESTDIR)man
|
|
|
|
PDF_DIR = $(DESTDIR)pdf
|
|
|
|
XML_DIR = $(DESTDIR)xml
|
|
|
|
|
|
|
|
# Keep generated .txt files relative to the source directory
|
|
|
|
# and files they are included in.
|
|
|
|
TXT_DIR = $(top_srcdir)/doc/txt
|
|
|
|
|
|
|
|
DOC_DIRS = \
|
|
|
|
$(HTML_DIR) \
|
2006-01-08 17:44:59 -05:00
|
|
|
$(HTML_DIR)/api \
|
2005-09-15 09:58:31 -04:00
|
|
|
$(MAN_DIR)/man1 \
|
|
|
|
$(MAN_DIR)/man5 \
|
|
|
|
$(TXT_DIR) \
|
|
|
|
$(XML_DIR)
|
|
|
|
|
|
|
|
# TODO: perl.pod should be pod2ized during make install. --pasky
|
|
|
|
|
|
|
|
# XXX: manual.txt is the master document and must be first.
|
|
|
|
MANUAL_FILES = \
|
|
|
|
manual.txt \
|
|
|
|
\
|
|
|
|
bookmarks.txt \
|
|
|
|
ecmascript.txt \
|
|
|
|
exmode.txt \
|
|
|
|
faq.txt \
|
|
|
|
installation.txt \
|
|
|
|
introduction.txt \
|
|
|
|
lua-scripting.txt \
|
|
|
|
mailcap.txt \
|
|
|
|
marks.txt \
|
|
|
|
mime.txt \
|
|
|
|
remote.txt \
|
|
|
|
small.txt \
|
|
|
|
tabs.txt \
|
|
|
|
terminals.txt \
|
|
|
|
urlshortcuts.txt
|
|
|
|
|
|
|
|
### Script Dependencies
|
|
|
|
#
|
|
|
|
|
|
|
|
ELINKS = $(top_builddir)/src/elinks
|
|
|
|
KBDBIND = $(top_srcdir)/src/config/kbdbind.c
|
|
|
|
FEATURES = $(top_srcdir)/features.conf
|
|
|
|
|
|
|
|
### Scripts
|
|
|
|
#
|
|
|
|
|
2006-01-08 17:44:59 -05:00
|
|
|
CODE2DOC = $(top_srcdir)/doc/tools/code2doc
|
2005-09-15 09:58:31 -04:00
|
|
|
HELP2DOC = $(top_srcdir)/doc/tools/help2doc
|
|
|
|
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
|
|
|
|
|
2006-01-08 15:46:21 -05:00
|
|
|
HTML_DOCS-$(CONFIG_ASCIIDOC) += \
|
2006-01-08 17:44:59 -05:00
|
|
|
api/dom-sgml-parser.html \
|
2006-01-08 15:57:55 -05:00
|
|
|
elinks.1.html \
|
|
|
|
elinkskeys.5.html \
|
|
|
|
hacking.html \
|
|
|
|
manual.html
|
2005-09-15 09:58:31 -04:00
|
|
|
|
2006-01-08 15:46:21 -05:00
|
|
|
HTML_DOCS-$(CONFIG_XMLTO) += \
|
2006-01-08 15:57:55 -05:00
|
|
|
manual.html-chunked
|
|
|
|
|
|
|
|
HTML_DOCS-$(CONFIG_POD2HTML) += \
|
|
|
|
perl.html \
|
|
|
|
perl-hooks.html
|
2005-09-15 09:58:31 -04:00
|
|
|
|
2006-01-08 15:46:21 -05:00
|
|
|
MAN_DOCS-$(CONFIG_XMLTO) += \
|
2006-01-08 15:57:55 -05:00
|
|
|
man1/elinks.1.in \
|
|
|
|
man5/elinkskeys.5
|
2005-09-15 22:38:48 -04:00
|
|
|
|
2005-09-15 09:58:31 -04:00
|
|
|
# Only jw is used for generating PDF.
|
2006-01-08 15:46:21 -05:00
|
|
|
PDF_DOCS-$(CONFIG_JW) += \
|
2006-01-08 15:57:55 -05:00
|
|
|
manual.pdf
|
2005-09-15 09:58:31 -04:00
|
|
|
|
2006-01-08 15:57:55 -05:00
|
|
|
MAN_DOCS += man5/elinks.conf.5
|
2005-09-15 09:58:31 -04:00
|
|
|
|
2006-01-08 15:46:21 -05:00
|
|
|
MAN_DOCS += $(MAN_DOCS-yes)
|
|
|
|
HTML_DOCS += $(HTML_DOCS-yes)
|
|
|
|
PDF_DOCS += $(PDF_DOCS-yes)
|
2005-09-15 09:58:31 -04:00
|
|
|
|
2006-01-08 17:15:47 -05:00
|
|
|
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))
|
2005-09-15 09:58:31 -04:00
|
|
|
|
|
|
|
all-docs: man-docs html-docs pdf-docs
|
|
|
|
|
|
|
|
### Build Rules
|
|
|
|
#
|
|
|
|
|
|
|
|
doc-dirs:
|
|
|
|
$(INSTALL) -d $(DOC_DIRS)
|
|
|
|
|
|
|
|
# $(MAN_DIR) intentionally left out
|
2005-09-27 15:11:28 -04:00
|
|
|
clean-local:
|
2005-12-15 04:04:26 -05:00
|
|
|
@$(RM) -r $(HTML_DIR) $(XML_DIR) $(TXT_DIR) $(PDF_DIR) *.tmp
|
2005-09-15 09:58:31 -04:00
|
|
|
|
|
|
|
|
|
|
|
# Autogenerated asciidoc files.
|
|
|
|
|
2006-01-08 16:33:26 -05:00
|
|
|
$(TXT_DIR)/import-features.conf.txt: $(FEATURES) $(IMPORT_FEATURES_CONF)
|
2005-09-15 09:58:31 -04:00
|
|
|
$(IMPORT_FEATURES_CONF) > $@
|
|
|
|
|
2006-01-08 16:33:26 -05:00
|
|
|
$(TXT_DIR)/elinks.1.%.txt: $(MAKE_ELINKS_MANPAGE) $(ELINKS)
|
2005-09-15 09:58:31 -04:00
|
|
|
$(MAKE_ELINKS_MANPAGE) $@ $(ELINKS) $(HELP2DOC) > $@
|
|
|
|
|
2006-01-08 16:33:26 -05:00
|
|
|
$(TXT_DIR)/elinkskeys.5.%.txt: $(MAKE_ELINKSKEYS_MANPAGE) $(KBDBIND)
|
2005-09-15 09:58:31 -04:00
|
|
|
$(MAKE_ELINKSKEYS_MANPAGE) $@ $(KBDBIND) > $@
|
|
|
|
|
|
|
|
|
|
|
|
# Man Pages
|
|
|
|
|
2006-01-08 16:33:26 -05:00
|
|
|
$(XML_DIR)/%.man.xml: $(TXT_DIR)/%.man.txt
|
2005-09-15 09:58:31 -04:00
|
|
|
$(ASCIIDOC) -b docbook -d manpage -o $@ $<
|
|
|
|
|
2006-01-08 16:33:26 -05:00
|
|
|
$(MAN_DIR)/man1/elinks.1.in: $(XML_DIR)/elinks.1.man.xml
|
2005-09-15 09:58:31 -04:00
|
|
|
$(XMLTO) -o $(MAN_DIR)/man1 man $<
|
|
|
|
mv $(MAN_DIR)/man1/elinks.1 $@
|
|
|
|
|
2006-01-08 16:33:26 -05:00
|
|
|
$(MAN_DIR)/man5/elinkskeys.5: $(XML_DIR)/elinkskeys.5.man.xml
|
2005-09-15 09:58:31 -04:00
|
|
|
$(XMLTO) -o $(MAN_DIR)/man5 man $<
|
|
|
|
sed -e 's/\\fI\\fR'\''/\\fI\\'\''\\fR/' < $@ > $@.tmp
|
|
|
|
mv $@.tmp $@
|
|
|
|
|
2006-01-08 16:33:26 -05:00
|
|
|
$(MAN_DIR)/man5/elinks.conf.5: $(ELINKS)
|
2005-09-15 09:58:31 -04:00
|
|
|
$(HELP2DOC) --elinks=$(ELINKS) --elinksconf > $@
|
|
|
|
|
|
|
|
# XHTML/CSS Man Pages
|
|
|
|
|
2006-01-08 16:33:26 -05:00
|
|
|
$(HTML_DIR)/%.html: $(TXT_DIR)/%.html.txt
|
2005-09-15 09:58:31 -04:00
|
|
|
$(ASCIIDOC) -b xhtml11 -d manpage -o $@ $<
|
|
|
|
|
|
|
|
# The Manual
|
|
|
|
|
|
|
|
MANUAL_EXTRA_FILES = \
|
|
|
|
$(TXT_DIR)/import-features.conf.txt \
|
|
|
|
$(TXT_DIR)/elinks.1.html.txt \
|
|
|
|
$(TXT_DIR)/elinkskeys.5.html.txt
|
|
|
|
|
2006-01-08 16:33:26 -05:00
|
|
|
$(HTML_DIR)/manual.html: $(MANUAL_FILES) $(MANUAL_EXTRA_FILES)
|
2005-09-15 09:58:31 -04:00
|
|
|
$(ASCIIDOC) -b xhtml11 -d book -o $@ -n $<
|
|
|
|
|
2006-01-08 16:33:26 -05:00
|
|
|
$(HTML_DIR)/hacking.html: $(top_srcdir)/doc/hacking.txt
|
2005-09-15 09:58:31 -04:00
|
|
|
$(ASCIIDOC) -b xhtml11 -d book -o $@ -n $<
|
|
|
|
|
2006-01-08 16:33:26 -05:00
|
|
|
$(HTML_DIR)/dev-intro.html: $(top_srcdir)/doc/dev-intro.txt
|
2005-09-15 09:58:31 -04:00
|
|
|
$(ASCIIDOC) -b xhtml11 -d book -o $@ -n $<
|
|
|
|
|
2006-01-08 16:33:26 -05:00
|
|
|
$(XML_DIR)/manual.xml: $(MANUAL_FILES) $(MANUAL_EXTRA_FILES)
|
2005-09-15 09:58:31 -04:00
|
|
|
$(ASCIIDOC) -b docbook -d book -o $@ $<
|
|
|
|
|
2006-01-08 16:33:26 -05:00
|
|
|
$(HTML_DIR)/manual.html-chunked: $(XML_DIR)/manual.xml
|
2005-09-15 09:58:31 -04:00
|
|
|
$(XMLTO) -o $@ html $<
|
|
|
|
|
2006-01-08 16:33:26 -05:00
|
|
|
$(PDF_DIR)/manual.pdf: $(XML_DIR)/manual.xml
|
2005-09-15 09:58:31 -04:00
|
|
|
$(JW) -o $(PDF_DIR) -b pdf $<
|
|
|
|
|
2006-01-08 16:33:26 -05:00
|
|
|
$(HTML_DIR)/perl.html: $(top_srcdir)/doc/perl.pod
|
2005-09-15 09:58:31 -04:00
|
|
|
$(POD2HTML) --outfile=$@ < $<
|
|
|
|
|
2006-01-08 16:33:26 -05:00
|
|
|
$(HTML_DIR)/perl-hooks.html: $(top_srcdir)/contrib/perl/hooks.pl
|
2005-09-15 09:58:31 -04:00
|
|
|
$(POD2HTML) --outfile=$@ < $<
|
2005-09-15 22:38:48 -04:00
|
|
|
|
2006-01-08 17:44:59 -05:00
|
|
|
## API Docs
|
|
|
|
#
|
|
|
|
|
|
|
|
$(HTML_DIR)/api/dom-sgml-parser.html: $(top_srcdir)/src/dom/sgml/parser.h
|
|
|
|
$(CODE2DOC) $< | $(ASCIIDOC) -f code2doc.conf -b xhtml11 -d book -o $@ -n -
|
|
|
|
|
2005-10-19 19:11:47 -04:00
|
|
|
include $(top_srcdir)/Makefile.lib
|