guile-devel
[Top][All Lists]
Advanced

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

Re: Problem building CVS Guile with automake 1.6.1


From: Matthias Koeppe
Subject: Re: Problem building CVS Guile with automake 1.6.1
Date: Fri, 26 Apr 2002 16:37:29 +0200
User-agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.1.80 (sparc-sun-solaris2.7)

Alexandre Duret-Lutz <address@hidden> writes:

>>>> "Matthias" == Matthias Koeppe <address@hidden> writes:
>
>  Matthias> Guile's `guile-aclocal.sh' script fails with automake
>  Matthias> 1.6.1.  Here is the relevant part:
>
>  >> # copy all installed aclocal files into $temp
>  >> cp `aclocal --print-ac-dir`/*.m4 $temp
>  >> 
>  >> # remove the .m4 files installed by Guile from $temp, so they don't
>  >> # cause conflicts
>  >> rm -f ${temp}/guile.m4 ${temp}/qthreads.m4
>  >> 
>  >> aclocal --acdir=$temp -I .
>
> This is a work-around makes sense up to Automake 1.4.
> It still works with 1.5.
> It breaks with recent versions.
>
> aclocal from Automake 1.4 chokes when a -I supplied macro
> override a /usr/share/aclocal/ macro, hence your script.
>
> Starting with Automake 1.5, a macro supplied with -I will
> override any macro installed in /usr/share/aclocal/, so
> you simply have to run
>
>   aclocal -I .
>
> (no cp, rm, or --acdir)
>
> [...]

Alexandre, thank you very much for the detailed explanation.  

Dear Guile maintainers: I have prepared the patch below, which checks
for Automake 1.4, for which the work-around is still used; for newer
automake, aclocal is called directly.  (Alternatively, one could
require Automake 1.5 for hacking Guile and get rid of the work-around
altogether.)

-- Matthias

--- guile-aclocal.sh.~1.1~      Thu Jun  1 17:10:50 2000
+++ guile-aclocal.sh    Fri Apr 26 14:46:04 2002
@@ -1,19 +1,25 @@
-#!/bin/sh
+#!/bin/sh -x
 
-temp=/tmp/guile-aclocal.$$
-trap "rm -rf $temp" 0 1 2 15
+if aclocal --version | head -1 | grep '1\.4' > /dev/null ; then
+    ## Workaround for Automake < 1.5:
+    temp=/tmp/guile-aclocal.$$
+    trap "rm -rf $temp" 0 1 2 15
 
-mkdir $temp
-[ -d $temp ] || {
-  echo "guile-aclocal.sh: cannot create temp directory"
-  exit 1
-}
+    mkdir $temp
+    [ -d $temp ] || {
+       echo "guile-aclocal.sh: cannot create temp directory"
+       exit 1
+    }
 
-# copy all installed aclocal files into $temp
-cp `aclocal --print-ac-dir`/*.m4 $temp
+    # copy all installed aclocal files into $temp
+    cp `aclocal --print-ac-dir`/*.m4 $temp
 
-# remove the .m4 files installed by Guile from $temp, so they don't
-# cause conflicts
-rm -f ${temp}/guile.m4 ${temp}/qthreads.m4
+    # remove the .m4 files installed by Guile from $temp, so they don't
+    # cause conflicts
+    rm -f ${temp}/guile.m4 ${temp}/qthreads.m4
 
-aclocal --acdir=$temp -I .
+    aclocal --acdir=$temp -I .
+else
+    ## Automake >= 1.5 works
+    aclocal -I .
+fi

-- 
Matthias Köppe -- http://www.math.uni-magdeburg.de/~mkoeppe



reply via email to

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