"Paul D. Smith" <[EMAIL PROTECTED]> writes:
> %% Assar Westerlund <[EMAIL PROTECTED]> writes:
>
> aw> While building the current autoconf with gnu-make 3.75 I've had
> aw> problems in `man', since $* did get expanded to the complete path of
> aw> the dependency and not just the file name. I've seen similar
> aw> behaviour from other instances of make, and while not knowing what is
> aw> the correct way for making to behave here I think some extra care
> aw> doesn't hurt.
>
> The $* variable always expands to the entire part of the target filename
> which _doesn't_ match the suffix.
> If the suffix is ".x" and the target is "foo.x", then $* is foo. If the
> target is "/bar/baz/biz/foo.x", then $* is /bar/baz/biz/foo.
Weird. I had the following case (hopefully these parts of the
Makefile are enough), from autoconf's man/Makefile.am:
srcdir = /a/long/path/man
top_srcdir = /a/long/path
VPATH = /a/long/path/man
top_builddir = ..
.x.1:
if test -f $(top_builddir)/$*; then \
...
and I was getting:
if test -f ..//a/long/path/man/autoconf; then \
Since the target should have been "autoconf.1", I don't see why the
vpath gets added to $* ?
And is using basename a reasonably solution in this case?
/assar