From ead77c81bbf24a5fe3ec743f0a0663e0e3fa915a Mon Sep 17 00:00:00 2001 From: Aki Date: Tue, 12 Sep 2023 23:44:44 +0200 Subject: Reworked makefile to be more useful Note that activity.lua can be installed (or even before) as activity/init.lua. I don't feel need to change the naming/structure just yet. --- Makefile | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 9b3385e..2797e9c 100644 --- a/Makefile +++ b/Makefile @@ -1,12 +1,24 @@ -all: activity.html +LUAVERSION?=5.4 +PREFIX?=/usr/local +BINDIR=$(PREFIX)/bin +LIBDIR=$(PREFIX)/lib +DATADIR=$(PREFIX)/share +LUADIR=$(DATADIR)/lua/$(LUAVERSION) -%.html: generate.lua activity.lua - lua generate.lua >$@ +all: + @echo Nothing to be built -clean: - rm -f *.html +install: + install -m644 -Dt $(DESTDIR)$(LUADIR) activity.lua + install -m644 -Dt $(DESTDIR)$(LUADIR)/activity activity/*.lua + install -m644 -Dt $(DESTDIR)$(LUADIR)/activity/formats activity/formats/*.lua + install -m655 -Dt $(DESTDIR)$(BINDIR) generate.lua + +uninstall: + rm -rf $(DESTDIR)$(LUADIR)/activity + rm -f $(DESTIR)$(BINDIR)/generate.lua test: busted -.PHONY: all clean test +.PHONY: all install uninstall test -- cgit v1.1