Makefile 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #!/bin/make -f
  2. # file: docbook/Makefile
  3. # ====================================================================
  4. # environment definitions;
  5. # --------------------------------------------------------------------
  6. include ../make.def
  7. PROJECT=open-plc-utils
  8. DOCBOOK=/usr/share/xml/docbook/stylesheet/docbook-xsl/fo
  9. DOCBOOK=/usr/share/xml/docbook/stylesheet/docbook-xsl/html
  10. LIBRARY=${DOC}/${PROJECT}
  11. XFLAGS=--skip-validation
  12. # ====================================================================
  13. # symbols;
  14. # --------------------------------------------------------------------
  15. TRASH=*~ *.[0-9][0-9][0-9] t t.* *.1 *.1a *.1.html *.c.html *.cpp.html *.h.html *.hpp.html *.1.html *.1a.html *.sh.html *.xml.html *.xsd.html ch[0-9][0-9]*.html
  16. STYLES=param.xsl lists.xsl synop.xsl
  17. BOOKS=index.html
  18. # ====================================================================
  19. # pseudo targets;
  20. # --------------------------------------------------------------------
  21. all: compile install
  22. compile: manuals ${TOOLS} ${BOOKS}
  23. rm -f *.[0-9][0-9][0-9]
  24. manuals:
  25. ${SHELL} ../docbook/manuals
  26. scripts:
  27. library:
  28. install -m ${DIR_PERM} -o ${OWNER} -g ${GROUP} -d ${LIBRARY}
  29. install: library
  30. if [ -d ${LIBRARY} ]; then install -m ${WWW_PERM} -o ${OWNER} -g ${GROUP} *.html *.css *.png ${LIBRARY}; fi
  31. uninstall:
  32. rm -f ${LIBRARY}/*.c.html ${LIBRARY}/*.h.html ${LIBRARY}/*.1.html
  33. setup:
  34. install ${STYLES} ${DOCBOOK}
  35. clean:
  36. rm -f ${PAGES} ${TRASH}
  37. fresh: clean compile
  38. # ====================================================================
  39. # pseudo targets;
  40. # --------------------------------------------------------------------
  41. index.html: open-plc-utils.xml *.xml *.png
  42. xmlto ${XFLAGS} -o . html ${<}
  43. open-plc-utils.pdf: *.xml *.png
  44. docbook2pdf ${<}
  45. open-plc-utils.txt: *.xml
  46. xmlto ${XFLAGS} txt ${<}