02-14-06 10:54 PM
On 14/02/2006, Paul D. Smith wrote:
> The GNU make manual says:
>
>
> Your use of the tilde, "-I~/mylibs", is not at the beginning of the
> word: it's in the middle. Thus it isn't eligible for tilde expansion.
What was confusing me was the statement "The character `~' at the
beginning of a file name". In my example, the tilde was at the
beginning of the file name, but was not the beginning of a token.
> You need to write "-I ~/mylibs". Even that isn't a guarantee (see
> below). I suggest you just write "-I$(HOME)/mylibs" instead
Thanks - this works as expected.
> (although
> of course, having a makefile depend on the content of your home
> directory is just asking for trouble in general).
Fair comment. I want to set up a source tree where developers can work
on their bits, but where the same makefiles will work when it all comes
together. In the past I've done this by giving the project its own
login for the production code, so that there's always a home directory.
Individual developers can copy a subset or all of the project to their
own space and the makefiles still allow them to buld their bits.
I expect there are other (better?) ways of skinning this cat.
> The GNU make manual also says:
>
>
> I think this should be more clear, that not all shells do
> tilde-expansion and thus expansion in commands is not guaranteed.
Yes. In my initial google search for a solution, the most common cause
of tilde not working was that the shell didn't support it.
--
Simon Elliott http://www.ctsn.co.uk
[ Post a follow-up to this message ]
|