2 ############################################################
4 # author: devenkong(18151155@qq.com)
6 ############################################################
8 # use flex to generate lexer proc srcfile.
9 ############################################################
25 ##############################
26 # section: public comment info
27 ##############################
31 ##############################
32 # section: variable define
33 ##############################
36 RL_LIBDIR
= $
(topdir
)/lib
/readline
42 TEXINPUTDIR
= $
(RL_LIBDIR
)/doc
43 SET_TEXINPUTS
= TEXINPUTS
=.
:$
(TEXINPUTDIR
):$
$TEXINPUTS
45 HSUSER
= $
(RL_LIBDIR
)/doc
/hsuser.texi
46 RLUSER
= $
(RL_LIBDIR
)/doc
/rluser.texi
51 TEXI2DVI
=${SUPPORT_SRCDIR}/texi2dvi
52 TEXI2HTML
=${SUPPORT_SRCDIR}/texi2html
53 MAN2HTML
=${BUILD_DIR}/support
/man2html
54 HTMLPOST
=${srcdir}/htmlpost.sh
55 INFOPOST
=${srcdir}/infopost.sh
57 QUIETPS
=#set this to -q to shut up dvips
58 PAPERSIZE
=letter
# change to a4 for A4-size paper
59 PSDPI
=600 # could be 300 if you like
61 DVIPS
=dvips
-D ${PSDPI} $
(QUIETPS
) -t ${PAPERSIZE} -o $@
# tricky
62 # experimental; uses external texi2dvi for now; this needs pdftex to be present
63 TEXI2PDF
=texi2dvi
--pdf
65 # These tools might not be available; they're not required
66 DVIPDF
=dvipdfm
-o $@
-p ${PAPERSIZE}
67 PSPDF
="gs -sPAPERSIZE=${PAPERSIZE} -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -sOutputFile=$@"
69 MKDIRS
=${SUPPORT_SRCDIR}/mkdirs
71 # This should be a program that converts troff to an ascii-readable format
72 # added the -P -c for benefit of Mac OS X, which insists on adding colors if
74 NROFF
=groff -Tascii -P -c
76 # This should be a program that converts troff to postscript
84 TEXI2PDF
="${TEXI2DVI} --pdf --batch"
85 MAKEINFO
="${SHELL} /mnt/hgfs/workspace/tmp/src-pkgs/hello-2.11.tar/hello-2.11/build-aux/missing makeinfo"
86 MAKEINFOHTML
="${MAKEINFO} --html"
92 ##############################
93 # section: private function
94 ##############################
97 #############################################################################
101 ############################################################################
109 ${GROFF} -man $
< > $@
113 ${NROFF} -man $
< > $@
119 ${MAN2HTML} $
< |
${HTMLPOST} > $@
124 ${NROFF} -man $
< > $@
139 ##############################
140 # section: public function
141 ##############################
148 # fdesc: translate tex file to man file.
158 # fdesc: translate tex file to info file.
162 local cmd
="$SETLANG $MAKEINFO -o $PACKAGE.info $commonarg $infoarg \"$srcfile\""
163 echo "Generating info... ($cmd)"
164 rm -f $PACKAGE.info
* # get rid of any strays
167 # $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I doc -I $(srcdir)/doc \
168 # -o $@ $(srcdir)/doc/hello.texi
173 # fdesc: translate tex file to text file.
177 opt
="-o $PACKAGE.txt --no-split --no-headers $commonarg"
178 cmd
="$SETLANG $MAKEINFO $opt \"$srcfile\""
179 printf "\nGenerating ascii... ($cmd)\n"
185 # fdesc: translate tex file to dvi file.
189 cmd
="$SETLANG $TEXI2DVI $dirargs $texarg \"$srcfile\""
190 printf "\nGenerating dvi... ($cmd)\n"
194 # MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I doc -I $(srcdir)/doc'
195 # $(TEXI2DVI) $(AM_V_texinfo) --build-dir=$(@:.dvi=.t2d) -o $@ $(AM_V_texidevnull)
200 # fdesc: translate tex file to pdf file.
204 cmd
="$SETLANG $TEXI2DVI --pdf $dirargs $texarg \"$srcfile\""
205 printf "\nGenerating pdf... ($cmd)\n"
209 # MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I doc -I $(srcdir)/doc'
210 # $(TEXI2PDF) $(AM_V_texinfo) --build-dir=$(@:.pdf=.t2p) -o $@ $(AM_V_texidevnull)
215 # fdesc: translate tex file to html file.
219 opt
="--split=$1 --node-files $commonarg $htmlarg"
220 cmd
="$SETLANG $TEXI2HTML --output $PACKAGE.html $opt \"$srcfile\""
221 printf "\nGenerating html by $1... ($cmd)\n"
224 #opt="--no-split --html -o $PACKAGE.html $commonarg $htmlarg"
225 #cmd="$SETLANG $MAKEINFO $opt \"$srcfile\""
226 #printf "\nGenerating monolithic html... ($cmd)\n"
227 #rm -rf $PACKAGE.html # in case a directory is left over
232 #opt="--html -o $PACKAGE.html $split_arg $commonarg $htmlarg"
233 #cmd="$SETLANG $MAKEINFO $opt \"$srcfile\""
234 #printf "\nGenerating html by $split... ($cmd)\n"
238 #opt="--output $PACKAGE.html $commonarg $htmlarg"
239 #cmd="$SETLANG $TEXI2HTML $opt \"$srcfile\""
240 #printf "\nGenerating monolithic html with texi2html... ($cmd)\n"
241 #rm -rf $PACKAGE.html # in case a directory is left over
250 # $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I doc -I $(srcdir)/doc -o $(@:.html=.htp) `test -f 'doc/hello.texi'`
254 # fsyntax: tex2docbook
255 # fdesc: translate tex file to docbook file.
259 opt
="-o - --docbook $commonarg"
260 cmd
="$SETLANG $MAKEINFO $opt \"$srcfile\" >${srcdir}/$PACKAGE-db.xml"
261 printf "\nGenerating docbook XML... ($cmd)\n"
266 ##############################
268 ##############################