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 20:38:43 +0100
User-agent: KMail/1.5

Hi Ralf,

> > Object code libraries are files with suffix ".dll". They are installed
> > under $prefix/lib.
>
> Is it reasonable to assume that programs will link against these
> libraries, which are
> - not built in the same package as the dll

Yes. Making code available for use by other programs is one of the main
purposes of object code libraries.

You certainly want to know about library versioning :-) Every library
and every executable has a version attached. It can be set through a
particular kind of statement inside a C# source file, like this:
   [assembly: AssemblyVersion("1.0.0")]
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.

> - which do not contain C# code, and are not built or run with one of the
>   tools below?

No. Such a use of C# libraries is certainly not mainstream.

> >     # Use the mktemp program if available. If not available, hide the error
> >     # message.
> >     tmp=`(umask 077 && mktemp -d -q "$TMPDIR/gtXXXXXX") 2>/dev/null` &&
>
> Probably a good idea to change `gt' into `cs' or something else a bit
> better recognizable.

Yes, you're right.

> > 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.

> >       foobar.dll : module1.cs module2.cs libres.resources
> >                $(CSHARPCOMP) $(CSHARPCOMPFLAGS) -o $@ $(srcdir)/module1.cs 
> > $(srcdir)/module2.cs $(srcdir)/libres.resources
>
> You'd probably also want AM_CSHARPCOMPFLAGS, for consistency
> (and to allow the package author to set options).

Yes. The automake maintainer certainly knows better than me how to
make things consistent inside automake.

> >   - Target "install" should install foobar.dll into $(libdir), using
> >     $(INSTALL_DATA).
>
> May any post-install action be necessary for the library (on some hosts)?

None that I'm aware of.

> 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.

> >     Optionally (or always?), on platforms where $EXEEXT is not ".exe",
> >     also install a script 'foobar' into the same directory, using
> >     $(INSTALL_SCRIPT), that invokes proggie.exe via the interpreter found
> >     by AM_CSHARPEXEC_OPTIONAL.
>
> Should the proggie script also be created for the uninstalled
> executable?

Yes, that would be useful too. Good idea.

Bruno





reply via email to

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