aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Mark Griffiths <mark@thebespokepixel.com>2014-08-03 02:25:47 +0100
committerGravatar Mark Griffiths <mark@thebespokepixel.com>2014-09-03 14:43:25 +0100
commitc900f23662a34599570ee54a36343c4136c58698 (patch)
treed81de0c02405d1a0cccef7d2d447aec49397fb30
parent7b093ee4b3fbbde30b7a29779e6e6210125f06f6 (diff)
Add lexicon filter to manpages.
Fixed manpage 'NAME'. Under Doxygen 1.8, the output format has changed, so the old sed script was leaving man pages with two titles.
-rw-r--r--Doxyfile.help16
-rw-r--r--Makefile.in11
-rwxr-xr-xbuild_tools/build_documentation.sh14
3 files changed, 23 insertions, 18 deletions
diff --git a/Doxyfile.help b/Doxyfile.help
index beda7bbb..74673382 100644
--- a/Doxyfile.help
+++ b/Doxyfile.help
@@ -241,9 +241,9 @@ ALIASES += "endfish=</pre>"
ALIASES += "asis{1}=\1"
ALIASES += "blah{1}=\1"
-ALIASES += "cmnd{1}=\1"
-ALIASES += "func{1}=\1"
-ALIASES += "sbin{1}=\1"
+ALIASES += "cmnd{1}=\b \1"
+ALIASES += "func{1}=\b \1"
+ALIASES += "sbin{1}=\b \1"
ALIASES += "args{1}=\1"
ALIASES += "opts{1}=\1"
ALIASES += "vars{1}=\1"
@@ -253,18 +253,18 @@ ALIASES += "fsfo{1}=\1"
ALIASES += "path{1}=\1"
ALIASES += "clrv{1}=\1"
-ALIASES += "strg{1}=<b>\1</b>"
+ALIASES += "strg{1}=\1"
ALIASES += "sglq{1}=\'\1\'"
ALIASES += "dblq{1}=\"\1\""
-ALIASES += "prmt{1}="
-ALIASES += "sgst{1}=<em>\1</em>"
+ALIASES += "prmt{1}=\1"
+ALIASES += "sgst{1}=\1"
ALIASES += "eror{1}=<b>\1</b>"
-ALIASES += "curs{1}=_"
+ALIASES += "curs{1}=\1"
ALIASES += "bold{1}=<b>\1</b>"
ALIASES += "emph{1}=<em>\1</em>"
-ALIASES += "undr{1}=<u>\1</u>"
+ALIASES += "undr{1}=<em>\1</em>"
ALIASES += "span{2}=\1"
ALIASES += "spcl{2}=\1"
diff --git a/Makefile.in b/Makefile.in
index 39cbd8d7..cd1c5738 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -277,7 +277,7 @@ doc_src/user_doc.css: doc_src/user_doc.css.in doc_src/fish_lexicon_filter
#
doc: *.h *.cpp doc.h Doxyfile
- (cat Doxyfile ; echo PROJECT_NUMBER=$(FISH_BUILD_VERSION)) | doxygen - ;
+ (cat Doxyfile; echo PROJECT_NUMBER=$(FISH_BUILD_VERSION)) | doxygen - ;
#
@@ -386,7 +386,7 @@ doc_src/fish_lexicon_filter: lexicon.txt doc_src/fish_lexicon_filter.in
# Clean the filter input comments and set the shebang as sed can reside in
# /bin or /usr/bin and some versions dont allow more than one comment!.
sed <$@.in >$@.tmp -e 's|@sed@|'"`command -v sed`"'|' -e '/^[ ]*#[^!]/d'
- # Scan through the lexicon, transforming each line to something usefue to Doxygen.
+ # Scan through the lexicon, transforming each line to something useful to Doxygen.
sed <lexicon.txt >>$@.tmp -n \
-e 's|^\([a-z][a-z][a-z][a-z]\) \([a-z_-]*\)$$|s,[[:<:]]\2[[:>:]],@\1{\2},g|p' \
-e '$$G;s/.*\n/b tidy/p'; \
@@ -493,11 +493,12 @@ common.o: $(COMMON_FILES)
# There ought to be something simpler.
#
-share/man: $(HELP_SRC)
+share/man: $(HELP_SRC) doc_src/fish_lexicon_filter
-mkdir share/man
touch share/man
-rm -Rf share/man/man1
- PROJECT_NUMBER=`echo $(FISH_BUILD_VERSION)| sed "s/-.*//"` ./build_tools/build_documentation.sh Doxyfile.help ./doc_src ./share
+ PROJECT_NUMBER=`echo $(FISH_BUILD_VERSION)| sed "s/-.*//"` INPUT_FILTER=doc_src/fish_lexicon_filter \
+ ./build_tools/build_documentation.sh Doxyfile.help ./doc_src ./share
#
# The build rules for installing/uninstalling fish
@@ -811,7 +812,7 @@ clean:
rm -f $(PROGRAMS) fish_tests key_reader
rm -f command_list.txt command_list_toc.txt toc.txt
rm -f doc_src/index.hdr doc_src/commands.hdr
- rm -f doc_src/fish_lexicon_filter lexicon.txt
+ rm -f doc_src/fish_lexicon_filter lexicon.txt debug-lexicon.log
rm -f FISH-BUILD-VERSION-FILE
if test "$(HAVE_DOXYGEN)" = 1; then \
rm -rf doc user_doc share/man; \
diff --git a/build_tools/build_documentation.sh b/build_tools/build_documentation.sh
index 0c4a2aac..2705898e 100755
--- a/build_tools/build_documentation.sh
+++ b/build_tools/build_documentation.sh
@@ -37,10 +37,12 @@ resolve_path()
# Expand relative paths
DOXYFILE=`resolve_path "$DOXYFILE"`
INPUTDIR=`resolve_path "$INPUTDIR"`
+INPUTFILTER=`resolve_path "$INPUT_FILTER"`
OUTPUTDIR=`resolve_path "$OUTPUTDIR"`
echo " doxygen file: $DOXYFILE"
echo " input directory: $INPUTDIR"
+echo " input filter: $INPUTFILTER"
echo " output directory: $OUTPUTDIR"
echo " skipping: $CONDEMNED_PAGES"
@@ -87,6 +89,7 @@ done
# This prevents doxygen from generating "documentation" for intermediate directories
DOXYPARAMS=$(cat <<EOF
PROJECT_NUMBER=$PROJECT_NUMBER
+INPUT_FILTER=$INPUTFILTER
INPUT=.
OUTPUT_DIRECTORY=$OUTPUTDIR
QUIET=YES
@@ -100,7 +103,7 @@ find "${OUTPUTDIR}" -name "*.1" -delete
# Run doxygen
cd "$TMPLOC"
-(cat "${DOXYFILE}" ; echo "$DOXYPARAMS";) | "$DOXYGENPATH" -
+(cat "${DOXYFILE}" ; echo "$DOXYPARAMS";) | "$DOXYGENPATH" -
# Remember errors
RESULT=$?
@@ -110,15 +113,16 @@ if test "$RESULT" = 0 ; then
# Postprocess the files
for i in "$INPUTDIR"/*.txt; do
- # It would be nice to use -i here for edit in place, but that is not portable
+ # It would be nice to use -i here for edit in place, but that is not portable
CMD_NAME=`basename "$i" .txt`;
- sed -e "s/\(.\)\\.SH/\1/" -e "s/$CMD_NAME *\\\\- *\"\(.*\)\"/\1/" "${CMD_NAME}.1" > "${CMD_NAME}.1.tmp"
+ sed < ${CMD_NAME}.1 > ${CMD_NAME}.1.tmp \
+ -e "/.SH \"$CMD_NAME/d" \
+ -e "s/^$CMD_NAME * \\\- \([^ ]*\) /\\\fB\1\\\fP -/"
mv "${CMD_NAME}.1.tmp" "${CMD_NAME}.1"
done
-
+
# Erase condemned pages
rm -f $CONDEMNED_PAGES
-
fi
# Destroy TMPLOC