2012-10-29 01:14:03 +01:00
|
|
|
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)
|
|
|
|
|
2012-11-07 17:42:16 +01:00
|
|
|
uninstall:
|
2012-10-29 01:14:03 +01:00
|
|
|
-rm $(LUA_SHAREDIR)/ldoc.lua
|
|
|
|
-rm -r $(LUA_SHAREDIR)/ldoc
|
|
|
|
-rm $(LUA_BINDIR)/ldoc
|
2012-11-07 17:42:16 +01:00
|
|
|
|
2012-11-11 17:50:33 +01:00
|
|
|
test: test-basic test-example test-md test-tables
|
2012-11-07 17:42:16 +01:00
|
|
|
|
2012-11-11 17:50:33 +01:00
|
|
|
RUN=&& ldoc . && diff -r docs cdocs && echo ok
|
2012-11-07 17:42:16 +01:00
|
|
|
|
|
|
|
test-basic:
|
|
|
|
cd tests $(RUN)
|
|
|
|
|
|
|
|
test-example:
|
|
|
|
cd tests && cd example $(RUN)
|
|
|
|
|
|
|
|
test-md:
|
|
|
|
cd tests && cd md-test $(RUN)
|
2012-11-11 17:50:33 +01:00
|
|
|
|
|
|
|
test-tables:
|
|
|
|
cd tests && cd simple $(RUN)
|
2012-12-29 11:09:34 +01:00
|
|
|
|
|
|
|
test-clean: clean-basic clean-example clean-md clean-tables
|
|
|
|
|
|
|
|
CLEAN=&& ldoc . && rd /S /Q cdocs && cp -rf docs cdocs
|
|
|
|
|
|
|
|
clean-basic:
|
|
|
|
cd tests $(CLEAN)
|
|
|
|
|
|
|
|
clean-example:
|
|
|
|
cd tests && cd example $(CLEAN)
|
|
|
|
|
|
|
|
clean-md:
|
|
|
|
cd tests && cd md-test $(CLEAN)
|
|
|
|
|
|
|
|
clean-tables:
|
|
|
|
cd tests && cd simple $(CLEAN)
|