如何从Makefile运行bash脚本? [英] How to run a bash script from a Makefile?

查看:76
本文介绍了如何从Makefile运行bash脚本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Makefile,我想从中调用另一个外部bash脚本来完成建筑物的另一部分.我最好怎么去做?

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?

推荐答案

就像从makefile调用其他任何命令一样:

Just like calling any other command from a makefile:

target: prerequisites
    shell_script arg1 arg2 arg3

关于您的进一步解释:

.PHONY: do_script

do_script: 
    shell_script arg1 arg2 arg3

prerequisites: do_script

target: prerequisites 

这篇关于如何从Makefile运行bash脚本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆