public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/devmanual:master commit in: eclass-writing/
Date: Fri, 18 Mar 2022 18:10:36 +0000 (UTC)	[thread overview]
Message-ID: <1647627017.3214de4c965e8bc94c7f14f7f0d52c117df7a3cd.sam@gentoo> (raw)

commit:     3214de4c965e8bc94c7f14f7f0d52c117df7a3cd
Author:     Thomas Bracht Laumann Jespersen <t <AT> laumann <DOT> xyz>
AuthorDate: Wed Mar 16 14:12:36 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Mar 18 18:10:17 2022 +0000
URL:        https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=3214de4c

eclass-writing: Add default src_configure to jmake example

The jmake sample eclass was written before EAPI 2 and thus predates
src_configure() where configuration and compilation where both handled
in src_compile().

Now it makes sense to have a separate jmake_src_configure() that is used
as the default src_configure().

Signed-off-by: Thomas Bracht Laumann Jespersen <t <AT> laumann.xyz>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 eclass-writing/text.xml | 19 ++++++++++++++-----
 1 file changed, 14 insertions(+), 5 deletions(-)

diff --git a/eclass-writing/text.xml b/eclass-writing/text.xml
index 5378184..f5bb88b 100644
--- a/eclass-writing/text.xml
+++ b/eclass-writing/text.xml
@@ -667,7 +667,7 @@ src_compile() {
 <body>
 
 <p>
-A simple eclass which defines a number of functions and a default
+A simple eclass which defines a number of functions and default <c>src_confgure</c> and
 <c>src_compile</c> for the (hypothetical) <c>jmake</c> build system might look
 something like the following:
 </p>
@@ -684,9 +684,10 @@ something like the following:
 # @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.
+# (hypothetical) jmake build system along with default src_configure and
+# src_compile phase functions
 
-EXPORT_FUNCTIONS src_compile
+EXPORT_FUNCTIONS src_configure src_compile
 
 BDEPEND="&gt;=sys-devel/jmake-2"
 
@@ -699,6 +700,15 @@ jmake-configure() {
 	jmake configure --prefix=/usr "$@"
 }
 
+# @FUNCTION: jmake_src_configure
+# @USAGE: [additional-args]
+# @DESCRIPTION:
+# Calls jmake-configure() to configure a jmake project. Passes all arguments
+# through to the appropriate "jmake configure" command.
+jmake_src_configure() {
+	jmake-configure "$@" || die "configure failed"
+}
+
 # @FUNCTION: jmake-build
 # @USAGE: [additional-args]
 # @DESCRIPTION:
@@ -710,9 +720,8 @@ jmake-build() {
 
 # @FUNCTION: jmake_src_compile
 # @DESCRIPTION:
-# Calls jmake-configure() and jmake-build() to compile a jmake project.
+# Calls jmake-build() to compile a jmake project.
 jmake_src_compile() {
-	jmake-configure || die "configure failed"
 	jmake-build || die "build failed"
 }
 </codesample>


             reply	other threads:[~2022-03-18 18:10 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-18 18:10 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-04-29  6:31 [gentoo-commits] proj/devmanual:master commit in: eclass-writing/ Ulrich Müller
2024-04-29  6:31 Ulrich Müller
2024-04-29  6:31 Ulrich Müller
2024-04-29  6:31 Ulrich Müller
2024-01-19 21:06 Ulrich Müller
2023-08-26  5:30 Ulrich Müller
2023-05-27 18:49 Ulrich Müller
2022-04-30 17:01 Ulrich Müller
2022-04-28  8:12 Ulrich Müller
2022-04-24 12:52 Ulrich Müller
2022-03-26 16:16 Ulrich Müller
2022-03-23 14:10 Ulrich Müller
2022-03-20 13:48 Ulrich Müller
2022-03-18 18:10 Sam James
2022-03-16 14:47 Sam James
2022-03-16 14:47 Sam James
2021-12-09  5:01 Sam James
2021-10-13 13:44 Ulrich Müller
2021-09-04 10:38 Ulrich Müller
2021-09-04 10:36 Ulrich Müller
2021-09-04 10:36 Ulrich Müller
2021-09-04 10:33 Ulrich Müller
2021-09-04 10:33 Ulrich Müller
2021-04-07 17:35 Ulrich Müller
2021-03-30  6:55 Ulrich Müller
2021-03-30  6:55 Ulrich Müller
2021-03-30  6:55 Ulrich Müller
2021-03-30  6:55 Ulrich Müller
2021-03-30  6:55 Ulrich Müller
2021-03-30  6:55 Ulrich Müller
2021-03-30  6:55 Ulrich Müller
2021-03-30  6:55 Ulrich Müller
2021-03-30  6:55 Ulrich Müller
2021-03-30  6:55 Ulrich Müller
2021-03-30  6:55 Ulrich Müller
2020-12-29 22:08 Göktürk Yüksek
2020-09-18  7:01 Ulrich Müller
2019-09-20 22:52 Göktürk Yüksek
2019-08-30 15:51 Göktürk Yüksek
2019-08-30 15:51 Göktürk Yüksek
2016-10-31  1:21 Göktürk Yüksek
2016-10-31  1:21 Göktürk Yüksek
2016-10-31  1:21 Göktürk Yüksek
2016-10-31  1:21 Göktürk Yüksek
2016-10-31  1:21 Göktürk Yüksek
2011-12-13 20:17 Petteri Räty

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1647627017.3214de4c965e8bc94c7f14f7f0d52c117df7a3cd.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox