Re: shared library dependencies (again)



Owen Taylor <otaylor redhat com> writes:

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

Here's what I'm trying now; in pango/pango/Makefile.am

===
included-modules:
        @cd $(top_builddir)/modules && $(MAKE) $(AM_MAKEFLAGS) included-modules

$(INCLUDED_X_MODULES) $(INCLUDED_XFT_MODULES) $(INCLUDED_FT2_MODULES): included-modules
        @true

.PHONY: included-modules
====

in pango/modules/Makefile.am:

===
included-modules:
        for d in $(SUBDIRS) ; do \
                ( cd $$d && $(MAKE) $(AM_MAKEFLAGS) included-modules ) ; \
        done
===

in pango/modules/foo/Makefile.am

===
included-modules: $(noinst_LTLIBRARIES)
===

Short, though a little tricky. I think it works pretty reliably, and
isn't that slow.

                                        Owen




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