aboutsummaryrefslogtreecommitdiff
path: root/data/macros.meson
diff options
context:
space:
mode:
authorIgor Gnatenko <i.gnatenko.brain@gmail.com>2016-12-13 12:29:28 +0100
committerJussi Pakkanen <jpakkane@gmail.com>2016-12-13 16:29:57 +0200
commit0121faf16873b500274b36955a08c6994e7f6f76 (patch)
tree002b740e930e7effef19d5c63a0ed8083187c57d /data/macros.meson
parentdcd3c217121fbb09be8acecd2d866219e85ad9bd (diff)
downloadmeson-0121faf16873b500274b36955a08c6994e7f6f76.zip
meson-0121faf16873b500274b36955a08c6994e7f6f76.tar.gz
meson-0121faf16873b500274b36955a08c6994e7f6f76.tar.bz2
rpm: use __global_*flags
Using RPM's %{optflags} is definitely nice, but not enough. LDFLAGS are not there, and idea of optflags is too generic. It is supposed to work under CC and CXX, but apparently someone forgot that there is difference between these two. %__global_*flags is not part of RPM itself, it's coming within redhat-rpm-config which makes our macros file not that portable, but anyway we already have %__global_ldflags and %ninja_build and no one complained. Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
Diffstat (limited to 'data/macros.meson')
-rw-r--r--data/macros.meson10
1 files changed, 5 insertions, 5 deletions
diff --git a/data/macros.meson b/data/macros.meson
index 5250c34..4eb1ab9 100644
--- a/data/macros.meson
+++ b/data/macros.meson
@@ -3,11 +3,11 @@
%__builddir %{_target_platform}
%meson \
- export CFLAGS="%{optflags}" \
- export CXXFLAGS="%{optflags}" \
- export FFLAGS="%{optflags} -I%{_fmoddir}" \
- export FCFLAGS="%{optflags} -I%{_fmoddir}" \
- export LDFLAGS="%{?__global_ldflags}" \
+ export CFLAGS="${CFLAGS:-%__global_cflags}" \
+ export CXXFLAGS="${CXXFLAGS:-%__global_cxxflags}" \
+ export FFLAGS="${FFLAGS:-%__global_fflags}" \
+ export FCFLAGS="${FCFLAGS:-%__global_fcflags}" \
+ export LDFLAGS="${LDFLAGS:-%__global_ldflags}" \
%{__meson} \\\
--buildtype=plain \\\
--prefix=%{_prefix} \\\