Re: shared library dependencies (again)

James Henstridge <james daa com au> writes:

> On 28 Apr 2001, Owen Taylor wrote:
> > > The one issue with my build patches is compiling pango modules into
> > > libpango.  In order to have correct dependencies in the modules, libpango
> > > must be built first.  But to compile modules into libpango, the modules
> > > must be built first.  I haven't worked out how to address this.  The patch
> > > makes things work in the case where no modules are compiled into libpango.
> >
> > I'd like to see these changes go in soon. But I think we have to
> > resolve this issueof included modules be resolved first. I admit to
> > being also puzzled as to how to do this.
> I don't think the glib or gtk+ patches have this problem, so could
> probably be checked in.  It should be possible to apply each patch
> independently without breaking anything.
> For pango, I suppose you could have a makefile that gets run before the
> pango subdir looking something like this:
> pango_basic_x = $(top_builddir)/modules/basic/
> endif
> ...
> all: $(pango_basic_x) ...
> $(top_builddir)/modules/basic/
> 	cd $(top_builddir)/modules/basic && $(MAKE)
> ...
> It would look pretty horible, but would probably work.

OK, here's what I ended up doing for Pango (based on an idea from
James); includes the following:

for module in $included_modules; do
	cd \\\$(top_builddir)/modules/$dir && \\\$(MAKE) \\\$(AM_MAKEFLAGS) libpango-$


  case "$CONFIG_FILES" in
    echo "Munging $ac_file to include rules for included modules"
    sed '/^ INCLUDED_RULES@$/ {
      r config.included_rules
    }' < $ac_file > $ && mv $ $ac_file
  rm -f config.included_rules
  cat > config.included_rules <<EOINCLUDE

Then pango/ has in it @INCLUDED_RULES@ so these rules
get substituted in as part of the configure step. So, when
you build the pango/ subdir, it, for each included module,
CD's into that module and runs make to build the module
by itself.


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