Makefile: Passing command line arguments to file inside Makefile

后端 未结 2 2022
滥情空心
滥情空心 2021-02-04 16:23

Inside my Makfile I have the following,

smktestrun: smktest
    @../projects/test.sh

And I call this using:

Make smktestrun
<         


        
2条回答
  •  星月不相逢
    2021-02-04 16:48

    Something like

    smktestrun: smktest
            @../projects/test.sh $(TESTARGS)
    

    Then call the Makefile with

    $ make smktestrun TESTARGS="-abc"
    

提交回复
热议问题