rebar doesn\'t automatically rebuild files when given a different configuration file. So, I\'ve tried to do it on the Makefile level:
REBAR=./rebar REBAR_DEB
You can also use the shell assignment operator
LAST_CONFIG != cat config.tmp
§ How make Reads a Makefile
Example
You're missing the part where you need to use shell in order to actually call external programs when defining a variable.
LAST_CONFIG:=$(shell cat config.tmp)