How to run a bash script from a Makefile?

后端 未结 3 1305
伪装坚强ぢ
伪装坚强ぢ 2021-02-01 01:48

I have a Makefile from which I want to call another external bash script to do another part of the building. How would I best go about doing this?

3条回答
  •  借酒劲吻你
    2021-02-01 02:13

    Just like calling any other command from a makefile:

    target: prerequisites
        shell_script arg1 arg2 arg3
    

    Regarding your further explanation:

    .PHONY: do_script
    
    do_script: 
        shell_script arg1 arg2 arg3
    
    prerequisites: do_script
    
    target: prerequisites 
    

提交回复
热议问题