Makefile 567 B

12345678910111213141516171819202122
  1. EMACS=emacs
  2. BATCH_EMACS=$(EMACS) --batch -Q -l init.el
  3. %.html: %.org
  4. $(BATCH_EMACS) $*.org -f org-html-export-to-html
  5. %.tex: %.org init.el
  6. $(BATCH_EMACS) $*.org -f org-latex-export-to-latex
  7. %.el: %.org init.el
  8. $(BATCH_EMACS) $*.org -f org-babel-tangle
  9. # two fancier alternatives to the above which provide a default file
  10. # name and encode language information
  11. %.el: %.org init.el
  12. $(BATCH_EMACS) $*.org \
  13. --eval '(org-babel-tangle nil "$@" (quote emacs-lisp))'
  14. %.sh: %.org init.el
  15. $(BATCH_EMACS) $*.org \
  16. --eval '(org-babel-tangle nil "$@" (quote bash))'