[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: what is this shell call trying to solve?
From: |
Tom Tromey |
Subject: |
Re: what is this shell call trying to solve? |
Date: |
22 Jan 2002 13:02:09 -0700 |
>>>>> "Hari" == Raja R Harinath <address@hidden> 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
- what is this shell call trying to solve?, Phil Edwards, 2002/01/22
- Re: what is this shell call trying to solve?, Raja R Harinath, 2002/01/22
- Re: what is this shell call trying to solve?, Tom Tromey, 2002/01/22
- Re: what is this shell call trying to solve?, Alexandre Duret-Lutz, 2002/01/22
- Re: what is this shell call trying to solve?, Raja R Harinath, 2002/01/22
- Re: what is this shell call trying to solve?,
Tom Tromey <=
- Re: what is this shell call trying to solve?, Raja R Harinath, 2002/01/22
- Re: what is this shell call trying to solve?, Robert Collins, 2002/01/22
- Re: what is this shell call trying to solve?, Lars J. Aas, 2002/01/23
- Re: what is this shell call trying to solve?, Alexandre Duret-Lutz, 2002/01/23
- Re: what is this shell call trying to solve?, Gordon Matzigkeit, 2002/01/23
- Re: what is this shell call trying to solve?, Akim Demaille, 2002/01/23