Dear GNU make experts,
Do you know why
default:
g=$(basename file.ext); \
/bin/echo g=$$g;
produces "g=file", while
default:
f=file.ext; \
g=$(basename $$f); \
/bin/echo g=$$g;
"g=file.ext".
How to extract the basename of $f in the second case?
Thank you in advence,
Val.
It needs another $:
...
g=$$(basename $$f); \
...
So that it gets passed to the shell as $(basename $f).
$(basename ...) is GNU make's basename function, while you want the Unix
basename and command-substitution, which is $$(basename ...).
Thanks,
Lee
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make