%% [EMAIL PROTECTED] writes: k> make 3.79.1, solaris 2.7, compiled with gcc 2.95.2.
k> Here's a two-line GNUmakefile: k> default: k> @echo $(basename /src/foo) k> And here's the output of running it: k> $ make -f m k> /src/foo k> Shouldn't that just be `foo'? Nope. Confusingly enough, the basename function in make doesn't emulate all of the behavior of the basename program in the shell. It _only_ does the "strip the suffix" part. The manual sez: `$(basename NAMES...)' Extracts all but the suffix of each file name in NAMES. If the file name contains a period, the basename is everything starting up to (and not including) the last period. Periods in the directory part are ignored. If there is no period, the basename is the entire file name. For example, $(basename src/foo.c src-1.0/bar hacks) produces the result `src/foo src-1.0/bar hacks'. What you want is $(notdir ...), not $(basename ...) ... -- ------------------------------------------------------------------------------- Paul D. Smith <[EMAIL PROTECTED]> Find some GNU make tips at: http://www.gnu.org http://www.paulandlesley.org/gmake/ "Please remain calm...I may be mad, but I am a professional." --Mad Scientist _______________________________________________ Bug-make mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-make