summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2023-09-12 23:44:44 +0200
committerAki <please@ignore.pl>2023-09-12 23:44:44 +0200
commitead77c81bbf24a5fe3ec743f0a0663e0e3fa915a (patch)
tree2b1a5c06027f4602feba3564afd1d78b84d5e88d
parent13a7a72279674c2a2180daa67fede63660218fd9 (diff)
downloadactivity-ead77c81bbf24a5fe3ec743f0a0663e0e3fa915a.zip
activity-ead77c81bbf24a5fe3ec743f0a0663e0e3fa915a.tar.gz
activity-ead77c81bbf24a5fe3ec743f0a0663e0e3fa915a.tar.bz2
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.
-rw-r--r--Makefile24
1 files 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