KBEA-00164 - A Simple Way to Hack Hardcoded "make"

Article ID:360032823152
1 minute readKnowledge base


In order to benefit from ElectricAccelerator maximumly, it is recommended to use "emake" instead of "make". In most cases, it is OK when "make" is written as "$(MAKE)" in makefiles. However, there’re cases where "make" is hardcoded as "make" in makefiles.


When "make" is hardcoded in a command in makefiles, the system default make is called when the command is executed. This decreases the build performance as it cannot benefit from some features like "Stubbed Submake" from CloudBees Build Acceleration.


You can fix this by adding a new directory to the top of the source tree and putting that first
in the system environment variable PATH. Then add a symbolic link in that directory to emake. This will cause emake to be called instead of the system default make in the place where it has been hardcoded without changing any makefile.

For example:

mkdir $ANDROID_SOURCE/ebin
ln -s /opt/ecloud/i686_Linux/64/bin/emake $ANDROID_SOURCE/ebin/make
export PATH=/opt/ecloud/i686_Linux/64/bin:$ANDROID_SOURCE/ebin:$PATH

make --version
Electric Make version 64-bit (build_10.0_78576_OPT_2018.02.26_19:30:40)
Copyright (C) 2002-2018 Electric Cloud, Inc.
All rights reserved.
GNU Make 3.81 emulation

Applies to

  • Product versions: All

  • OS versions: Linux