Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d2d3d7ca authored by Ricardo Cerqueira's avatar Ricardo Cerqueira Committed by Steve Kondik
Browse files

build: Preliminary support for CM product builds

If building a cm_* product, skip crawling the filesystem for
AndroidProduct makefiles (and, of course, parsing their contents)
and aim directly for the device/cm/<product> device configuration

Change-Id: I2a5e70dda973a6fcdbba0d5e26b35b99d3f1aea2
parent 556dbce1
Loading
Loading
Loading
Loading
+9 −5
Original line number Diff line number Diff line
@@ -184,6 +184,9 @@ ifneq ($(strip $(TARGET_BUILD_APPS)),)
  # An unbundled app build needs only the core product makefiles.
  $(call import-products,$(call get-product-makefiles,\
      $(SRC_TARGET_DIR)/product/AndroidProducts.mk))
else
  ifneq ($(CM_BUILD),)
    $(call import-products, device/cm/$(CM_BUILD)/device.mk)
  else
  # Read in all of the product definitions specified by the AndroidProducts.mk
    # files in the tree.
@@ -191,6 +194,7 @@ else
    #TODO: when we start allowing direct pointers to product files,
    #    guarantee that they're in this list.
    $(call import-products, $(get-all-product-makefiles))
  endif
endif # TARGET_BUILD_APPS
$(check-all-products)

+7 −0
Original line number Diff line number Diff line
@@ -58,6 +58,13 @@ function check_product()
        echo "Couldn't locate the top of the tree.  Try setting TOP." >&2
        return
    fi

    if (echo -n $1 | grep -q -e "^cm_") ; then
       CM_BUILD=$(echo -n $1 | sed -e 's/^cm_//g')
    else
       CM_BUILD=
    fi

    CALLED_FROM_SETUP=true BUILD_SYSTEM=build/core \
        TARGET_PRODUCT=$1 \
        TARGET_BUILD_VARIANT= \