Last active
August 29, 2015 14:10
-
-
Save poying/51906f328131e3ac084d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 當前目錄位置 | |
PREFIX = $(shell pwd) | |
WATCH = $(PREFIX)/bin/watch | |
watch: $(WATCH) | |
# 用 -s 來讓 make 安靜,不顯示 `make: Nothing to be done for `all'.` 這種訊息 | |
$(WATCH) -i 300ms make -s | |
# 安裝 watch 指令 | |
$(WATCH): | |
@-mkdir -p ./bin | |
@cd /tmp \ | |
&& git clone https://github.com/tj/watch.git \ | |
&& cd watch \ | |
&& PREFIX=$(PREFIX) make install \ | |
&& cd .. \ | |
&& rm -rf watch |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment