From 4de863ca2d4e0e28a6a8f6819396c3bd0824b52f Mon Sep 17 00:00:00 2001 From: Geoff Leyland Date: Mon, 29 Oct 2012 13:14:03 +1300 Subject: [PATCH] added a makefile to make installing a little simpler --- makefile | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 makefile diff --git a/makefile b/makefile new file mode 100644 index 0000000..a0ff1b0 --- /dev/null +++ b/makefile @@ -0,0 +1,24 @@ +LUA= $(shell echo `which lua`) +LUA_BINDIR= $(shell echo `dirname $(LUA)`) +LUA_PREFIX= $(shell echo `dirname $(LUA_BINDIR)`) +LUA_SHAREDIR=$(LUA_PREFIX)/share/lua/5.1 + +ldoc: + +install: install_parts + echo "lua $(LUA_SHAREDIR)/ldoc.lua \$$*" > $(LUA_BINDIR)/ldoc + chmod +x $(LUA_BINDIR)/ldoc + +install_luajit: install_parts + echo "luajit $(LUA_SHAREDIR)/ldoc.lua \$$*" > $(LUA_BINDIR)/ldoc + chmod +x $(LUA_BINDIR)/ldoc + +install_parts: + mkdir -p $(LUA_SHAREDIR) + cp ldoc.lua $(LUA_SHAREDIR) + cp -r ldoc $(LUA_SHAREDIR) + +uninstall: + -rm $(LUA_SHAREDIR)/ldoc.lua + -rm -r $(LUA_SHAREDIR)/ldoc + -rm $(LUA_BINDIR)/ldoc