Installation of third-party SUBDIRS

2010-02-01 Thread Matwey V. Kornilov

Hi,

I use a couple of third-party libraries in my software. I use SUBDIRS 
variable in my Makefile.am and AC_CONFIG_SUBDIRS in my configure.in. How to 
suppress installation of SUBDIRed projects? I just use they for static 
linkage with my binary and don't need third-party headers and libraries 
installed.







Re: Installation of third-party SUBDIRS

2010-02-01 Thread Ralf Wildenhues
Hello Matwey,

* Matwey V. Kornilov wrote on Mon, Feb 01, 2010 at 08:36:16PM CET:
> I use a couple of third-party libraries in my software. I use SUBDIRS 
> variable in my Makefile.am and AC_CONFIG_SUBDIRS in my configure.in. How to 
> suppress installation of SUBDIRed projects? I just use they for static 
> linkage with my binary and don't need third-party headers and libraries 
> installed.

If they have a --disable-install switch, you could add that to the
command line in a small wrapper script subpkg/configure.gnu which calls
their configure.

Otherwise, you could overwrite either their toplevel
  install:
  install-exec:
  install-data:
  install-dvi:
  install-html:
  install-info:
  install-ps:
  install-pdf:
  installdirs:
  installcheck:
  uninstall:

rules, or the ones in the your directory above theirs.  Since that
would require you to also manually ensure to let all other install
action happen, you might want to add another in-between subdir in
your project that does nothing else.

If you require GNU make, then the subpkg-toplevel overwrite could
happen in a GNUmakefile; but also, with GNU make, you could dynamically
adjust SUBDIRS in your directory above their, if MAKECMDGOALS contains
one of the above targets.  Your users shouldn't call `make all install'
then though.

Hope that helps.

Cheers,
Ralf




Re: Installation of third-party SUBDIRS

2010-02-01 Thread Matwey V. Kornilov
Ralf Wildenhues wrote:
> Otherwise, you could overwrite either their toplevel
>   install:
>   install-exec:
>   install-data:
>   install-dvi:
>   install-html:
>   install-info:
>   install-ps:
>   install-pdf:
>   installdirs:
>   installcheck:
>   uninstall:
> 
> rules, or the ones in the your directory above theirs.  Since that
> would require you to also manually ensure to let all other install
> action happen, you might want to add another in-between subdir in
> your project that does nothing else.

Thanks a lot. It seems this is what I need. I added the install rules in my 
third-party/Makefile.am where SUBDIRS defined and everything works well now.






Re: Installation of third-party SUBDIRS

2010-02-02 Thread Steffen Dettmer
On Mon, Feb 1, 2010 at 8:36 PM,  wrote:
> I use a couple of third-party libraries in my software. I use SUBDIRS
> variable in my Makefile.am and AC_CONFIG_SUBDIRS in my configure.in. How to
> suppress installation of SUBDIRed projects? I just use they for static
> linkage with my binary and don't need third-party headers and libraries
> installed.

We usually install by scripts and have one or few own modules
(let's say one mypkg but many libraries we won't install) and
simply use `make -C mypkg install'. In some systems we have an
install: # rule invoking something like
for d in */pkg/inst ; do make -C $d install || exit 77; done
or so.

oki,

Steffen