sbsv2/raptor/lib/flm/e32abiv2.flm
branchfix
changeset 456 f9d258cee458
parent 412 824dddcc66f7
child 457 9bebdb95e0de
child 483 941b2742ee49
--- a/sbsv2/raptor/lib/flm/e32abiv2.flm	Tue Mar 30 20:25:06 2010 +0100
+++ b/sbsv2/raptor/lib/flm/e32abiv2.flm	Wed Apr 07 12:26:04 2010 +0100
@@ -16,15 +16,37 @@
 #
 #
 
-# Only build feature invariant binaries in non-product builds *and*
-# Only build feature variant binaries in product builds.
+# Feature/Binary Variation
+#
+# FEATUREVARIANTNAME != "" implies a product build configuration
+# FEATUREVARIANT == 1 implies a .mmp defined feature variant binary
+#
+# By default:
+#   Build all binaries in non-product builds *and*
+#   Only build feature variant binaries in product builds.
+#
+#   test FEATUREVARIANTNAME=="" or FEATUREVARIANT==1
+#
+# If FEATUREVARIANTSAFE is set:
+#   Only build feature invariant binaries in non-product builds *and*
+#   Only build feature variant binaries in product builds.
 #
-# FEATUREVARIANTNAME != "" implies product build
-# FEATUREVARIANT == 1 implies a feature variant binary
+#   test (FEATUREVARIANTNAME=="" and FEATUREVARIANT=="") or
+#        (FEATUREVARIANTNAME!="" and FEATUREVARIANT==1)
 #
-# test FEATUREVARIANTNAME=="" or FEATUREVARIANT==1
-#
-ifneq ($(or $(call equal,$(FEATUREVARIANTNAME),),$(call equal,$(FEATUREVARIANT),1)),)
+
+DOBUILD:=
+ifeq ($(FEATUREVARIANTSAFE),)
+  DOBUILD:=$(if $(or $(call equal,$(FEATUREVARIANTNAME),),\
+                     $(call equal,$(FEATUREVARIANT),1)),1)
+else
+  DOBUILD:=$(if $(or $(and $(call equal,$(FEATUREVARIANTNAME),),\
+                           $(call equal,$(FEATUREVARIANT),)),\
+                     $(and $(call not,$(call equal,$(FEATUREVARIANTNAME),)),\
+                           $(call equal,$(FEATUREVARIANT),1))),1)
+endif
+
+ifeq ($(DOBUILD),1)
 
 $(if $(FLMDEBUG),$(info <flm name='e32abiv2' target='$(TARGET)' type='$(TARGETTYPE)' outputpath='$(OUTPUTPATH)' metasource='$(METASOURCE)' postlinkfiletype='$(POSTLINKFILETYPE)' />))
 
@@ -1244,7 +1266,7 @@
 # For the --what option and the log file
 $(call raptor_release,$(filter-out %.sym,$(WHATRELEASE)))
 
-endif # FEATUREVARIANTNAME=="" or FEATUREVARIANT==1
+endif # DOBUILD
 
 ## The End