linux - Makefile: Perform specific command when one file was updated after another one -
i have makefile calls bash scripts , shell commands.
1 of scripts generates code (say, generated.h) file according code file (say source.h) - , want called if source.h updated after generated.h updated.
(in pseudo code:
if update_time(generated.h) < update_time(source.h) call generatecodefile.sh end if
)
how can within makefile?
thanks.
generated.h: source.h sh generatecodefile.sh
be aware that's literal <tab>
character @ start of sh
line.
Comments
Post a Comment