autoconf
[Top][All Lists]
Advanced

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

Re: compile wrapper script with C++ file


From: Eric Blake
Subject: Re: compile wrapper script with C++ file
Date: Fri, 04 Sep 2009 06:27:57 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

[adding bug-automake]

According to David Byron on 8/14/2009 1:57 PM:

Hi David,

Thanks for the report, and sorry for the delayed reply...

> I'm not sure whether this is something I'm doing wrong or something wrong
> with automake, autoconf or libtool.  At the moment I'm leaning to autoconf +
> automake.

compile is maintained by automake, so I've redirected your patch there.
FWIW, it looks okay to me, but Ralf will have to chime in.

> I get a step closer but I needed to modify the compile script as well (see
> below).  With both of these changes, everything (C and C++) compile fine and
> the objects go where they're supposed to.  Is the kind of thing that could
> make its way upstream (maybe even for .cpp file support as well)?  I'm not
> sure how to modify autoconf/configure to do what I did manually...or even
> if's the "right thing".  
> 
> $ diff -u compile compile.dbyron
> --- compile     Fri Aug 14 12:37:10 2009
> +++ compile.dbyron      Fri Aug 14 12:38:02 2009
> @@ -1,7 +1,7 @@
>  #! /bin/sh
>  # Wrapper for compilers which do not understand `-c -o'.
> 
> -scriptversion=2009-04-28.21; # UTC
> +scriptversion=2009-08-14.19; # UTC
> 
>  # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009  Free Software
>  # Foundation, Inc.
> @@ -79,7 +79,7 @@
>             ;;
>         esac
>         ;;
> -      *.c)
> +      *.c|*.cc)
>         cfile=$1
>         set x "$@" "$1"
>         shift
> @@ -103,7 +103,7 @@
>  fi
> 
>  # Name of file we expect compiler to create.
> -cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
> +cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/;
> s/\.cc$/.o/'`
> 
>  # Create the lock directory.
>  # Note: use `[/\\:.-]' here to ensure that we don't use the same name
> 

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkqhB8wACgkQ84KuGfSFAYDGJgCfQniR5c/EBpgy6K7mT1b1mJT6
gpAAn314VNfFj1h2Kl4yAElGM+c8ItkM
=4GSc
-----END PGP SIGNATURE-----




reply via email to

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