Hello Lorenzo, * Lorenzo Bettini wrote on Mon, Sep 14, 2009 at 09:19:16AM CEST: > In a Makefile.am I'd like to use $(notdir $<) but that's a GNU make > extension... is there a way of achieving the same result in a > portable way? Does automake provide a special variable/function for > that?
As long as you don't need to support backslashes and drive specs, you can use echo $< | sed 's,.*/,,' For these occasions, basename is probably just as portable. But please note that using $< is portable only inside inference rules. Cheers, Ralf