开发者

Makefile: Multiple targets, one dependency

开发者 https://www.devze.com 2023-02-11 09:57 出处:网络
I have a script that generates 2 code files (For example, src1.c, src2.c) according to another code file (say origin.h).

I have a script that generates 2 code files (For example, src1.c, src2.c) according to another code file (say origin.h).

I use a makefile to build them.

Now, I want the script to be executed when src1.c OR src2.c is older that origin.h. 开发者_JAVA技巧

What is the best way to do that?

Thanks.


Make src1.c and src2.c jointly dependent on origin.h:

src1.c src2.c : origin.h
        build-sources
0

精彩评论

暂无评论...
验证码 换一张
取 消