Skip to content

Commit

Permalink
Make `cd doc; make pdf' work again
Browse files Browse the repository at this point in the history
This requires Texinfo the version >=6.3, and either (or both) of LuaTeX
>=0.95 (i.e., TeXLive >=2016) or XeTeX >=0.9998 (i.e., TeXLive >=2012).
  • Loading branch information
yamaoka committed Jan 16, 2018
1 parent 59427fd commit bbebf2a
Show file tree
Hide file tree
Showing 9 changed files with 6,477 additions and 5,000 deletions.
28 changes: 28 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,31 @@
2018-01-16 Katsumi Yamaoka <yamaoka@jpl.org>

Make `cd doc; make pdf' work again

This requires Texinfo the version >=6.3, and either (or both) of LuaTeX
>=0.95 (i.e., TeXLive >=2016) or XeTeX >=0.9998 (i.e., TeXLive >=2012).

* Makefile.in (clean): Use doc/Makefile's clean.

* aclocal.m4 (AC_CHECK_TEXINFO): New function.

* configure.in (MAKEINFO, TEXI2PDF): Check version.
(TEXI2DVI, PTEX, PBIBTEX, DVIPDFMX, TEXI2PDF): Remove.

* doc/Makefile.in (TEXI2DVI, PTEX, PBIBTEX, DVIPDFMX, TEXI2PDF): Remove.
(PDFTEX): New internal variable.
(dvi, dvi-en, dvi-ja, emacs-w3m.dvi, emacs-w3m-ja.dvi, .texi.dvi):
Remove targets.
(.texi.pdf): Use texi2pdf instead of dvipdfmx.
(clean): Renew.

* doc/emacs-w3m-ja.texi (texinfo-ja.tex): Use it instead of texinfo.tex.
(@documentencoding): New.
(@usedvipdfmx): Remove.

* doc/texinfo-ja.tex: New file.
* doc/texinfo.tex, doc/txi-en.tex, doc/txi-ja.tex: Renew.

2017-12-22 Katsumi Yamaoka <yamaoka@jpl.org>

Update selection buffer properly after deletion or renaming.
Expand Down
3 changes: 1 addition & 2 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,7 @@ tarball: CVS/Root CVS/Repository
clean:
-rm -rf $(PACKAGE)* ;\
rm -f *~ *.elc shimbun/*.elc w3m-load.el ;\
rm -f doc/*~ doc/*.info doc/*.info-[0-9] doc/*.info-[0-9][0-9]\
doc/version.texi
cd doc && $(MAKE) clean

distclean: clean
-rm -f config.log config.status config.cache Makefile doc/Makefile;\
Expand Down
22 changes: 22 additions & 0 deletions aclocal.m4
Original file line number Diff line number Diff line change
Expand Up @@ -297,3 +297,25 @@ AC_DEFUN(AC_COMPRESS_INSTALL,
COMPRESS_INSTALL=no;
fi])
AC_SUBST(COMPRESS_INSTALL)])

AC_DEFUN(AC_CHECK_TEXINFO,
[dnl Check the existence and the version of a texinfo command.
command=$1
name=`echo $command| tr a-z A-Z`
if test "${name}" != no; then
AC_MSG_CHECKING([if ${command} version >= 6.3])
version=`${command} --version\
| awk 'BEGIN {zero=0}\
tolower($zero)~/gnu +texinfo/&&match($zero,/[[0-9]]+\.[[0-9]]+/)\
{print substr($zero,RSTART,RLENGTH); exit}' 2>/dev/null`
case "${version}" in
6\.[[3-9]]|[[7-9]]\.[[0-9]])
AC_MSG_RESULT([ok (${version})]);;
*)
if test -z "${version}"; then
AC_MSG_RESULT(no)
else
AC_MSG_RESULT([no (${version})])
fi;;
esac
fi])
8 changes: 3 additions & 5 deletions configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@ AC_INIT(w3m.el)
AC_SET_MAKE
AC_PROG_INSTALL
AC_CHECK_PROG(MAKEINFO, makeinfo, makeinfo, no)
AC_CHECK_PROG(TEXI2DVI, texi2dvi, texi2dvi, false)
AC_CHECK_PROG(PTEX, ptex, ptex, false)
AC_CHECK_PROGS(PBIBTEX, pbibtex jbibtex, false)
AC_CHECK_PROG(DVIPDFMX, dvipdfmx, dvipdfmx, false)
AC_CHECK_PROG(TEXI2PDF, texi2pdf, texi2pdf, false)
AC_CHECK_TEXINFO($MAKEINFO)
AC_CHECK_PROG(TEXI2PDF, texi2pdf, texi2pdf, no)
AC_CHECK_TEXINFO($TEXI2PDF)
AC_CHECK_PROGS(EGREP, egrep grep, )
AC_CHECK_PROG(CYGPATH, cygpath, cygpath, no)
AC_PATH_EMACS
Expand Down
43 changes: 10 additions & 33 deletions doc/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ SHELL = /bin/sh

@SET_MAKE@
MAKEINFO = @MAKEINFO@
TEXI2DVI = @TEXI2DVI@
PTEX = @PTEX@
PBIBTEX = @PBIBTEX@
DVIPDFMX = @DVIPDFMX@
TEXI2PDF = @TEXI2PDF@
EMACS = @EMACS@
VANILLA_FLAG = @VANILLA_FLAG@
Expand All @@ -37,6 +33,9 @@ INFO_DEPS_EN = emacs-w3m.info
INFO_DEPS_JA = emacs-w3m-ja.info
INFO_DEPS = $(INFO_DEPS_EN) $(INFO_DEPS_JA)

# Use xetex if it is your taste.
PDFTEX=luatex

default: $(INFO_DEPS)

en: $(INFO_DEPS_EN)
Expand All @@ -52,6 +51,10 @@ emacs-w3m.info: version.texi emacs-w3m.texi

emacs-w3m-ja.info: version.texi emacs-w3m-ja.texi

# We can use makeinfo to format Japanese info files by replacing
# $(EMACSINFO) $$texi
# with
# $(MAKEINFO) --no-split -o $@ $$texi
.texi.info:
@texi=$<;\
case "$$texi" in \
Expand Down Expand Up @@ -101,25 +104,6 @@ install-ja: $(INFO_DEPS_JA)
$(MAKE) INFO_DEPS='$(INFO_DEPS_JA)' $(XEMACSDEBUG) EMACS="$(EMACS)"\
infodir="$(infodir)" install

dvi: dvi-en dvi-ja

dvi-en: emacs-w3m.dvi

dvi-ja: emacs-w3m-ja.dvi

emacs-w3m.dvi: version.texi emacs-w3m.texi

emacs-w3m-ja.dvi: version.texi emacs-w3m-ja.texi

.texi.dvi:
@texi=$<;\
case "$$texi" in \
*-ja.texi) \
env TEX=$(PTEX) BIBTEX=$(PBIBTEX) $(TEXI2DVI) -o $@ $$texi ;;\
*) \
$(TEXI2DVI) -o $@ $$texi ;;\
esac

pdf: pdf-en pdf-ja

pdf-en: emacs-w3m.pdf
Expand All @@ -131,18 +115,11 @@ emacs-w3m.pdf: version.texi emacs-w3m.texi
emacs-w3m-ja.pdf: version.texi emacs-w3m-ja.texi

.texi.pdf:
@texi=$<;\
case "$$texi" in\
*-ja.texi)\
i=`basename $@ .pdf`;\
$(MAKE) $$i.dvi; $(DVIPDFMX) $$i;;\
*) \
$(TEXI2PDF) $$texi;;\
esac
sed '/^@dircategory/d' $< > w3mtmp.texi
env PDFTEX=$(PDFTEX) $(TEXI2PDF) -o $@ w3mtmp.texi

clean:
-rm -rf *~ *.info version.texi *.dvi missfont.log *.pdf *.aux *.cp\
*.cps *.fn *.fns *.ky *.kys *.log *.pg *.tmp *.toc *.tp *.vr *.vrs
-rm -f *.info *.pdf *~ version.texi w3mtmp.*

distclean: clean
-rm -f Makefile
Loading

0 comments on commit bbebf2a

Please sign in to comment.