Makefile 1002 B

12345678910111213141516171819202122232425262728293031
  1. # define all output targets the target "all" is the goal when invoking make with
  2. # ~make all~ or ~make~.
  3. all: list.md list.texi list.html
  4. # Define .exported as intermediate target - This will cause ~make all~ to only
  5. # do anything, if the output files do not yet exist. -- (Why does it cause
  6. # that?)
  7. # For now I comment this out, because one would have to delete the previously
  8. # exported files, to produce new exported files, if .exported is defined as
  9. # intermediate target.
  10. # .INTERMEDIATE: .exported
  11. # All output files depend on .exported, which is another target.
  12. list.md list.texi list.html: .exported
  13. # .exported depends on the actual org file source and the command will produce
  14. # all output files, which are all targets
  15. .exported: list.org
  16. HOME=$$(dirname $$(realpath "$<")) \
  17. emacs \
  18. --quick \
  19. --batch \
  20. "$<" \
  21. --exec "(require 'ox-md)" \
  22. --funcall org-md-export-to-markdown \
  23. --funcall org-html-export-to-html \
  24. --funcall org-texinfo-export-to-texinfo \
  25. --funcall kill-emacs