Gentoo Archives: gentoo-commits

From: "Mike Gilbert (floppym)" <floppym@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog cmake-utils.eclass
Date: Sat, 25 Jan 2014 04:07:09
Message-Id: 20140125040704.9E60F2004C@flycatcher.gentoo.org
1 floppym 14/01/25 04:07:04
2
3 Modified: ChangeLog cmake-utils.eclass
4 Log:
5 Improve support for ninja, bug 490280.
6
7 Revision Changes Path
8 1.1130 eclass/ChangeLog
9
10 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1130&view=markup
11 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1130&content-type=text/plain
12 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1129&r2=1.1130
13
14 Index: ChangeLog
15 ===================================================================
16 RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
17 retrieving revision 1.1129
18 retrieving revision 1.1130
19 diff -u -r1.1129 -r1.1130
20 --- ChangeLog 24 Jan 2014 13:51:18 -0000 1.1129
21 +++ ChangeLog 25 Jan 2014 04:07:04 -0000 1.1130
22 @@ -1,6 +1,9 @@
23 # ChangeLog for eclass directory
24 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
25 -# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1129 2014/01/24 13:51:18 hd_brummy Exp $
26 +# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1130 2014/01/25 04:07:04 floppym Exp $
27 +
28 + 25 Jan 2014; Mike Gilbert <floppym@g.o> cmake-utils.eclass:
29 + Improve support for ninja, bug 490280.
30
31 24 Jan 2014; Joerg Bornkessel <hd_brummy@g.o> vdr-plugin-2.eclass:
32 changed debug info in vdr-plugin-2_src_install for Makefile handling
33
34
35
36 1.102 eclass/cmake-utils.eclass
37
38 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?rev=1.102&view=markup
39 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?rev=1.102&content-type=text/plain
40 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?r1=1.101&r2=1.102
41
42 Index: cmake-utils.eclass
43 ===================================================================
44 RCS file: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v
45 retrieving revision 1.101
46 retrieving revision 1.102
47 diff -u -r1.101 -r1.102
48 --- cmake-utils.eclass 24 Dec 2013 14:54:26 -0000 1.101
49 +++ cmake-utils.eclass 25 Jan 2014 04:07:04 -0000 1.102
50 @@ -1,6 +1,6 @@
51 -# Copyright 1999-2013 Gentoo Foundation
52 +# Copyright 1999-2014 Gentoo Foundation
53 # Distributed under the terms of the GNU General Public License v2
54 -# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.101 2013/12/24 14:54:26 dilfridge Exp $
55 +# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.102 2014/01/25 04:07:04 floppym Exp $
56
57 # @ECLASS: cmake-utils.eclass
58 # @MAINTAINER:
59 @@ -523,6 +523,28 @@
60 cmake-utils_src_make "$@"
61 }
62
63 +_ninjaopts_from_makeopts() {
64 + if [[ ${NINJAOPTS+set} == set ]]; then
65 + return 0
66 + fi
67 + local ninjaopts=()
68 + set -- ${MAKEOPTS}
69 + while (( $# )); do
70 + case $1 in
71 + -j|-l|-k)
72 + ninjaopts+=( $1 $2 )
73 + shift 2
74 + ;;
75 + -j*|-l*|-k*)
76 + ninjaopts+=( $1 )
77 + shift 1
78 + ;;
79 + *) shift ;;
80 + esac
81 + done
82 + export NINJAOPTS="${ninjaopts[*]}"
83 +}
84 +
85 # @FUNCTION: ninja_src_make
86 # @INTERNAL
87 # @DESCRIPTION:
88 @@ -530,14 +552,18 @@
89 ninja_src_make() {
90 debug-print-function ${FUNCNAME} "$@"
91
92 - [[ -e build.ninja ]] || die "Makefile not found. Error during configure stage."
93 + [[ -e build.ninja ]] || die "build.ninja not found. Error during configure stage."
94
95 - if [[ "${CMAKE_VERBOSE}" != "OFF" ]]; then
96 - # TODO: get load average from portage (-l option)
97 - ninja ${MAKEOPTS} -v "$@" || die
98 + _ninjaopts_from_makeopts
99 +
100 + if [[ "${CMAKE_VERBOSE}" != "OFF" ]]; then
101 + set -- ninja ${NINJAOPTS} -v "$@"
102 else
103 - ninja "$@" || die
104 + set -- ninja ${NINJAOPTS} "$@"
105 fi
106 +
107 + echo "$@"
108 + "$@" || die
109 }
110
111 # @FUNCTION: emake_src_make
112 @@ -547,11 +573,11 @@
113 emake_src_make() {
114 debug-print-function ${FUNCNAME} "$@"
115
116 - [[ -e Makefile ]] || die "Makefile not found. Error during configure stage."
117 + [[ -e Makefile ]] || die "Makefile not found. Error during configure stage."
118
119 - if [[ "${CMAKE_VERBOSE}" != "OFF" ]]; then
120 + if [[ "${CMAKE_VERBOSE}" != "OFF" ]]; then
121 emake VERBOSE=1 "$@" || die
122 - else
123 + else
124 emake "$@" || die
125 fi