summaryrefslogtreecommitdiffstats
path: root/scripts/mk/buildflags.mk
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--scripts/mk/buildflags.mk20
1 files changed, 8 insertions, 12 deletions
diff --git a/scripts/mk/buildflags.mk b/scripts/mk/buildflags.mk
index 4b8a3d8..1159700 100644
--- a/scripts/mk/buildflags.mk
+++ b/scripts/mk/buildflags.mk
@@ -28,33 +28,27 @@
# You can also export them in the environment by setting
# DPKG_EXPORT_BUILDFLAGS to a non-empty value.
#
+
+ifndef dpkg_buildflags_mk_included
+dpkg_buildflags_mk_included = yes
+
# This list is kept in sync with the default set of flags returned
# by dpkg-buildflags.
dpkg_lazy_eval ?= $$(or $$(value DPKG_CACHE_$(1)),$$(eval DPKG_CACHE_$(1) := $$(shell $(2)))$$(value DPKG_CACHE_$(1)))
-DPKG_BUILDFLAGS_LIST = \
+DPKG_BUILDFLAGS_LIST := $(foreach var,\
ASFLAGS \
- ASFLAGS_FOR_BUILD \
CFLAGS \
- CFLAGS_FOR_BUILD \
CPPFLAGS \
- CPPFLAGS_FOR_BUILD \
CXXFLAGS \
- CXXFLAGS_FOR_BUILD \
OBJCFLAGS \
- OBJCFLAGS_FOR_BUILD \
OBJCXXFLAGS \
- OBJCXXFLAGS_FOR_BUILD \
DFLAGS \
- DFLAGS_FOR_BUILD \
FFLAGS \
- FFLAGS_FOR_BUILD \
FCFLAGS \
- FCFLAGS_FOR_BUILD \
LDFLAGS \
- LDFLAGS_FOR_BUILD \
- # EOL
+ ,$(var) $(var)_FOR_BUILD)
define dpkg_buildflags_export_envvar
ifdef $(1)
@@ -77,3 +71,5 @@ $(foreach flag,$(DPKG_BUILDFLAGS_LIST),\
ifdef DPKG_EXPORT_BUILDFLAGS
export $(DPKG_BUILDFLAGS_LIST)
endif
+
+endif # dpkg_buildflags_mk_included