%% Torsten Mohr <[EMAIL PROTECTED]> writes:

  tm> the commands in a certain rule to generate a target always give
  tm> a return code different to 0x00.

  tm> This is known and ok, the wanted output file is generated.

  tm> At the moment i have a rule like this:

  tm> $(OUTPUT) : $(INPUT)
  tm>         -command -o $@ -c $<


  tm> I'd like to have something like this:

  tm> $(OUTPUT) : $(INPUT)
  tm>         -command -o $@ -c $<
  tm>         fail_if_target_does_not_exist_or_is_older_than_input $@ $<

  tm> Is something like this possible?

Well, of course you can do it in the shell:

 $(OUTPUT) : $(INPUT)
        -command -o $@ -c $<
        @[ -f $@ -a $@ -nt $< ]

It seems like there should be a way to get make to do this, since that's
what make does, but I can't think of one offhand.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <[EMAIL PROTECTED]>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.paulandlesley.org
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist


_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to