simple makefile to build tex stuff.

This commit is contained in:
jottbee 2005-02-15 18:42:14 +00:00
parent 6a7401cd45
commit 9e1b812cfd
1 changed files with 40 additions and 0 deletions

40
examples/makefile-tex.scm Normal file
View File

@ -0,0 +1,40 @@
(define clean-files
(list "manual.dvi" "manual.pdf" "manual.ps" "manual.log" "manual.aux"
"another-manual.dvi" "another-manual.ps" "another-manual.pdf"))
(define file-set
(makefile
(once "manual.dvi"
("manual.tex")
(run (latex ,($<))))
(file "manual.pdf"
("manual.dvi")
(run (dvipdfm -o ,($@) ,($<))))
(file "manual.ps"
("manual.dvi")
(run (dvips -o ,($@) ,($<))))
(file "another-manual.dvi"
("manual.dvi")
(create-symlink ($<) ($@)))
(file "another-manual.ps"
("another-manual.dvi")
(run (dvips -o ,($@) ,($<))))
(file "another-manual.pdf"
("another-manual.dvi")
(run (dvipdfm -o ,($@) ,($<))))
;;
;; fake install
;;
(always "install"
("manual.ps" "manual.dvi" "manual.pdf"
"another-manual.dvi" "another-manual.ps" "another-manual.pdf")
(for-each (lambda (f) (display ">>> ") (display f) (newline)) ($+))
(display "install done.\n"))
;;
;; clean files
;;
(always "clean"
()
(for-each (lambda (f)
(delete-filesys-object (expand-file-name f (cwd))))
clean-files))))