aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Orlitzky <mjo@gentoo.org>2016-06-02 11:02:07 -0400
committerGöktürk Yüksek <gokturk@gentoo.org>2016-10-30 21:09:28 -0400
commit3fd0d856bf9e001b490f8af477a06033219823a7 (patch)
tree6137033cef063fba7948b3ca29dc8e61244be59e
parenteclass-writing: add documentation to the incorrect usage example. (diff)
downloaddevmanual-3fd0d856bf9e001b490f8af477a06033219823a7.tar.gz
devmanual-3fd0d856bf9e001b490f8af477a06033219823a7.tar.bz2
devmanual-3fd0d856bf9e001b490f8af477a06033219823a7.zip
eclass-writing: add documentation to the build system example.
Now that we have guidelines for documenting eclasses, the "Simple Build System Eclass Example" section is under-documented. This commit adds the minimum required documentation (eclass and function headers) to that example. Gentoo-Bug: 373145
-rw-r--r--eclass-writing/text.xml25
1 files changed, 22 insertions, 3 deletions
diff --git a/eclass-writing/text.xml b/eclass-writing/text.xml
index def2b89..9329d88 100644
--- a/eclass-writing/text.xml
+++ b/eclass-writing/text.xml
@@ -339,22 +339,41 @@ something like the following:
# Distributed under the terms of the GNU General Public License v2
# &#36;Id&#36;
-# Original Author: Ciaran McCreesh &lt;ciaranm@gentoo.org&gt;
-# Purpose: Demonstration of EXPORT_FUNCTIONS. Defines simple wrappers for the
-# (hypothetical) 'jmake' build system and a default src_compile.
+# @ECLASS: jmake.eclass
+# @MAINTAINER:
+# Gentoo Devmanual Project &lt;devmanual@gentoo.org&gt;
+# @AUTHOR:
+# Ciaran McCreesh &lt;ciaranm@gentoo.org&gt;
+# @BLURB: Demonstrate a simple build system eclass.
+# @DESCRIPTION:
+# Demonstrates EXPORT_FUNCTIONS and defines simple wrappers for the
+# (hypothetical) jmake build system and a default src_compile.
EXPORT_FUNCTIONS src_compile
DEPEND="&gt;=sys-devel/jmake-2"
+# @FUNCTION: jmake-configure
+# @USAGE: [additional-args]
+# @DESCRIPTION:
+# Passes all arguments through to the appropriate &quot;jmake configure&quot;
+# command.
jmake-configure() {
jmake configure --prefix=/usr "$@"
}
+# @FUNCTION: jmake-build
+# @USAGE: [additional-args]
+# @DESCRIPTION:
+# First builds all dependencies, and then passes through its arguments
+# to the appropriate &quot;jmake build&quot; command.
jmake-build() {
jmake dep &amp;&amp; jmake build "$@"
}
+# @FUNCTION: jmake-src_compile
+# @DESCRIPTION:
+# Calls jmake-configure() and jmake-build() to compile a jmake project.
jmake_src_compile() {
jmake-configure || die "configure failed"
jmake-build || die "build failed"