diff --git a/[refs] b/[refs] index ece2fb5b007d..5b54a93da4a6 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: df578e7d831b4d280bf7c621eafb737e78cd26eb +refs/heads/master: 1d3b3bfab121cdef07d19797f42f413dccdd65f0 diff --git a/trunk/scripts/mkmakefile b/trunk/scripts/mkmakefile index e0f54b9d8fec..e65d8b33faa4 100644 --- a/trunk/scripts/mkmakefile +++ b/trunk/scripts/mkmakefile @@ -25,8 +25,11 @@ cat << EOF > $2/Makefile VERSION = $3 PATCHLEVEL = $4 -KERNELSRC := $1 -KERNELOUTPUT := $2 +lastword = \$(word \$(words \$(1)),\$(1)) +makedir := \$(dir \$(call lastword,\$(MAKEFILE_LIST))) + +MAKEARGS := -C $1 +MAKEARGS += O=\$(if \$(patsubst /%,,\$(makedir)),\$(CURDIR)/)\$(patsubst %/,%,\$(makedir)) MAKEFLAGS += --no-print-directory @@ -35,10 +38,11 @@ MAKEFLAGS += --no-print-directory all := \$(filter-out all Makefile,\$(MAKECMDGOALS)) all: - \$(MAKE) -C \$(KERNELSRC) O=\$(KERNELOUTPUT) \$(all) + \$(MAKE) \$(MAKEARGS) \$(all) Makefile:; \$(all) %/: all @: + EOF