Merge pull request #277 from AntumDeluge/makefile_edits

This commit is contained in:
Caleb Maclennan 2020-09-30 00:42:49 +03:00 committed by GitHub
commit cae19aab3e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 10 deletions

View File

@ -6,22 +6,25 @@ LUA_SHAREDIR=$(LUA_PREFIX)/share/lua/5.1
ldoc:
install: install_parts
echo "lua $(LUA_SHAREDIR)/ldoc.lua \$$*" > $(DESTDIR)$(LUA_BINDIR)/ldoc
chmod +x $(DESTDIR)$(LUA_BINDIR)/ldoc
@echo "lua $(LUA_SHAREDIR)/ldoc.lua \$$*" > "$(DESTDIR)$(LUA_BINDIR)/ldoc"
@chmod -v +x "$(DESTDIR)$(LUA_BINDIR)/ldoc"
install_luajit: install_parts
echo "luajit $(LUA_SHAREDIR)/ldoc.lua \$$*" > $(DESTDIR)$(LUA_BINDIR)/ldoc
chmod +x $(DESTDIR)$(LUA_BINDIR)/ldoc
@echo "luajit $(LUA_SHAREDIR)/ldoc.lua \$$*" > "$(DESTDIR)$(LUA_BINDIR)/ldoc"
@chmod -v +x "$(DESTDIR)$(LUA_BINDIR)/ldoc"
install_parts:
mkdir -p $(DESTDIR)$(LUA_SHAREDIR)
cp ldoc.lua $(DESTDIR)$(LUA_SHAREDIR)
cp -r ldoc $(DESTDIR)$(LUA_SHAREDIR)
@if [ ! -d "$(DESTDIR)$(LUA_BINDIR)" ]; then \
mkdir -vp "$(DESTDIR)$(LUA_BINDIR)"; \
fi
@mkdir -vp "$(DESTDIR)$(LUA_SHAREDIR)"
@cp -v ldoc.lua "$(DESTDIR)$(LUA_SHAREDIR)"
@cp -vr ldoc "$(DESTDIR)$(LUA_SHAREDIR)"
uninstall:
-rm $(DESTDIR)$(LUA_SHAREDIR)/ldoc.lua
-rm -r $(DESTDIR)$(LUA_SHAREDIR)/ldoc
-rm $(DESTDIR)$(LUA_BINDIR)/ldoc
@-rm -v "$(DESTDIR)$(LUA_SHAREDIR)/ldoc.lua"
@-rm -vr "$(DESTDIR)$(LUA_SHAREDIR)/ldoc"
@-rm -v "$(DESTDIR)$(LUA_BINDIR)/ldoc"
test: test-basic test-example test-md test-tables