1 |
robbat2 13/12/27 21:39:36 |
2 |
|
3 |
Modified: ChangeLog flag-o-matic.eclass |
4 |
Log: |
5 |
Per discussion with Flameeyes, make -l and -L always valid, and only warn about other arguments to append-libs. Also document expected arguments to append-libs. |
6 |
|
7 |
Revision Changes Path |
8 |
1.1091 eclass/ChangeLog |
9 |
|
10 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1091&view=markup |
11 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1091&content-type=text/plain |
12 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1090&r2=1.1091 |
13 |
|
14 |
Index: ChangeLog |
15 |
=================================================================== |
16 |
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v |
17 |
retrieving revision 1.1090 |
18 |
retrieving revision 1.1091 |
19 |
diff -p -w -b -B -u -u -r1.1090 -r1.1091 |
20 |
--- ChangeLog 27 Dec 2013 21:27:38 -0000 1.1090 |
21 |
+++ ChangeLog 27 Dec 2013 21:39:36 -0000 1.1091 |
22 |
@@ -1,6 +1,11 @@ |
23 |
# ChangeLog for eclass directory |
24 |
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 |
25 |
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1090 2013/12/27 21:27:38 robbat2 Exp $ |
26 |
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1091 2013/12/27 21:39:36 robbat2 Exp $ |
27 |
+ |
28 |
+ 27 Dec 2013; Robin H. Johnson <robbat2@g.o> flag-o-matic.eclass: |
29 |
+ Per discussion with Flameeyes, make -l and -L always valid, and only warn |
30 |
+ about other arguments to append-libs. Also document expected arguments to |
31 |
+ append-libs. |
32 |
|
33 |
27 Dec 2013; Robin H. Johnson <robbat2@g.o> flag-o-matic.eclass: |
34 |
There are usages in the tree of "append-libs $(pkg-config ...)"; if |
35 |
|
36 |
|
37 |
|
38 |
1.194 eclass/flag-o-matic.eclass |
39 |
|
40 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.194&view=markup |
41 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.194&content-type=text/plain |
42 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.193&r2=1.194 |
43 |
|
44 |
Index: flag-o-matic.eclass |
45 |
=================================================================== |
46 |
RCS file: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v |
47 |
retrieving revision 1.193 |
48 |
retrieving revision 1.194 |
49 |
diff -p -w -b -B -u -u -r1.193 -r1.194 |
50 |
--- flag-o-matic.eclass 27 Dec 2013 21:27:38 -0000 1.193 |
51 |
+++ flag-o-matic.eclass 27 Dec 2013 21:39:36 -0000 1.194 |
52 |
@@ -1,6 +1,6 @@ |
53 |
# Copyright 1999-2013 Gentoo Foundation |
54 |
# Distributed under the terms of the GNU General Public License v2 |
55 |
-# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.193 2013/12/27 21:27:38 robbat2 Exp $ |
56 |
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.194 2013/12/27 21:39:36 robbat2 Exp $ |
57 |
|
58 |
# @ECLASS: flag-o-matic.eclass |
59 |
# @MAINTAINER: |
60 |
@@ -599,18 +599,24 @@ replace-sparc64-flags() { |
61 |
# @FUNCTION: append-libs |
62 |
# @USAGE: <libs> |
63 |
# @DESCRIPTION: |
64 |
-# Add extra <libs> to the current LIBS. |
65 |
+# Add extra <libs> to the current LIBS. All arguments should prefixed with |
66 |
+# either -l or -L. For compatability, if arguments are not prefixed as |
67 |
+# options, they are given a -l prefix automatically. |
68 |
append-libs() { |
69 |
[[ $# -eq 0 ]] && return 0 |
70 |
local flag |
71 |
for flag in "$@"; do |
72 |
- [[ ${flag} == -l* ]] && flag=${flag#-l} |
73 |
- if [[ ${flag} == -* ]]; then |
74 |
+ case $flag in |
75 |
+ -[lL]*) |
76 |
+ export LIBS="${LIBS} ${flag}" |
77 |
+ ;; |
78 |
+ -*) |
79 |
eqawarn "Appending non-library to LIBS (${flag}); Other linker flags should be passed via LDFLAGS" |
80 |
export LIBS="${LIBS} ${flag}" |
81 |
- else |
82 |
+ ;; |
83 |
+ *) |
84 |
export LIBS="${LIBS} -l${flag}" |
85 |
- fi |
86 |
+ esac |
87 |
done |
88 |
|
89 |
return 0 |