automake-patches
[Top][All Lists]
Advanced

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

Re: subobj8.test fix + am_aux_dir issues


From: Tom Tromey
Subject: Re: subobj8.test fix + am_aux_dir issues
Date: 18 Jul 2001 22:00:48 -0600

>>>>> "adl" == Alexandre Duret-Lutz <address@hidden> writes:

adl> The patch below should fix subobj8.test, using
adl> require_config_file as you suggested.

Looks good.

adl> However it makes no sense to install compile in the right place
adl> (aux_dir) if AC_PROG_CC_C_O is not made aux_dir-aware, and this
adl> in turn can't be done until something is settled about $am_aux_dir.

I agree.  Just last night I also did some work in this area.  I tried
to fix ccnoco.test.  The appended patch is what I came up with for
minuso.m4.

This patch is ugly, for the reasons listed in the FIXME comment.  Also
it doesn't work with an aux dir.  On the other hand, the ugliness
probably isn't too important since this code is only used in a fairly
unusual case -- a compiler that doesn't understand `-c -o', and the
Makefile at some point requires both (for instance, per-exe CFLAGS
will create this situation).

adl> I don't know if you have a plan about this, I think it might
adl> work if we define $am_aux_dir from $ac_aux_dir after
adl>   1) removing a possible $srcdir/ prefix added by Autoconf
adl>   2) prepending $(top_srcdir)/

This is ok but...

adl> However, since $ac_aux_dir is safe to use from configure, all we
adl> have to do is to check script existence or features using
adl> $ac_aux_dir but use $am_aux_dir for AC_SUBSTed values.

I don't know if we can always guarantee this.
For instance, in minuso.m4 we couldn't.
Someone might plausibly try to use $CC after calling AM_PROG_CC_C_O.
I guess this is really a constraint on how am_aux_dir can be used.
But working with it seems hard.

Tom

Index: m4/minuso.m4
===================================================================
RCS file: /cvs/automake/automake/m4/minuso.m4,v
retrieving revision 1.3
diff -u -r1.3 minuso.m4
--- m4/minuso.m4 2001/01/16 11:04:36 1.3
+++ m4/minuso.m4 2001/07/19 00:50:37
@@ -11,6 +11,10 @@
 ac_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
    # Losing compiler, so override with the script.
-   CC="\$(top_srcdir)/compile $CC"
+   # FIXME: it is wrong to use cd here.  It is also wrong to rewrite CC.
+   # But if we don't then we get into trouble of one sort or another.
+   # A longer-term fix would be to have automake use am__CC in this case,
+   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+   CC="`CDPATH=:; cd $srcdir && pwd`/compile $CC"
 fi
 ])



reply via email to

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