diff options
author | 2007-03-24 17:10:31 +0000 | |
---|---|---|
committer | 2007-03-24 17:10:31 +0000 | |
commit | dd9d07d3f50cea8cc9e56b846f7f613e3eebb35e (patch) | |
tree | b4b86610494d0c3041e280932051a3880df7351b /eclasses.tex | |
parent | (ferringb) No eclass KEYWORDS handling (diff) | |
download | pms-dd9d07d3f50cea8cc9e56b846f7f613e3eebb35e.tar.gz pms-dd9d07d3f50cea8cc9e56b846f7f613e3eebb35e.tar.bz2 pms-dd9d07d3f50cea8cc9e56b846f7f613e3eebb35e.zip |
(ferringb) be more explicit about EXPORT_FUNCTIONS. Use alias instead of export.
git-svn-id: http://svn.repogirl.net/pms/trunk@101 a05a4626-2124-0410-b604-e6c5abf33261
Diffstat (limited to 'eclasses.tex')
-rw-r--r-- | eclasses.tex | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/eclasses.tex b/eclasses.tex index e013614..e129519 100644 --- a/eclasses.tex +++ b/eclasses.tex @@ -37,8 +37,8 @@ implicit \t{RDEPEND} rules are applied. \section{EXPORT\_FUNCTIONS} There is one command available in the eclass environment that is neither available nor meaningful -in ebuilds -- \t{EXPORT\_FUNCTIONS}. This can be used to `export' ebuild phase functions from the -eclass so that an ebuild inherits a default definition, but retains the ability to override this and +in ebuilds -- \t{EXPORT\_FUNCTIONS}. This can be used to alias ebuild phase functions from the +eclass so that an ebuild inherits a default definition whilst retaining the ability to override and call the eclass-defined version from it. The use of it is best illustrated by an example; this is given in listing \ref{lst:export-functions} and is a snippet from a hypothetical \t{foo.eclass}. @@ -55,11 +55,14 @@ foo_src_compile() EXPORT_FUNCTIONS src_compile \end{lstlisting} -This example defines an eclass \t{src\_compile} function and uses \t{EXPORT\_FUNCTIONS} to export +This example defines an eclass \t{src\_compile} function and uses \t{EXPORT\_FUNCTIONS} to alias it. Then any ebuild that inherits \t{foo.eclass} will have a default \t{src\_compile} defined, but should the author wish to override it he can access the function in \t{foo.eclass} by calling \t{foo\_src\_compile}. +\t{EXPORT\_FUNCTIONS} may only be used on ebuild phase functions. The function that is aliased +must be named \t{eclassname_phasefunctionname}, where \t{eclassname} is the name of the eclass. + \t{EXPORT\_FUNCTIONS} may be used at most once per eclass. % vim: set filetype=tex fileencoding=utf8 et tw=100 spell spelllang=en : |