1 |
vapier 12/05/26 02:55:02 |
2 |
|
3 |
Modified: flag-o-matic.eclass |
4 |
Log: |
5 |
warn when people add preprocessor/linker flags with `append-flags` |
6 |
|
7 |
Revision Changes Path |
8 |
1.170 eclass/flag-o-matic.eclass |
9 |
|
10 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.170&view=markup |
11 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.170&content-type=text/plain |
12 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.169&r2=1.170 |
13 |
|
14 |
Index: flag-o-matic.eclass |
15 |
=================================================================== |
16 |
RCS file: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v |
17 |
retrieving revision 1.169 |
18 |
retrieving revision 1.170 |
19 |
diff -u -r1.169 -r1.170 |
20 |
--- flag-o-matic.eclass 26 Feb 2012 12:09:44 -0000 1.169 |
21 |
+++ flag-o-matic.eclass 26 May 2012 02:55:02 -0000 1.170 |
22 |
@@ -1,6 +1,6 @@ |
23 |
# Copyright 1999-2011 Gentoo Foundation |
24 |
# Distributed under the terms of the GNU General Public License v2 |
25 |
-# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.169 2012/02/26 12:09:44 blueness Exp $ |
26 |
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.170 2012/05/26 02:55:02 vapier Exp $ |
27 |
|
28 |
# @ECLASS: flag-o-matic.eclass |
29 |
# @MAINTAINER: |
30 |
@@ -179,6 +179,10 @@ |
31 |
# Add extra <flags> to your current {C,CXX,F,FC}FLAGS. |
32 |
append-flags() { |
33 |
[[ $# -eq 0 ]] && return 0 |
34 |
+ case " $* " in |
35 |
+ *' '-[DIU]*) eqawarn 'please use append-cppflags for preprocessor flags' ;; |
36 |
+ *' '-L*) eqawarn 'please use append-ldflags for linker flags' ;; |
37 |
+ esac |
38 |
append-cflags "$@" |
39 |
append-cxxflags "$@" |
40 |
append-fflags "$@" |