Makefile 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. # Requires AsciiDoc and dos2unix to be installed.
  2. ASCIIDOC=asciidoc
  3. # In order to make sure that web pages are well formed it's possible to replace
  4. # the "html5" backend with "xhtml11" in order to generate XHTML 1.1 and then
  5. # verify that the output produced is valid XML:
  6. # for h in *.html; do xmllint -noout $h; done
  7. #
  8. # The "mint" theme is not a true AsciiDoc theme in the sense that it's not
  9. # found in /etc/asciidoc/themes. Instead, it's file "mint.css" in this
  10. # directory that is referenced. Consequently the following warning can be
  11. # safely ignored:
  12. # asciidoc: WARNING: missing theme: mint
  13. ADOCOPTS=--backend=html5 --conf-file=freedoom-layout.conf --theme=mint
  14. # A marker that indicates that this build was attempted at least once.
  15. BUILT=.built
  16. DOS2UNIX=dos2unix
  17. # This builds a list of HTML files based on the text files. For each text file
  18. # there will be a HTML file with the same basename.
  19. PAGES=$(patsubst %.txt,%.html,$(wildcard *.txt))
  20. .SUFFIXES: .txt .html
  21. # This is assure that everything is built when freshly checked out since the
  22. # HTML files may be newer than the text files. When that happens the HTML files
  23. # are not updated.
  24. $(BUILT):
  25. @echo "Creating $(BUILT) for a new build."
  26. @touch $(BUILT)
  27. # Build the HTML files from the text and configuration files.
  28. %.html: %.txt freedoom-layout.conf $(BUILT)
  29. $(ASCIIDOC) $(ADOCOPTS) $<
  30. $(DOS2UNIX) $@
  31. # The default build target.
  32. all: $(PAGES)