Hi,

I'm looking for a combination of the target to include sub-packages which is 
built conditionally.

A package "X" include a libary "Y" as a subpackage, like
X/
X/configure
X/x-main.c
X/x-sub1.c
X/x-sub2.c
X/...
X/Y/
X/Y/configure
X/Y/y-main.c
X/Y/y-sub1.c
X/Y/...

Y is often installed as an external or system library, so X/configure
calls AC_CONFIG_SUBDIRS([Y]) in some cases, not always.

On the other hand, I want "make dist" to include "Y" subdirectory as
a directory ready to call "configure", if a user wants to do it.

How can I design X/Makefile.am for such purpose?

"DIST_SUBDIRS = Y" seems to expect a "configured" status of
"Y" subdirectory during "make dist". Nothing is needed to be
built, but expected to be configured, to support "make dist"
in "Y" subdirectory.

"EXTRA_DIST = Y" does not need a "configured" status of "Y",
but "make dist" would include everything into the tarball,
like artifacts made in "configure" or building process.

I tried to combine "DIST_SUBDIRS" and "dist-hook" to execute
"Y/configure" when "make dist" is executed but "Y" subdirectory
is not configured. It does not work, because "dist-hook" is
processed after the preparation of dist directory - non-configured
"Y" would block "make dist" if I use DIST_SUBDIRS.

Is there any well-known technique matching with such purpose?

Regards,
suzuki toshiya

Reply via email to