automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: automake 1.7 branch & DJGPP [PATCH]


From: Richard Dawe
Subject: Re: automake 1.7 branch & DJGPP [PATCH]
Date: Tue, 11 Feb 2003 09:29:00 +0000

Hello.

Alexandre Duret-Lutz wrote:
> 
> >>> "adl" == Alexandre Duret-Lutz <address@hidden> writes:
> 
> [...]
> 
>  adl> I edited this part slightly as follows.  Let me know if I broke
>  adl> something else.
> 
> What a bummer.
> 
> Index: bootstrap
> ===================================================================
> RCS file: /cvs/automake/automake/bootstrap,v
> retrieving revision 1.5
> diff -u -r1.5 bootstrap
> --- bootstrap   10 Feb 2003 23:33:49 -0000      1.5
> +++ bootstrap   10 Feb 2003 23:53:32 -0000
> @@ -75,7 +75,7 @@
>  rm -rf aclocal-$APIVERSION
>  mkdir aclocal-$APIVERSION
>  rm -rf automake-$APIVERSION
> -ln -s lib automake-$APIVERSION || {
> +ln -s lib automake-$APIVERSION >/dev/null 2>&1 || {
>    mkdir automake-$APIVERSION
>    cp -arf lib/* automake-$APIVERSION
>  }

Unfortunately this won't work either.

"ln -s" does special things in DJGPP 2.03. Example:

    ln -s a b

will create a stub executable "b.exe" that will call program "a". It does not
create a file called "b" - you can use this in run-time tests.

So the change above will create a symlink "automake-${APIVERSION}.exe", which
attempts to call "lib".

You could do a run-time test, to see if "ln -s" works as you expect. But I
thought it would be simpler just to use cp.

autoconf uses run-time tests. Here's a run-time test from a configure script:

rm -f conf$$ conf$$.exe conf$$.file
echo >conf$$.file
if ln -s conf$$.file conf$$ 2>/dev/null; then
  # We could just check for DJGPP; but this test a) works b) is more generic
  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
  if test -f conf$$.exe; then
    # Don't use ln at all; we don't have any links
    as_ln_s='cp -p'
  else
    as_ln_s='ln -s'
  fi
elif ln conf$$.file conf$$ 2>/dev/null; then
  as_ln_s=ln
else
  as_ln_s='cp -p'
fi
rm -f conf$$ conf$$.exe conf$$.file

Thanks, bye, Rich =]

PS: I won't have e-mail access for a week starting this afternoon.

-- 
Richard Dawe [ http://www.phekda.freeserve.co.uk/richdawe/ ]




reply via email to

[Prev in Thread] Current Thread [Next in Thread]