Is there a smarter alternative to “watch make”?

前端 未结 11 711
渐次进展
渐次进展 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:04

    @Dobes Vandermeer -- I have a script named "mkall" that runs make in every subdirectory. I could assign that script as a cron job to run every five minutes, or one minute, or thirty seconds. Then, to see the output, I'd redirect gcc results (in each individual makefile) to a log in each subdirectory.

    Could something like that work for you?

    It could be pretty elaborate so as to avoid makes that do nothing. For example, the script could save the modify time of each source file and do the make when that guy changes.

提交回复
热议问题