Yes, each command has its own shell. You could get around that by doing something like this:
But as matsp said, you'd be better off using internal make variables.Code:debug: set CFLAGS_ENV = -g -DDEBUG ; \ set HEADERS_ENV = $(SRC)/debug.h ; \ set OBJS_ENV = debug.o ; \ export CFLAGS_ENV ; export HEADERS_ENV ; export OBJS_ENV