summaryrefslogtreecommitdiffstats
path: root/scripts/mkmakefile
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/mkmakefile')
-rwxr-xr-xscripts/mkmakefile8
1 files changed, 1 insertions, 7 deletions
diff --git a/scripts/mkmakefile b/scripts/mkmakefile
index 85995f90e5c8..412f13fdff52 100755
--- a/scripts/mkmakefile
+++ b/scripts/mkmakefile
@@ -20,9 +20,6 @@ fi
cat << EOF > Makefile
# Automatically generated by $0: don't edit
-lastword = \$(word \$(words \$(1)),\$(1))
-makedir := \$(dir \$(call lastword,\$(MAKEFILE_LIST)))
-
ifeq ("\$(origin V)", "command line")
VERBOSE := \$(V)
endif
@@ -30,15 +27,12 @@ ifneq (\$(VERBOSE),1)
Q := @
endif
-MAKEARGS := -C $1
-MAKEARGS += O=\$(if \$(patsubst /%,,\$(makedir)),\$(CURDIR)/)\$(patsubst %/,%,\$(makedir))
-
MAKEFLAGS += --no-print-directory
.PHONY: __sub-make \$(MAKECMDGOALS)
__sub-make:
- \$(Q)\$(MAKE) \$(MAKEARGS) \$(MAKECMDGOALS)
+ \$(Q)\$(MAKE) -C $1 O=\$(CURDIR) \$(MAKECMDGOALS)
\$(filter-out __sub-make, \$(MAKECMDGOALS)): __sub-make
@: