How to use shell builtin function from a Makefile?

后端 未结 5 1488
一个人的身影
一个人的身影 2020-12-16 22:02

I just stumbled on this problem. I tried to write a very basic Makefile target:

core: myprogram
        ulimit -c 10000
        ./myprogram
             


        
5条回答
  •  死守一世寂寞
    2020-12-16 22:43

    You can say:

    core: myprogram
            $(shell /bin/bash -c "ulimit -c 10000")
            ./myprogram
            $(shell /bin/bash -c "ulimit -c 0")
    

提交回复
热议问题