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

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -