GNUmakefile 989 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. ################################################################################
  2. .PHONY: clean
  3. PDFDOCS = vlmcs.1.pdf vlmcsd.7.pdf vlmcsd.8.pdf vlmcsdmulti.1.pdf vlmcsd.ini.5.pdf vlmcsd-floppy.7.pdf
  4. HTMLDOCS = $(PDFDOCS:.pdf=.html)
  5. UNIXDOCS = $(PDFDOCS:.pdf=.unix.txt)
  6. DOSDOCS = $(PDFDOCS:.pdf=.dos.txt)
  7. %.pdf : %
  8. ifeq ($(shell uname), Darwin)
  9. groff -Tps -mandoc -c $< | pstopdf -i -o $@
  10. else
  11. groff -Tpdf -mandoc -c $< > $@
  12. endif
  13. %.html : %
  14. groff -Thtml -mandoc -c $< > $@
  15. %.unix.txt : %
  16. groff -P -c -Tutf8 -mandoc -c $< | col -bx > $@
  17. %.dos.txt : %.unix.txt
  18. # unix2dos -n $< $@
  19. # sed -e 's/$$/\r/' $< > $@
  20. awk 'sub("$$", "\r")' $< > $@
  21. alldocs : $(UNIXDOCS) $(HTMLDOCS) $(PDFDOCS) $(DOSDOCS)
  22. pdfdocs : $(PDFDOCS)
  23. dosdocs : $(DOSDOCS)
  24. unixdocs : $(UNIXDOCS)
  25. htmldocs : $(HTMLDOCS)
  26. clean:
  27. rm -f $(PDFDOCS) $(DOSDOCS) $(UNIXDOCS) $(HTMLDOCS)
  28. help:
  29. @echo "Help is available by typing 'make help' in directory $(shell realpath `pwd`/..). Use 'cd ..' to get there."