summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJannis Pohlmann <jannis.pohlmann@codethink.co.uk>2012-03-19 19:26:28 +0000
committerJannis Pohlmann <jannis.pohlmann@codethink.co.uk>2012-03-19 19:34:55 +0000
commit55551592563c26d28c62d055e3ebc657ad687a0a (patch)
tree869fbbf4a4d4cdfd9b984174b8398288081ec5a6
parentad74a519d62d85f14da8497f8da3b3a32f834ebb (diff)
downloadtbdiff-55551592563c26d28c62d055e3ebc657ad687a0a.tar.gz
Add tbdiff.morph and DESTDIR support to Makefile.
-rw-r--r--Makefile12
-rw-r--r--tbdiff.morph10
2 files changed, 18 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 3c83800..da4a3c1 100644
--- a/Makefile
+++ b/Makefile
@@ -4,6 +4,9 @@ CC := gcc
OPT ?= -O2
+DESTDIR = /
+PREFIX = /usr
+
DEPLOY=tbdiff-deploy
CREATE=tbdiff-create
@@ -34,12 +37,13 @@ ifeq (,$(findstring clean,$(MAKECMDGOALS)))
endif
install: $(DEPLOY) $(CREATE)
- install $(CREATE) /usr/local/bin
- install $(DEPLOY) /usr/local/bin
+ install -m 755 -d $(DESTDIR)$(PREFIX)/bin
+ install $(CREATE) $(DESTDIR)$(PREFIX)/bin
+ install $(DEPLOY) $(DESTDIR)$(PREFIX)/bin
uninstall:
- rm -rf /usr/local/bin/$(DEPLOY)
- rm -rf /usr/local/bin/$(CREATE)
+ rm -rf $(DESTDIR)/$(DEPLOY)
+ rm -rf $(DESTDIR)/$(CREATE)
test:
cd tests && ./run_tests.sh && fakeroot -- ./cross_plat.sh && cd ..
diff --git a/tbdiff.morph b/tbdiff.morph
new file mode 100644
index 0000000..94ed111
--- /dev/null
+++ b/tbdiff.morph
@@ -0,0 +1,10 @@
+{
+ "name": "tbdiff",
+ "kind": "chunk",
+ "build-commands": [
+ "make"
+ ],
+ "install-commands": [
+ "make PREFIX=\"/usr\" DESTDIR=\"$DESTDIR\" install"
+ ]
+}