1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

Various minor improvements

This commit is contained in:
Jonas Fonseca 2006-01-12 10:29:05 +01:00 committed by Jonas Fonseca
parent aa7d65fb79
commit aef863da96
5 changed files with 23 additions and 14 deletions

1
doc/.gitignore vendored
View File

@ -1,4 +1,5 @@
api api
web
*.tmp *.tmp
*.html *.html
*.pdf *.pdf

View File

@ -111,21 +111,15 @@ api-dir:
txt: $(addprefix $(srcdir),$(TXT_DOCS)) txt: $(addprefix $(srcdir),$(TXT_DOCS))
html: txt $(HTML_DOCS) html: txt $(HTML_DOCS)
pdf: txt $(PDF_DOCS) pdf: txt $(PDF_DOCS)
man: txt $(MAN_DOCS) man-update man: txt $(MAN_DOCS)
api: api-dir $(API_DOCS) api: api-dir $(API_DOCS)
all-docs: man html pdf all-docs: man html pdf
man-update: $(MAN_DOCS) update-man: man
@test "$(CONFIG_XMLTO)" = yes && \ $(call cmd,installdata,$(srcdir)elinks.1,man/man1/elinks.1.in)
sed 's/^\.TH "ELINKS" 1 .*/.TH "ELINKS" 1 "The ELinks text-browser" "$(shell date -I)" "The ELinks text-browser"/' \ $(call cmd,installdata,$(srcdir)elinkskeys.5,man/man5/)
< elinks.1 > $(srcdir)man/man1/elinks.1.in && \ $(call cmd,installdata,$(srcdir)elinks.conf.5,man/man5/)
$(RM) $(MAN_DIR)/man1/elinks.1
@test "$(CONFIG_XMLTO)" = yes && \
sed -e 's/\\fI\\fR'\''/\\fI\\'\''\\fR/' < elinkskeys.5 | \
sed 's/^\.TH "ELINKSKEYS" 5 .*/.TH "ELINKSKEYS" 5 "ELinks keybindings" "$(shell date -I)" "ELinks keybindings"/' \
> $(srcdir)man/man5/elinkskeys.5
@$(INSTALL) elinks.conf.5 $(srcdir)man/man5
clean-local: clean-local:
@$(RM) -r api $(GEN_TXT_DOCS) $(MAN_DOCS) $(HTML_DOCS) $(PDF_DOCS) *.tmp @$(RM) -r api $(GEN_TXT_DOCS) $(MAN_DOCS) $(HTML_DOCS) $(PDF_DOCS) *.tmp
@ -134,6 +128,9 @@ clean-local:
# FIXME: Keep generated .txt files relative to the source directory and files # FIXME: Keep generated .txt files relative to the source directory and files
# they are included in. # they are included in.
quiet_cmd_help2doc = ' [$(LINK_COLOR)HELP2DOC$(END_COLOR)] $(RELPATH)$@'
cmd_help2doc = $(LOCALES) $(HELP2DOC) $(ELINKS) $@ > $@
import-features.conf.txt: $(FEATURES) $(IMPORT_FEATURES_CONF) import-features.conf.txt: $(FEATURES) $(IMPORT_FEATURES_CONF)
$(IMPORT_FEATURES_CONF) > $@ $(IMPORT_FEATURES_CONF) > $@
@ -142,7 +139,7 @@ keymap-defaults.txt keymap-actions.txt: $(MAKE_ELINKSKEYS_MANPAGE) $(KBDBIND)
$(LOCALES) $(srcdir)tools/make-elinkskeys-manpage $(KBDBIND) $(LOCALES) $(srcdir)tools/make-elinkskeys-manpage $(KBDBIND)
option-%.txt: $(ELINKS) $(HELP2DOC) option-%.txt: $(ELINKS) $(HELP2DOC)
$(LOCALES) $(HELP2DOC) $(ELINKS) $@ > $@ $(call cmd,help2doc)
## Default build rules ## Default build rules
# #
@ -161,6 +158,11 @@ quiet_cmd_pod2html = ' [$(LINK_COLOR)POD2HTML$(END_COLOR)] $(RELPATH)$@'
doctype = $(if $(findstring .1.,$(1)),manpage,$(if $(findstring .5.,$(1)),manpage,book)) doctype = $(if $(findstring .1.,$(1)),manpage,$(if $(findstring .5.,$(1)),manpage,book))
MAN_DATE = $(shell date -I)
man_desc = `sed -n 's/:Description:\s*\(.*\)/\1/p' < $(subst .xml,.txt,$<)`
man_hack = sed "s/^\(\.TH \"ELINKS[^\"]*\" [0-9] \).*/\1\"$(1)\" \"$(MAN_DATE)\" \"$(1)\"/" < $@ | \
sed "s/@squote@/\\\\'/g" > $@.tmp && mv $@.tmp $@
%.html: %.txt asciidoc.conf %.html: %.txt asciidoc.conf
$(call cmd,asciidoc,xhtml11) $(call cmd,asciidoc,xhtml11)
@ -169,9 +171,11 @@ doctype = $(if $(findstring .1.,$(1)),manpage,$(if $(findstring .5.,$(1)),manpag
%.1: %.1.xml %.1: %.1.xml
$(call cmd,xmlto,man) $(call cmd,xmlto,man)
$(call man_hack,$(call man_desc))
%.5: %.5.xml %.5: %.5.xml
$(call cmd,xmlto,man) $(call cmd,xmlto,man)
$(call man_hack,$(call man_desc))
%.html-chunked: %.xml %.html-chunked: %.xml
$(call cmd,xmlto,html,-o $@) $(call cmd,xmlto,html,-o $@)

View File

@ -18,6 +18,9 @@
# Some macros can have optional {0} value, that is what # Some macros can have optional {0} value, that is what
# the {0%...} and {0#...} handles. # the {0%...} and {0#...} handles.
[attributes]
squote=@squote@
############################################################################# #############################################################################
# DocBook # DocBook

View File

@ -98,6 +98,7 @@ do
# the desciption is over. # the desciption is over.
if test -z "$line" if test -z "$line"
then then
echo
parse_description= parse_description=
parse_int_option= parse_int_option=
continue continue

View File

@ -86,8 +86,8 @@ print_keymap_defaults()
key="Space" key="Space"
;; ;;
*) *)
key=$(echo "$key" | sed "s/^'\(.*\)'/\1/" \ key=$(echo "$key" | sed "s/^'\(.*\)'$/\1/" \
| sed "s/'/\\\\'/") | sed "s/'/{squote}/")
;; ;;
esac esac