configure with relative srcdir causing absolute pathname in gcc/Makefile

Ian Lance Taylor ian@airs.com
Thu May 30 17:16:00 GMT 2002


Doug Evans <dje@transmeta.com> writes:

>  > > this is supposed to avoid absolute pathnames appearing in Makefiles.
>  > > This makes it easy to move the tree around.
>  > > [at least things used to work that way, dunno if this is a documented rule]
>  > 
>  > Probably just a coincidence that it worked that way.  I don't
>  > think a relative srcdir *should* differ from an absolute one.
> 
> When I was at Cygnus I _seem_ to recall it being defined the way
> I indicate and effort being made to make it work that way.
> Ian, am I misremembering?

You remember correctly.  That was in large part in those days of
yesteryear running pwd on an automounted partition would return
something goofy which would not work after the automounter had timed
out the partition mount.  So embedding an absolute path in a Makefile
meant that if you went back after the nightly build had failed and
tried to run make, it didn't work since the automounter had timed out
the mount and you had references to directories with goofy names which
no longer existed.

Today's automounters use modern technology and pwd returns a
reasonable path, so that particular argument is no longer valid.

I personally never tried to move build trees around, and I've never
thought about the issues involved there.  I often moved installed
trees around, and I assume that that still works, perhaps with
appropriate environment variables.

Ian



More information about the Binutils mailing list