Is there a smarter alternative to “watch make”?

前端 未结 11 703
渐次进展
渐次进展 2021-02-01 15:28

I ran into this useful tip that if you\'re working on files a lot and you want them to build automatically you run:

watch make

And it re-runs make every couple s

11条回答
  •  無奈伤痛
    2021-02-01 16:19

    How about

    # In the makefile:
    .PHONY: continuously
    continuously:
        while true; do make 1>/dev/null; sleep 3; done  
    

    ?

    This way you can run

    make continuously

    and only get output if something is wrong.

提交回复
热议问题