aboutsummaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
authorGlenn Morris2018-08-28 16:34:25 -0400
committerGlenn Morris2018-08-28 16:34:25 -0400
commit3b71befdfb2e073d025471133be87d4d4d853708 (patch)
treefeeab3a07fecaead30f99f895f1102214a4d2430 /admin
parent3764ab4186bb4479aee5241705f91c1edf4cccfb (diff)
downloademacs-3b71befdfb2e073d025471133be87d4d4d853708.tar.gz
emacs-3b71befdfb2e073d025471133be87d4d4d853708.zip
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.
Diffstat (limited to 'admin')
-rw-r--r--admin/admin.el17
1 files changed, 13 insertions, 4 deletions
diff --git a/admin/admin.el b/admin/admin.el
index 3cb5dbc2d92..1cad7ae2776 100644
--- a/admin/admin.el
+++ b/admin/admin.el
@@ -352,13 +352,22 @@ Optional argument TYPE is type of output (nil means all)."
352 (manual-html-mono texi (expand-file-name (concat name ".html") 352 (manual-html-mono texi (expand-file-name (concat name ".html")
353 html-mono-dir)))) 353 html-mono-dir))))
354 354
355(defvar manual-makeinfo (or (getenv "MAKEINFO") "makeinfo")
356 "The `makeinfo' program to use.")
357
358(defvar manual-texi2pdf (or (getenv "TEXI2PDF") "texi2pdf")
359 "The `texi2pdf' program to use.")
360
361(defvar manual-texi2dvi (or (getenv "TEXI2DVI") "texi2dvi")
362 "The `texi2dvi' program to use.")
363
355(defun manual-html-mono (texi-file dest) 364(defun manual-html-mono (texi-file dest)
356 "Run Makeinfo on TEXI-FILE, emitting mono HTML output to DEST. 365 "Run Makeinfo on TEXI-FILE, emitting mono HTML output to DEST.
357This function also edits the HTML files so that they validate as 366This function also edits the HTML files so that they validate as
358HTML 4.01 Transitional, and pulls in the gnu.org stylesheet using 367HTML 4.01 Transitional, and pulls in the gnu.org stylesheet using
359the @import directive." 368the @import directive."
360 (make-directory (or (file-name-directory dest) ".") t) 369 (make-directory (or (file-name-directory dest) ".") t)
361 (call-process "makeinfo" nil nil nil 370 (call-process manual-makeinfo nil nil nil
362 "-D" "WWW_GNU_ORG" 371 "-D" "WWW_GNU_ORG"
363 "-I" (expand-file-name "../emacs" 372 "-I" (expand-file-name "../emacs"
364 (file-name-directory texi-file)) 373 (file-name-directory texi-file))
@@ -386,7 +395,7 @@ the @import directive."
386 (unless (file-exists-p texi-file) 395 (unless (file-exists-p texi-file)
387 (user-error "Manual file %s not found" texi-file)) 396 (user-error "Manual file %s not found" texi-file))
388 (make-directory dir t) 397 (make-directory dir t)
389 (call-process "makeinfo" nil nil nil 398 (call-process manual-makeinfo nil nil nil
390 "-D" "WWW_GNU_ORG" 399 "-D" "WWW_GNU_ORG"
391 "-I" (expand-file-name "../emacs" 400 "-I" (expand-file-name "../emacs"
392 (file-name-directory texi-file)) 401 (file-name-directory texi-file))
@@ -425,7 +434,7 @@ the @import directive."
425 "Run texi2pdf on TEXI-FILE, emitting PDF output to DEST." 434 "Run texi2pdf on TEXI-FILE, emitting PDF output to DEST."
426 (make-directory (or (file-name-directory dest) ".") t) 435 (make-directory (or (file-name-directory dest) ".") t)
427 (let ((default-directory (file-name-directory texi-file))) 436 (let ((default-directory (file-name-directory texi-file)))
428 (call-process "texi2pdf" nil nil nil 437 (call-process manual-texi2pdf nil nil nil
429 "-I" "../emacs" "-I" "../misc" 438 "-I" "../emacs" "-I" "../misc"
430 texi-file "-o" dest))) 439 texi-file "-o" dest)))
431 440
@@ -435,7 +444,7 @@ the @import directive."
435 (let ((dvi-dest (concat (file-name-sans-extension dest) ".dvi")) 444 (let ((dvi-dest (concat (file-name-sans-extension dest) ".dvi"))
436 (default-directory (file-name-directory texi-file))) 445 (default-directory (file-name-directory texi-file)))
437 ;; FIXME: Use `texi2dvi --ps'? --xfq 446 ;; FIXME: Use `texi2dvi --ps'? --xfq
438 (call-process "texi2dvi" nil nil nil 447 (call-process manual-texi2dvi nil nil nil
439 "-I" "../emacs" "-I" "../misc" 448 "-I" "../emacs" "-I" "../misc"
440 texi-file "-o" dvi-dest) 449 texi-file "-o" dvi-dest)
441 (call-process "dvips" nil nil nil dvi-dest "-o" dest) 450 (call-process "dvips" nil nil nil dvi-dest "-o" dest)