[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Why is srcdir passed as .
From: |
Bernard Dautrevaux |
Subject: |
RE: Why is srcdir passed as . |
Date: |
Thu, 26 Oct 2000 10:24:05 +0200 |
> -----Original Message-----
> From: Mo DeJong [mailto:address@hidden
> Sent: Thursday, October 26, 2000 12:41 AM
> To: address@hidden
> Subject: Re: Why is srcdir passed as .
>
>
> On Wed, 25 Oct 2000, Ben Woodard wrote:
>
> > I am having a problem with my configure script where when
> configure is
> > called for the subprojects a parameter --srcdir=. is passed
> into them
> > when I just do configure. I expected that the srcdir would be ".." I
> > dug around in aceneral.m4 and found that it is quite deliberate. Why
> > is it done like this?
> >
> > In autoconf 2.13, acgeneral.m4 line 2558 it has:
> >
> > case "$srcdir" in
> > .) # No --srcdir option. We are building in place.
> > ac_sub_srcdir=$srcdir ;;
> > /*) # Absolute path.
> > ac_sub_srcdir=$srcdir/$ac_config_dir ;;
> > *) # Relative path.
> > ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
> > esac
> >
> > I don't see why you special case out ".". When I cut out
> that special
> > case. Things still seem to work. Is there some case that I'm not
> > testing in which this would cause problems.
> >
> > -ben
>
>
> Good question. I have a bunch of configure scripts where
> I have to do:
>
> srcdir=`cd $srcdir ; pwd`
>
> at the top of the file to get around problems created
> by this special case. Because of it, I can not cd
> to some dir and then cd back to $srcdir. Whats the deal?
I think there is two problems here:
Ben seems to use $srcdir where it meant $top_srcdir :-) (If we build
in-place, then $srcdir == $builddir in all the tree).
Mo on the contrary is bothered by the fact that $srcdir is relative; just
calling "./configure -srcdir=/absolute/path/to/srcdir" shoudl solve the
problem.
Regards,
Bernard
PS: IIUC, the special case of "." is just to avoid getting, in some second
level subdirectory name lib/somelib, srcdir set to
"../lib/../../lib/somelib" which is almost equivalent (but a lot longer) to
"." ;-) The "almost" above is for the case where "lib" is in fact a link to
"../../commonlibs". In this case "." would be correct while
"../lib/../../lib/somelib" would yield a "file not found" error somewhere
;-?
--------------------------------------------
Bernard Dautrevaux
Microprocess Ingenierie
97 bis, rue de Colombes
92400 COURBEVOIE
FRANCE
Tel: +33 (0) 1 47 68 80 80
Fax: +33 (0) 1 47 88 97 85
e-mail: address@hidden
address@hidden
--------------------------------------------
- Why is srcdir passed as ., Ben Woodard, 2000/10/25
- RE: Why is srcdir passed as .,
Bernard Dautrevaux <=
- Re: Why is srcdir passed as ., Lars J. Aas, 2000/10/26
- Re: Why is srcdir passed as ., Thomas E. Dickey, 2000/10/26
- Re: Why is srcdir passed as ., Akim Demaille, 2000/10/26
- Re: Why is srcdir passed as ., Thomas E. Dickey, 2000/10/26
- Re: Why is srcdir passed as ., Akim Demaille, 2000/10/26
- Re: Why is srcdir passed as ., Thomas E. Dickey, 2000/10/26
- Re: Why is srcdir passed as ., Akim Demaille, 2000/10/26
Re: Why is srcdir passed as ., Ben Woodard, 2000/10/26