build.mk: fix breakage caused by MAKEFLAGS passed to module build
Our "Makefile" runs build.mk with "make -r", to disable all the default rules. This flag is saved by make in the MAKEFLAGS variable, which is passed on to child processes. Unfortunately, it is also passed to the makefiles of individual modules (apps/*) when we build specific modules. These makefiles are completely stand-alone, and are normally written to assume that the default rules (e.g., .c->.o) do exist. They will fail when run with MAKEFLAGS=r. We recently noticed both redis-memonly and memcached to exhibit this problem and committed workarounds (see 914bef6f75d9f3e7f268aecdb00a023b86439b85 and e2f7ba1b1d80bb5e89d7fca71b4994c7de15ed4e in apps.git). However, the right fix is for our build.mk to acknowledge that the modules' makefiles are stand-alone, and must not inherit our prefered flags like "-r". So this patch clears the MAKEFLAGS variable when calling module.py (module.py will later invoke "make module" in the module's directory). Reviewed-by:Tomasz Grabiec <tgrabiec@gmail.com> Signed-off-by:
Nadav Har'El <nyh@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
Please register or sign in to comment