Re: custom install targets
"Scott Henry Harrison" <harris41-mhe/[email protected]> Fri, 16 Jan 2004 08:23:18 -0500
| Newsgroups | gmane.comp.tools.aap.devel |
|---|---|
| Message-ID | <[email protected]> |
> uninstall-local:
> @uninstall_files(_no.DIAGNOSTICSCRIPTDIR, _no.INSTALL_DIAGNOSTICSCRIPT)
>
> For installing a similar construct could be used:
>
> install-local:
> @install_files(_no.DIAGNOSTICSCRIPTDIR, _no.INSTALL_DIAGNOSTICSCRIPT, '0644')
>
> Where "0644" is the mode of the installed file. This time I verified it
> actually works! :-)
Very good. Works great. I want to volunteer to try to help
optimize documentation (which is already very good, considering
all the new ground A-A-P is making). Maybe this thread can
be part of it.
A final, simple question (I apologize if I should have figured
this out from documentation somewhere).
--working_example:begin--
DIAGNOSTICPERMISSIONS = 0755
uninstall-local :
@uninstall_files(_no.DIAGNOSTICSCRIPTDIR,_no.INSTALL_DIAGNOSTICSCRIPT)
:print Deinstallation completed
install-local :
:mkdir {r} DIAGNOSTICSCRIPTDIR {mode = 0700}
permissions = $DIAGNOSTICPERMISSIONS
@install_files(_no.DIAGNOSTICSCRIPTDIR,\
_no.INSTALL_DIAGNOSTICSCRIPT,permissions)
:print Installation completed
--working_example:end--
So, I would rather just like to say
install-local :
:mkdir {r} DIAGNOSTICSCRIPTDIR {mode = 0700}
@install_files(_no.DIAGNOSTICSCRIPTDIR,\
_no.INSTALL_DIAGNOSTICSCRIPT,DIAGNOSTICPERMISSIONS)
That won't work. Something about variables and scope or something
(having the upper-level DIAGNOSTICPERMISSIONS variable inside
the install_files argument list). I should read-the-manual....
Also, I would like a @install_files_and_leadingdir function instead of
@install_files, but not that important....
My basic question is:
:mkdir {r} DIAGNOSTICSCRIPTDIR {mode = 0700}
permissions = $DIAGNOSTICPERMISSIONS
@install_files(_no.DIAGNOSTICSCRIPTDIR,\
_no.INSTALL_DIAGNOSTICSCRIPT,permissions)
Is there any way to make the above more elegant? (It is
elegant enough for me.) I just don't want to be using 3-4 lines
of code when I could be doing it simpler and clearer in 1 line
of code.
Thanks again.
Regards,
Scott
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn