This is the mail archive of the
automake@gnu.org
mailing list for the automake project.
Re: what is this shell call trying to solve?
>>>>> "Hari" == Raja R Harinath <harinath@cs.umn.edu> writes:
Tom> For explicit rules (not suffix rules), there are some macros like
Tom> $< that we can't use.
Hari> But, we're talking about suffix rules like
Hari> [ ... ]
Hari> $(LTCOMPILE) -c -o $@ `test -f $< || echo '$(srcdir)/'`$<
I think that is probably a bug. I can't think of why we'd be doing
that intentionally. Can you? Akim, do you know?
Tom> So we have to do srcdir-searching by hand in explicit rules for
Tom> GNU make, so that the code will continue to work in a
Tom> srcdir-build context for vendor makes.
Hari> Why would one do this the complicated way? You already know
Hari> explicitly where source file is, so why would you fix it up with
Hari> the shell fragment above?
The source file might be a built object and end up in the build
directory. For a vendor make we know the two directories are the
same, but we can't use $<. For GNU make the directories might be
different, so we must search.
Occasionally I've considered adopting a rule that if the source file
doesn't have a target, then we know we can use $(srcdir). I'm a bit
afraid to do this, though, since there might be weird cases I haven't
thought of (but which some user has :-).
Tom