diff --git a/examples/makefile-tex.scm b/examples/makefile-tex.scm new file mode 100644 index 0000000..c7a0477 --- /dev/null +++ b/examples/makefile-tex.scm @@ -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))))