Skip to content

Commit

Permalink
Improved Makefile: it recompiles when needed, and only when needed
Browse files Browse the repository at this point in the history
  • Loading branch information
Vincent Bernardoff committed Apr 10, 2013
1 parent ea71271 commit 858a98d
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,29 @@ BINDIR?=/tmp/bin
ETCDIR?=/tmp/etc
INITDIR?=/tmp/etc/init.d

dist/build/squeezed/squeezed:
all: squeezed

dist/setup: squeezed.obuild
obuild configure

.PHONY: dist/build/squeezed/squeezed
dist/build/squeezed/squeezed: dist/setup
obuild build

dist/build/test/test:
obuild configure
.PHONY: dist/build/test/test
dist/build/test/test: dist/setup
obuild build

test: dist/build/test/test
./dist/build/test/test

squeezed: dist/build/squeezed/squeezed

install: dist/build/squeezed/squeezed
install -D -m 0755 dist/build/squeezed/squeezed ${BINDIR}/squeezed
install -D -m 0644 scripts/squeezed.conf ${ETCDIR}/squeezed.conf
install -D -m 0755 scripts/init.d-squeezed ${INITDIR}/squeezed

.PHONY: uninstall
uninstall:
rm -f ${BINDIR}/squeezed
Expand All @@ -25,4 +33,4 @@ uninstall:

.PHONY: clean
clean:
rm -rf dist
obuild clean

0 comments on commit 858a98d

Please sign in to comment.