Permalink
Browse files

Makefile: allow to specify TARGET other than $HOME

  • Loading branch information...
erszcz committed Mar 25, 2012
1 parent 8032001 commit 96e8d249d7618db8ca7bfe85844293196e6b9c4a
Showing with 13 additions and 2 deletions.
  1. +13 −2 Makefile
View
@@ -1,4 +1,15 @@
+ifdef TARGET
+ TARGET = $$TARGET
+else
+ TARGET = $$HOME
+endif
+
diff:
- for file in `find . -path ./.git -prune -o -type f -print`; \
- do diff -u $$file ~/$$file; \
+ @if [ -n "$$file" ]; then \
+ FILES=$$file; \
+ else \
+ FILES=`find . -path ./.git -prune -o -type f -print`; \
+ fi; \
+ for f in $$FILES; do \
+ diff -u $$f $(TARGET)/$$f || echo; \
done

0 comments on commit 96e8d24

Please sign in to comment.