Skip to content

Commit

Permalink
Have Makefile intospect it's working directory
Browse files Browse the repository at this point in the history
  • Loading branch information
jof committed Dec 16, 2011
1 parent 6e8d577 commit 56750ec
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Makefile
@@ -1,14 +1,15 @@
CFLAGS=-Wall -O2
# Conditionally assign DESTDIR
DESTDIR ?= /usr/local
TOP := $(dir $(lastword $(MAKEFILE_LIST)))

.PHONY: install upstart all clean

all: gateman
install: gateman upstart
install --mode=0755 --owner=root --group=root ./gateman $(DESTDIR)/sbin
install --mode=0755 --owner=root --group=root $(TOP)/gateman $(DESTDIR)/sbin
upstart: upstart-gateman.conf
install --mode=0644 --owner=root --group=root ./upstart-gateman.conf /etc/init/noisebridge-gateman.conf
install --mode=0644 --owner=root --group=root $(TOP)/upstart-gateman.conf /etc/init/noisebridge-gateman.conf
test:
@echo "DESTDIR is ${DESTDIR}"
clean:
Expand Down

0 comments on commit 56750ec

Please sign in to comment.