* [gentoo-dev] [PATCH] multilib.eclass: get_exeext for mingw/cygwin exe suffix, #588330
@ 2016-07-21 15:21 Michał Górny
2016-09-03 11:06 ` Michał Górny
0 siblings, 1 reply; 2+ messages in thread
From: Michał Górny @ 2016-07-21 15:21 UTC (permalink / raw
To: gentoo-dev; +Cc: toolchain, Michał Górny
Add a get_exeext function that can be used to obtain executable program
suffix specific to the platform, in line with get_libname and
get_modname. It is necessary to correctly reference built programs on
non-standard platforms where executables use some suffix (like .exe).
Original author: Gerhard Bräunlich
---
eclass/multilib.eclass | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/eclass/multilib.eclass b/eclass/multilib.eclass
index 8c95387..a80511c 100644
--- a/eclass/multilib.eclass
+++ b/eclass/multilib.eclass
@@ -225,6 +225,20 @@ number_abis() {
echo $#
}
+# @FUNCTION: get_exeext
+# @DESCRIPTION:
+# Returns standard executable program suffix (null, .exe, etc.)
+# for the current platform identified by CHOST.
+#
+# Example:
+# get_exeext
+# Returns: null string (almost everywhere) || .exe (mingw*) || ...
+get_exeext() {
+ case ${CHOST} in
+ *-cygwin*|mingw*|*-mingw*) echo ".exe";;
+ esac
+}
+
# @FUNCTION: get_libname
# @USAGE: [version]
# @DESCRIPTION:
--
2.9.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [gentoo-dev] [PATCH] multilib.eclass: get_exeext for mingw/cygwin exe suffix, #588330
2016-07-21 15:21 [gentoo-dev] [PATCH] multilib.eclass: get_exeext for mingw/cygwin exe suffix, #588330 Michał Górny
@ 2016-09-03 11:06 ` Michał Górny
0 siblings, 0 replies; 2+ messages in thread
From: Michał Górny @ 2016-09-03 11:06 UTC (permalink / raw
To: gentoo-dev; +Cc: toolchain
[-- Attachment #1: Type: text/plain, Size: 591 bytes --]
On Thu, 21 Jul 2016 17:21:23 +0200
Michał Górny <mgorny@gentoo.org> wrote:
> Add a get_exeext function that can be used to obtain executable program
> suffix specific to the platform, in line with get_libname and
> get_modname. It is necessary to correctly reference built programs on
> non-standard platforms where executables use some suffix (like .exe).
>
> Original author: Gerhard Bräunlich
> ---
> eclass/multilib.eclass | 14 ++++++++++++++
> 1 file changed, 14 insertions(+)
Committed now.
--
Best regards,
Michał Górny
<http://dev.gentoo.org/~mgorny/>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 931 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-09-03 11:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-21 15:21 [gentoo-dev] [PATCH] multilib.eclass: get_exeext for mingw/cygwin exe suffix, #588330 Michał Górny
2016-09-03 11:06 ` Michał Górny
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox