automake
[Top][All Lists]
Advanced

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

Re: C# support for automake


From: Bruno Haible
Subject: Re: C# support for automake
Date: Mon, 5 Dec 2005 22:56:04 +0100
User-agent: KMail/1.5

Ralf Wildenhues wrote:
> > So, every object code library and every executable is assigned a
> > so-called "strong name". The strong names of the dependencies are stored
> > by the linker inside every library or executable.
>
> Interesting.  Is there an API/command line tool to extract this version?

The disassembler can show this version. There's also an API function
GetAssemblyName, and if it's not enough, there's an entire package
System.Reflection which will allow accessing these details.

> > > > sed_quote_subst='s/\([|&;<>()$`"'"'"'*?[#~=%    \\]\)/\\\1/g'
> > >
> > > If you encounter options with backslashes frequently (even on non-w32
> > > hosts), you may want to parameterize use of echo.
> >
> > The problem was not 'echo'; I wanted to be able to define this sed
> > expression outside of backslashes.
>
> Hmm.  I don't understand your statement -- maybe we both misunderstood
> each other.  What I meant was:
>
> Later in this script, you often use
>   foo="$foo"`echo "$arg" | sed "$sed_quote_subst"`
>              ^^^^
> Problem is, this echo may kill strings of the form `\t' in $arg.

Most systems have a sane 'echo' command nowadays. I've been assuming a
non-SYSV 'echo' for several years and haven't received bug reports in
this area.

> AFAIK there all commonly
> used shells have been adjusted so that their builtin `echo' does not
> interpret backslashes.

Yes, that matches my experience.

> > > How does the installed program find its libraries?
> > > How the uninstalled?
> >
> > In both cases: through the -L option passed to csharpexec.sh. Inside
> > csharpexec.sh, for some C# engines, the -L option translates into
> > options; for others, it translates into the setting of an environment
> > variable.
>
> Hmm, so somebody still has to play the 'gimme the uninstalled paths'.
> At least I don't see that it is done automatically.

Yes. I think only the strong names of dependencies are hardcoded into
.dlls and .exes, not the paths where to find them.

> In the case
>   proggie_exe_LDADD = -L ../libs -lfoobar
>
> so maybe you want the Makefile to create (uninstalled!) proggie with
>
>   exec $top_builddir/csharpexec.sh -L ../libs -lfoobar proggie.exe
>
> in it?

I agree, something like this (without the -lfoobar, just the -L option)
should be done in the Makefile.

> Are inter-library dependencies specified?

As far as I know, inter-library dependencies are handled automatically.
In other words, you link against A.dll and you don't care whether A.dll
depends on B.dll or C.dll or both. You thus never have to compute the
transitive closure of the needed DLLs. But you _do_ have to specify
the complete list of directories where to find DLLs.

Please correct me where I'm wrong.

Bruno





reply via email to

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