Makefile 707 B

12345678910111213141516171819202122232425262728
  1. SHELL = /bin/bash
  2. LIBRARY = ../../../archive.dokk.org/library
  3. # Convert PDF to TXT using LibreOffice
  4. # pdf filename: "$<"
  5. # txt filename: "$@"
  6. pdf2txt : $(subst :,\:,$(patsubst %.pdf,%.txt,$(shell find "${LIBRARY}" -type f -name "*.pdf")))
  7. %.txt : %.pdf
  8. @echo "Processing $<"
  9. @pdftotext -layout "$<"
  10. # Convert PDF to HTML using pdf2htmlEX
  11. # pdf filename: "$<"
  12. # html filename: "$@"
  13. pdf2html : $(subst :,\:,$(patsubst %.pdf,%.html,$(shell find "${LIBRARY}" -type f -name "*.pdf")))
  14. %.html : %.pdf
  15. @echo "Processing $<"
  16. @pdf2htmlEX --dest-dir "${LIBRARY}" --embed cFIJO "$<"
  17. ./extract-background.py "$@"
  18. clean:
  19. rm -f ${LIBRARY}/*.{css,html,js,txt}
  20. .ONESHELL:
  21. .SUFFIXES:
  22. .PHONY:
  23. .DELETE_ON_ERROR: