Re: custom install targets
Bram Moolenaar <[email protected]> Fri, 16 Jan 2004 14:55:41 +0100
| Newsgroups | gmane.comp.tools.aap.devel |
|---|---|
| Message-ID | <[email protected]> |
Scott Henry Harrison wrote:
> 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.
I added the Python functions to the documentation, but didn't release
the updated version yet.
> 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....
Use the scope name "_no" in Python. In Aap commands it's done
automatically, but in Python you need to explicitly specify the "_no"
scope:
@install_files(_no.DIAGNOSTICSCRIPTDIR,
@ _no.INSTALL_DIAGNOSTICSCRIPT, _no.DIAGNOSTICPERMISSIONS)
Using "@" before the line is nicer than using a backslash, but that's a
personal preference.
> Also, I would like a @install_files_and_leadingdir function instead of
> @install_files, but not that important....
You don't need to create the directory first, except when you want to
specify the mode used for the directory explicitly.
--
TALL KNIGHT: We shall say Ni! again to you if you do not appease us.
ARTHUR: All right! What do you want?
TALL KNIGHT: We want ... a shrubbery!
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ Project leader for A-A-P -- http://www.A-A-P.org ///
\\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html ///
-------------------------------------------------------
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