From 55551592563c26d28c62d055e3ebc657ad687a0a Mon Sep 17 00:00:00 2001 From: Jannis Pohlmann Date: Mon, 19 Mar 2012 19:26:28 +0000 Subject: Add tbdiff.morph and DESTDIR support to Makefile. --- Makefile | 12 ++++++++---- tbdiff.morph | 10 ++++++++++ 2 files changed, 18 insertions(+), 4 deletions(-) create mode 100644 tbdiff.morph 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" + ] +} -- cgit v1.2.1