Re: shared library dependencies (again)



James Henstridge <james daa com au> writes:

> On 1 May 2001, Owen Taylor wrote:
> 
> >
> > I think there is a problem with going to libtool-1.4 at this point...
> >
> > As far as I can tell, it isn't really compatible with automake-1.4
> > (because ltconfig no longer exists), and I don't want to require
> > people developing GTK+ to install a patched or CVS version of
> > automake.
> 
> Does it require the ltconfig script, or just a file called ltconfig?  If
> it only requires the existence of the file, adding "touch ltconfig" to the
> autogen script might be a suitable fix.

Well, the trouble is that 'touch ltconfig' would have to be added
not just to the glib/pango/gtk+ autogen.sh, but every autogen.sh
that the person who upgraded their libtool uses.

Also, the empty ltconfig would get disted (though it could be
removed in dist-hook); not awful but ugly.
 
> The pango build patch looks like a step in the right direction.  Just one
> thing that I hadn't thought about:
> 
> > > ====
> > > for module in $included_modules; do
> > >   [...]
> > >   INCLUDED_RULES="$INCLUDED_RULES
> > > \\\$(top_builddir)/modules/$dir/libpango-$module.la:
> > > 	cd \\\$(top_builddir)/modules/$dir && \\\$(MAKE) \\\$(AM_MAKEFLAGS) libpango-$module.la
> 
> Will this rule cause libpango-$module.la to be rebuilt if it is out of
> date?  It looks like it will only call make if the module hasn't been
> built at all (a second run of make would ensure that everything was up to
> date though).  Maybe this is okay though, as it will build correctly from
> a clean source tree.

Ugh, you are right. There are basically two ways I have in my
mind that you might be able to fix this:

$(top_builddir)/modules/$dir/libpango-$module.la: some_phony_target
 	cd $(top_builddir)/modules/$dir && $(MAKE) $(AM_MAKEFLAGS) libpango-$module.la

This, I believe will cause the recursive make to be run every time,
at least usually, most of the time, in my experience...

The other way is to go a completely different way and do something
like, in the toplevel:

 SUBDIRS = . pango modules ...

 included_modules:
        cd modules && $(MAKE) $(AM_MAKEFLAGS) included_modules

 all-local: included_modules

Then have in modules:
 
 included_modules:
        for d in $SUBDIRS ; do \
                cd $$d && $(MAKE) $(AM_MAKEFLAGS) included_modules \
        done

And in each individual module directory, something like:

 included_modules: $(myanmar_x_noinst) $(gurmukhi_x_noinst) ...

Might be worth trying out to see if this could be made to work.

Regards,
                                        Owen




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