1 |
commit: 3fd0d856bf9e001b490f8af477a06033219823a7 |
2 |
Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Jun 2 15:02:07 2016 +0000 |
4 |
Commit: Göktürk Yüksek <gokturk <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Oct 31 01:09:28 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=3fd0d856 |
7 |
|
8 |
eclass-writing: add documentation to the build system example. |
9 |
|
10 |
Now that we have guidelines for documenting eclasses, the "Simple |
11 |
Build System Eclass Example" section is under-documented. This commit |
12 |
adds the minimum required documentation (eclass and function headers) |
13 |
to that example. |
14 |
|
15 |
Gentoo-Bug: 373145 |
16 |
|
17 |
eclass-writing/text.xml | 25 ++++++++++++++++++++++--- |
18 |
1 file changed, 22 insertions(+), 3 deletions(-) |
19 |
|
20 |
diff --git a/eclass-writing/text.xml b/eclass-writing/text.xml |
21 |
index def2b89..9329d88 100644 |
22 |
--- a/eclass-writing/text.xml |
23 |
+++ b/eclass-writing/text.xml |
24 |
@@ -339,22 +339,41 @@ something like the following: |
25 |
# Distributed under the terms of the GNU General Public License v2 |
26 |
# $Id$ |
27 |
|
28 |
-# Original Author: Ciaran McCreesh <ciaranm@g.o> |
29 |
-# Purpose: Demonstration of EXPORT_FUNCTIONS. Defines simple wrappers for the |
30 |
-# (hypothetical) 'jmake' build system and a default src_compile. |
31 |
+# @ECLASS: jmake.eclass |
32 |
+# @MAINTAINER: |
33 |
+# Gentoo Devmanual Project <devmanual@g.o> |
34 |
+# @AUTHOR: |
35 |
+# Ciaran McCreesh <ciaranm@g.o> |
36 |
+# @BLURB: Demonstrate a simple build system eclass. |
37 |
+# @DESCRIPTION: |
38 |
+# Demonstrates EXPORT_FUNCTIONS and defines simple wrappers for the |
39 |
+# (hypothetical) jmake build system and a default src_compile. |
40 |
|
41 |
EXPORT_FUNCTIONS src_compile |
42 |
|
43 |
DEPEND=">=sys-devel/jmake-2" |
44 |
|
45 |
+# @FUNCTION: jmake-configure |
46 |
+# @USAGE: [additional-args] |
47 |
+# @DESCRIPTION: |
48 |
+# Passes all arguments through to the appropriate "jmake configure" |
49 |
+# command. |
50 |
jmake-configure() { |
51 |
jmake configure --prefix=/usr "$@" |
52 |
} |
53 |
|
54 |
+# @FUNCTION: jmake-build |
55 |
+# @USAGE: [additional-args] |
56 |
+# @DESCRIPTION: |
57 |
+# First builds all dependencies, and then passes through its arguments |
58 |
+# to the appropriate "jmake build" command. |
59 |
jmake-build() { |
60 |
jmake dep && jmake build "$@" |
61 |
} |
62 |
|
63 |
+# @FUNCTION: jmake-src_compile |
64 |
+# @DESCRIPTION: |
65 |
+# Calls jmake-configure() and jmake-build() to compile a jmake project. |
66 |
jmake_src_compile() { |
67 |
jmake-configure || die "configure failed" |
68 |
jmake-build || die "build failed" |