[Top][All Lists]

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

Re: How do I *conditionally* add to INSTALL_DIRS ?

From: Ralf Wildenhues
Subject: Re: How do I *conditionally* add to INSTALL_DIRS ?
Date: Tue, 9 Jan 2007 22:21:37 +0100
User-agent: Mutt/1.5.13 (2006-08-11)

* atoz wrote on Tue, Jan 09, 2007 at 09:54:47PM CET:
> Ralf Wildenhues wrote:
> ># snippet:
> >INSTALL_DIRS += $(foomandir)
> >endif
> >if FOO_DOCS
> >INSTALL_DIRS +=      $(foodocdir)
> >fi
> this doesn't make a difference though because automake copies this  
> verbatim into where it does nothing useful because the  
> vars EXTRA_DIST and INSTALL_DIRS need to be set BEFORE automake does  
> its magic in order to generate the relevant code in  
> accordingly.

But what magic does automake do with the variable INSTALL_DIRS?
EXTRA_DIST can just be added to as well, not much magic either.
fooman_MANS and foodoc_DATA come to mind as special variables,
if you are ok with having things installed by 'make install-data'
or plain 'make install'.  I think this is what you really want,
but it doesn't totally fit this description:

> Basically, I want to be able to let a user do this
> ./configure --with-man-pages=yes/no --with-readme=yes/no
> (alternatively, --enable/disable-man-pages --enable/disable-readme)
> and as a result get a with something like this
> man-pages:
>       # install man pages to $(foomandir) here
>       ...
> readme:
>       # install README to $(foodocdir) here
>       ...
> IF and ONLY IF those options were set to "yes", otherwise ...

OK, but you insist on the targets `man-pages' and `readme', you can just
put the whole block inside an if:

        # do your stuff
        # do nothing

> Furthermore, should also have the relevant instructions  
> in the various clean targets to uninstall

In that second case, you'd have to write all that manually.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]