Re: rpath command?

2000-11-27 Thread Steve Robbins

On 27 Nov 2000, Alexandre Oliva wrote:

 On Nov 25, 2000, Tom Tromey [EMAIL PROTECTED] wrote:
 
  Do I have to use some macro in configure.in to fill $(LINK) with GNU ld?
 Alexandre automake should define it to `$(LIBTOOL) $(CC/CXX)...'.
 Alexandre Maybe it only does this when there is at least one source
 Alexandre file to compile in the current directory?
 
  Yeah, that's how it works.  I realize this is less than good.  Can you
  suggest how it ought to work?
 
 I think the current behavior is fine, since it is indeed invalid to
 create a library or libtool archive out of no source files.  However,
 we might output a warning (or even an error) if we find a request to
 create a library out of no source files.

I'm not so sure about this.  Unless the CVS versions of the tools have
changed things, the current behaviour makes it impossible to create a
library consisting only of sources in subdirectories.  What I would like
to do is:

lib_LTLIBRARIES = libfoo.la

libfoo_la_LIBADD = \
$(top_builddir)/a/adummy.la \
$(top_builddir)/b/bdummy.la \
$(top_builddir)/c/cdummy.la \
$(top_builddir)/d/ddummy.la 


but this fails, so I generally add:

libfoo_la_SOURCES = dummy.c
dummy.c:
touch dummy.c


To me, the last bit seems like a workaround for a bug.  Is it impossible
to support building libraries out of ONLY other libraries?

-S






Re: rpath command?

2000-11-22 Thread Alexandre Oliva

On Nov 22, 2000, Marc van Woerkom [EMAIL PROTECTED] wrote:

 automake should define it to `$(LIBTOOL) $(CC/CXX)...'.  Maybe it only
 does this when there is at least one source file to compile in the
 current directory?

 Bingo!

 Makefile.am:

 libSciFacBase_la_SOURCES = \
buildme.c

And you'd be surprised at the number of problems you'd encounter if
you didn't link at least one object file into a library.

 buildme.c:
   /* void do_really_nothing_useful() { } */

This is not a valid C program.  A C program must contain at least one
valid declaration.  Try something like `static int i;'
  
-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicampoliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist*Please* write to mailing lists, not to me




Re: rpath command?

2000-11-22 Thread Marc van Woerkom

 automake should define it to `$(LIBTOOL) $(CC/CXX)...'.  Maybe it only
 does this when there is at least one source file to compile in the
 current directory?

Bingo!

After introducing this additions

Makefile.am:

libSciFacBase_la_SOURCES = \
   buildme.c

buildme.c:
 
  /*
   void do_really_nothing_useful()
   {
   }
  */
  
it works. 
  
Bizarre, I can't believe it. :-)

This project now features a source tree with customizable modules,
handles module dependencies, builds in separate build tree, installs
in seperate build tree..

[mvw@pcserver scifac.build]$ ../scifac/configure 
--prefix=/home/mvw/work/scifac.install --without-Dataserver --without-Dataserver2 
--without-Dataserver3

.. and stumbles over an empty _SOURCES list. ROTFL.

Thanks for your remark, Alexandre!
Marc