Re: custom install targets

Scott Harrison <harris41-mhe/[email protected]> 13 Jan 2004 10:26:02 -0500
Newsgroups gmane.comp.tools.aap.devel
Organization Michigan State University
Message-ID <[email protected]>
On Tue, 2004-01-13 at 09:43, Bram Moolenaar wrote:
> > Is it possible to have custom install targets like
> > 
> > $INSTALL_DATA3
> > $DATA3DIR
> > 
> > etc.?

> Only the mentioned targets are available.  But you can easily add
> something, e.g.:
> 
> 	install-local : $INSTALL_DATA3
> 
> This assumes $INSTALL_DATA3 is a list of targets that do the
> installation.  If that's not what you wanted, you will have to explain a
> bit more.

It is just AWESOME that I can do:
INSTALL_EXEC += file1
INSTALL_EXEC += file2
EXECDIR = bintmp/

and that is it!  Simple!  I like it.

I would also like to be able to do things like:
INSTALL_CUSTOM1 += file1
INSTALL_CUSTOM1 += file2
CUSTOM1DIR = /opt/lib/newlang/spec/

and have that be most of the work.

>From what you say, it sounds like I would have to
either have targets specified for each file (too much work),
or write some kind of new subroutine, for example

install-local:
  @auto_process_custom_target_subroutine("CUSTOM1")
  @auto_process_custom_target_subroutine("CUSTOM2")
  @auto_process_custom_target_subroutine("CUSTOM3")

uninstall-local
  @auto_unprocess_custom_target_subroutine("CUSTOM1")
  @auto_unprocess_custom_target_subroutine("CUSTOM2")
  @auto_unprocess_custom_target_subroutine("CUSTOM3")

where auto_process_custom_target_subroutine would
loop through the file list ("INSTALL_" + SubArg1)
and install into SubArg1+"DIR", etc.

I just want to know what the "best" or recommended way
is to do this, or if my understanding of A-A-P is incomplete.

Regards,
Scott

-- 
Scott Harrison <harris41-mhe/[email protected]>
Michigan State University



-------------------------------------------------------
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html