Last active
September 20, 2020 01:22
-
-
Save nyaocat/660637260d0bfe231aa752b89c437856 to your computer and use it in GitHub Desktop.
make を継続的に実行するコマンド
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
#!/bin/bash | |
# w-make コマンド | |
# このファイルを PATH の通った場所に実行属性付きで w-make として保存し、 | |
# `make xxx` の代わりに `w-make xxx` を実行すると必要な依存ファイルの変更を監視して継続的に make をたたく | |
# 要: make, inotifywait, perl | |
while : | |
do | |
make "$@" | |
inotifywait -q -e close $(LANG=C make -dn "$@" | perl -wnle "/^ *Considering target file '(.*)'\.\$/ and -f \$1 and print \$1") > /dev/null | |
done | |
autotools が生成するような Makefile に対して無力なのでこれは微妙です
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
GNU Make じゃないと動きません