admin.el: respect environment settings for makeinfo etc
* admin/admin.el (manual-makeinfo, manual-texi2pdf, manual-texi2dvi): New variables. (manual-html-mono, manual-html-node, manual-pdf, manual-ps): Use them.
This commit is contained in:
parent
3764ab4186
commit
3b71befdfb
1 changed files with 13 additions and 4 deletions
|
@ -352,13 +352,22 @@ Optional argument TYPE is type of output (nil means all)."
|
||||||
(manual-html-mono texi (expand-file-name (concat name ".html")
|
(manual-html-mono texi (expand-file-name (concat name ".html")
|
||||||
html-mono-dir))))
|
html-mono-dir))))
|
||||||
|
|
||||||
|
(defvar manual-makeinfo (or (getenv "MAKEINFO") "makeinfo")
|
||||||
|
"The `makeinfo' program to use.")
|
||||||
|
|
||||||
|
(defvar manual-texi2pdf (or (getenv "TEXI2PDF") "texi2pdf")
|
||||||
|
"The `texi2pdf' program to use.")
|
||||||
|
|
||||||
|
(defvar manual-texi2dvi (or (getenv "TEXI2DVI") "texi2dvi")
|
||||||
|
"The `texi2dvi' program to use.")
|
||||||
|
|
||||||
(defun manual-html-mono (texi-file dest)
|
(defun manual-html-mono (texi-file dest)
|
||||||
"Run Makeinfo on TEXI-FILE, emitting mono HTML output to DEST.
|
"Run Makeinfo on TEXI-FILE, emitting mono HTML output to DEST.
|
||||||
This function also edits the HTML files so that they validate as
|
This function also edits the HTML files so that they validate as
|
||||||
HTML 4.01 Transitional, and pulls in the gnu.org stylesheet using
|
HTML 4.01 Transitional, and pulls in the gnu.org stylesheet using
|
||||||
the @import directive."
|
the @import directive."
|
||||||
(make-directory (or (file-name-directory dest) ".") t)
|
(make-directory (or (file-name-directory dest) ".") t)
|
||||||
(call-process "makeinfo" nil nil nil
|
(call-process manual-makeinfo nil nil nil
|
||||||
"-D" "WWW_GNU_ORG"
|
"-D" "WWW_GNU_ORG"
|
||||||
"-I" (expand-file-name "../emacs"
|
"-I" (expand-file-name "../emacs"
|
||||||
(file-name-directory texi-file))
|
(file-name-directory texi-file))
|
||||||
|
@ -386,7 +395,7 @@ the @import directive."
|
||||||
(unless (file-exists-p texi-file)
|
(unless (file-exists-p texi-file)
|
||||||
(user-error "Manual file %s not found" texi-file))
|
(user-error "Manual file %s not found" texi-file))
|
||||||
(make-directory dir t)
|
(make-directory dir t)
|
||||||
(call-process "makeinfo" nil nil nil
|
(call-process manual-makeinfo nil nil nil
|
||||||
"-D" "WWW_GNU_ORG"
|
"-D" "WWW_GNU_ORG"
|
||||||
"-I" (expand-file-name "../emacs"
|
"-I" (expand-file-name "../emacs"
|
||||||
(file-name-directory texi-file))
|
(file-name-directory texi-file))
|
||||||
|
@ -425,7 +434,7 @@ the @import directive."
|
||||||
"Run texi2pdf on TEXI-FILE, emitting PDF output to DEST."
|
"Run texi2pdf on TEXI-FILE, emitting PDF output to DEST."
|
||||||
(make-directory (or (file-name-directory dest) ".") t)
|
(make-directory (or (file-name-directory dest) ".") t)
|
||||||
(let ((default-directory (file-name-directory texi-file)))
|
(let ((default-directory (file-name-directory texi-file)))
|
||||||
(call-process "texi2pdf" nil nil nil
|
(call-process manual-texi2pdf nil nil nil
|
||||||
"-I" "../emacs" "-I" "../misc"
|
"-I" "../emacs" "-I" "../misc"
|
||||||
texi-file "-o" dest)))
|
texi-file "-o" dest)))
|
||||||
|
|
||||||
|
@ -435,7 +444,7 @@ the @import directive."
|
||||||
(let ((dvi-dest (concat (file-name-sans-extension dest) ".dvi"))
|
(let ((dvi-dest (concat (file-name-sans-extension dest) ".dvi"))
|
||||||
(default-directory (file-name-directory texi-file)))
|
(default-directory (file-name-directory texi-file)))
|
||||||
;; FIXME: Use `texi2dvi --ps'? --xfq
|
;; FIXME: Use `texi2dvi --ps'? --xfq
|
||||||
(call-process "texi2dvi" nil nil nil
|
(call-process manual-texi2dvi nil nil nil
|
||||||
"-I" "../emacs" "-I" "../misc"
|
"-I" "../emacs" "-I" "../misc"
|
||||||
texi-file "-o" dvi-dest)
|
texi-file "-o" dvi-dest)
|
||||||
(call-process "dvips" nil nil nil dvi-dest "-o" dest)
|
(call-process "dvips" nil nil nil dvi-dest "-o" dest)
|
||||||
|
|
Loading…
Add table
Reference in a new issue