Makefile 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. #!/bin/make -f
  2. # file: docbook2/Makefile
  3. # ====================================================================
  4. # environment definitions;
  5. # --------------------------------------------------------------------
  6. include ../make.def
  7. DOCBOOK=/usr/share/xml/docbook/stylesheet/docbook-xsl/fo
  8. DOCBOOK=/usr/share/xml/docbook/stylesheet/docbook-xsl/html
  9. LIBRARY=${DOC}/plc-classes
  10. # ====================================================================
  11. # symbols;
  12. # --------------------------------------------------------------------
  13. TRASH=*~ *.[0-9][0-9][0-9] t t.* *.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
  14. FILES=Makefile *.txt *.xml *.xsl
  15. STYLES=param.xsl lists.xsl synop.xsl
  16. PAGES=plc-classes.xml
  17. IMAGES=
  18. BOOKS=plc-classes.html plc-classes.txt plc-classes.pdf
  19. BOOKS=plc-classes.html
  20. # ====================================================================
  21. # pseudo targets;
  22. # --------------------------------------------------------------------
  23. all compile: ${BOOKS}
  24. change *.html -e "</html>0" -t "</html>"
  25. rm -fr *.[0-9][0-9][0-9]
  26. manuals:
  27. scripts:
  28. library:
  29. install -m ${DIR_PERM} -o ${OWNER} -g ${GROUP} -d ${LIBRARY}
  30. install: compile library manuals
  31. if [ -d ${LIBRARY} ]; then install -m 0664 -o ${OWNER} -g ${GROUP} *.html *.css *.pdf ${LIBRARY}; fi
  32. uninstall:
  33. rm -f ${LIBRARY}/*.c.html ${LIBRARY}/*.h.html ${LIBRARY}/*.1.html
  34. setup:
  35. install ${STYLES} ${DOCBOOK}
  36. clean:
  37. rm -f ${TRASH} ${BOOKS}
  38. check:
  39. # ${SHELL} docbook2.sh
  40. ignore:
  41. echo ${TOOLS} | tr ' ' '\n' > .gitignore
  42. # ====================================================================
  43. # pseudo targets;
  44. # --------------------------------------------------------------------
  45. plc-classes.html: ${PAGES}
  46. xmlto -o . html ${<}
  47. plc-classes.pdf: ${PAGES} ${IMAGES}
  48. docbook2pdf ${<}
  49. plc-classes.txt: ${PAGES}
  50. xmlto txt ${<}
  51. plc-classes.xml: CPLChannel.xml CPLFirmware.xml CPLMessage.xml CPLNetworks.xml CPLNetwork.xml CPLParameters.xml CPLStation.xml ochannel.xml oerror.xml oethernet.xml oflagword.xml ohomeplug.xml oHPAVKey.xml ointellon.xml ointerfaces.xml ointerface.xml omemory.xml onetwork.xml onumber.xml oSHA256.xml