I have a makefile which calls some bash scripts and shell commands.
One of those scripts generates a code (say, generated.h) file according to another code file (say source.h) - and I want it to be called only if source.h was updated after generated.h was updated. (In pseudo code:if update_time(generated.h) < update_time(source.h)
call GenerateCodeFile.sh
end if
)
How can I do it from with开发者_StackOverflow中文版in a makefile?
Thanks.
generated.h: source.h
sh GenerateCodeFile.sh
Be aware that that's a literal <TAB>
character at the start of the sh
line.
精彩评论