You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Makefile 1.2KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. #
  2. # Templet for Lua.
  3. # Copyright © 2012–2015 Peter Colberg.
  4. # Distributed under the MIT license. (See accompanying file LICENSE.)
  5. #
  6. PREFIX = /usr/local
  7. LUADIR = $(PREFIX)/share/lua/5.1
  8. DOCDIR = $(PREFIX)/share/doc/lua-templet
  9. INSTALL_D = mkdir -p
  10. INSTALL_F = install -m 644
  11. FILES_LUA = templet.lua
  12. FILES_DOC = index.mdwn INSTALL.mdwn README.mdwn examples.mdwn reference.mdwn CHANGES.mdwn
  13. FILES_DOC_HTML = index.html INSTALL.html README.html examples.html reference.html CHANGES.html pandoc.css lua-templet.png
  14. FILES_EXAMPLES_INCLUDE = include.lua
  15. FILES_EXAMPLES_INCLUDE_TEST = included.lua main.lua
  16. all: test
  17. install:
  18. $(INSTALL_D) $(DESTDIR)$(LUADIR)
  19. $(INSTALL_F) $(FILES_LUA) $(DESTDIR)$(LUADIR)
  20. $(INSTALL_D) $(DESTDIR)$(DOCDIR)
  21. cd doc && $(INSTALL_F) $(FILES_DOC) $(FILES_DOC_HTML) $(DESTDIR)$(DOCDIR)
  22. $(INSTALL_D) $(DESTDIR)$(DOCDIR)/examples/include
  23. cd examples/include && $(INSTALL_F) $(FILES_EXAMPLES_INCLUDE) $(DESTDIR)$(DOCDIR)/examples/include
  24. $(INSTALL_D) $(DESTDIR)$(DOCDIR)/examples/include/test
  25. cd examples/include/test && $(INSTALL_F) $(FILES_EXAMPLES_INCLUDE_TEST) $(DESTDIR)$(DOCDIR)/examples/include/test
  26. clean:
  27. SUBDIRS = test doc
  28. .PHONY: $(SUBDIRS)
  29. $(SUBDIRS):
  30. @$(MAKE) -C $@