automake-patches
[Top][All Lists]
Advanced

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

Re: Patch to fix handling of source files names containing literal '$'


From: Anselm Kruis
Subject: Re: Patch to fix handling of source files names containing literal '$'
Date: Fri, 9 Jan 2004 10:00:31 +0100 (CET)

On Fri, 9 Jan 2004, Alexandre Duret-Lutz wrote:

> >>> "Anselm" == Anselm Kruis <address@hidden> writes:
>
>  Anselm> Hi,
>
>  Anselm> Problem: automake does'nt handle filenames containing
>  Anselm> literal '$' very well. Example:
>
>  Anselm> Consider compiling a file named 'filewith$dollar.c". Then Makefile.am
>  Anselm> might contain thei line:
>
>  Anselm> my_programm_SOURCES = \
>  Anselm> filewith$$dollar.c \
>  Anselm> other_source.c \
>  Anselm> ...
>
>  Anselm> config.status scans the Makefile and doesn't reduce the
>  Anselm> double '$$' to a single '$ as make does.
>
>  Anselm> The patch fixes this problem by adding an additional
>  Anselm> sed expression to the code, that handles the DEP_FILES
>  Anselm> definition from the Makefile.
> [...]
>  Anselm> ChangeLog:
>  Anselm> * m4/depout.m4: reduce '$$' in file names to '$'.
>
> Thanks for the patch and sorry for the long delay.
>
> Unfortunately, such a change does not seem to be enough.  It will
> let ./configure finish, however make will fail to compile
> filewith$dollar.c, because when the compiler is called as
>    gcc -c -o filewith$dollar.obj filewith$dollar.c
> $dollar will be interpreted by the shell.

Hmm, I didn't see this problem, but see below.

>
> For this to work, we should quote these filenames properly in
> the rule.  Although it is not impossible, it's not easy to do in
> the current (CVS) code because there are cases where automake
> puts filenames in shell variables which are expected to be
> interpreted...
>
> Before spending time on this I'd really like to know why you
> need `$' for.

Hi,

finally I didn't need the names containing a '$' at all. :-)
I was creating autoconf/automake/libtool files for a java / gcj project
and tried to complile some class files containing nested classes. These
files have names similar to "xyz$abc.class".

Thas's how I discovered the problem with automake and filenames containing
a '$'. I fixed the problem and discovered linkage problems with the
compiled *.class files. The solution was to build a jar archive containing
the *.class files and to compile this archive. Nevertheless I thought my
patch might be usefull in some cases. That's, why I submitted the patch.

Regards
  Anselm


> --
> Alexandre Duret-Lutz
>

---
 Anselm Kruis                                   science + computing ag
 Senior Consultant Professional Services        Ingolstädter Str. 22
 email address@hidden             80807 München, Germany
 phone +49 89 356386 874                        www.science-computing.de
 fax   +49 89 356386 737




reply via email to

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