Makefile run processes in background

后端 未结 3 1874
清歌不尽
清歌不尽 2020-12-19 01:03

I have this in my Makefile:

run:
     for x in *.bin ; do ./$$x ; done

such that it launches all executables one by one. I want to do this:

3条回答
  •  感情败类
    2020-12-19 02:03

    Try:

    run:
        for x in *.bin ; do (./$$x &) ; done
    

    The ()'s run the command in a subshell.

提交回复
热议问题