On Thu, 2010-07-29 at 11:20 -0500, Peng Yu wrote:
> $(dir somevariable) gives the directory but with a trailing '/'. I
> could use $(patsubst ) to remove the trailing '/'. But I'm wondering
> what is the best way to get the dir without the trailing character in
> GNU Make?
This was asked just a few days ago. The standard way is:
$(patsubst %/,%,$(dir $(sompath)))
--
-------------------------------------------------------------------------------
Paul D. Smith <[email protected]> Find some GNU make tips at:
http://www.gnu.org http://make.mad-scientist.net
"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