Using eMake variables

1 minute read

eMake automatically defines several variables that can be used in makefiles to access Cluster Manager-specific values during a build. For example, you could insert the build tag into your compilation step by typing:

main.o:main.cpp gcc -DBUILD_TAG="$(ECLOUD_BUILD_TAG)" -o main.o main.cpp

The variables eMake automatically creates are described in the following table.

Variable Definition

ECLOUD_BUILD_CLASS

The build class as specified on the command line with --emake-class. For more information, see Using Build Classes.

ECLOUD_BUILD_ID

A globally unique build ID. This value is guaranteed unique across all builds in all classes for this Cluster Manager.

ECLOUD_BUILD_TAG

The tag as configured in Cluster Manager for this build class. For more information, see Using Build Classes.

ECLOUD_BUILD_COUNTER

A unique ID for this build within the current build class. This value is guaranteed to be unique across all builds in the same class, but not across builds in different classes.

ECLOUD_BUILD_TYPE

Allows you to discover the build type: local for a local build; or remote for a cluster build.