Permalink
Browse files

Makefile: refactor with install

  • Loading branch information...
fperrad committed Aug 1, 2012
1 parent 08066e3 commit 18d128b659c9f8e147c95e5a694334697e364421
Showing with 4 additions and 6 deletions.
  1. +4 −6 Makefile
View
@@ -2,22 +2,20 @@
LUA := lua
VERSION := $(shell cd src && $(LUA) -e "m = require [[Coat.Persistent]]; print(m._VERSION)")
TARBALL := lua-coatpersistent-$(VERSION).tar.gz
-ifndef REV
- REV := 1
-endif
+REV := 1
LUAVER := 5.1
PREFIX := /usr/local
DPREFIX := $(DESTDIR)$(PREFIX)
LIBDIR := $(DPREFIX)/share/lua/$(LUAVER)
+INSTALL := install
all: dist.cmake
@echo "Nothing to build here, you can just make install"
install:
- mkdir -p $(LIBDIR)/Coat/Persistent
- cp src/Coat/Persistent.lua $(LIBDIR)/Coat
- cp src/Coat/Persistent/lsqlite3.lua $(LIBDIR)/Coat/Persistent
+ $(INSTALL) -m 644 -D src/Coat/Persistent.lua $(LIBDIR)/Coat/Persistent.lua
+ $(INSTALL) -m 644 -D src/Coat/Persistent/lsqlite3.lua $(LIBDIR)/Coat/Persistent/lsqlite3.lua
uninstall:
rm -f $(LIBDIR)/Coat/Persistent.lua

0 comments on commit 18d128b

Please sign in to comment.