474d39a1ff
'quiet' variable is set and exported, but it is not used. We can safely remove it. This variable is inherited from the Makefile of the Linux kernel, and is not used in Buildroot. In support/scripts/mkmakefile, 'quiet' value is checked, but the test is always true ('quiet' is never set to silent_), so the test can be removed as well. Signed-off-by: Cédric Marie <cedric.marie@openmailbox.org> Reviewed-by: "James Knight" <james.d.knight@live.com> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
46 lines
1006 B
Bash
Executable File
46 lines
1006 B
Bash
Executable File
#!/bin/sh
|
|
# Generates a small Makefile used in the root of the output
|
|
# directory, to allow make to be started from there.
|
|
# The Makefile also allow for more convenient build of external modules
|
|
|
|
# Usage
|
|
# $1 - Kernel src directory
|
|
# $2 - Output directory
|
|
|
|
|
|
test ! -r $2/Makefile -o -O $2/Makefile || exit 0
|
|
# Only overwrite automatically generated Makefiles
|
|
# (so we do not overwrite buildroot Makefile)
|
|
if test -e $2/Makefile && ! grep -q Automatically $2/Makefile
|
|
then
|
|
exit 0
|
|
fi
|
|
echo " GEN $2/Makefile"
|
|
|
|
cat << EOF > $2/Makefile
|
|
# Automatically generated by $0: don't edit
|
|
|
|
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
|
|
|
|
.PHONY: _all \$(MAKECMDGOALS)
|
|
|
|
all := \$(filter-out Makefile,\$(MAKECMDGOALS))
|
|
|
|
_all:
|
|
umask 0022 && \$(MAKE) \$(MAKEARGS) \$(all)
|
|
|
|
Makefile:;
|
|
|
|
\$(all): _all
|
|
@:
|
|
|
|
%/: _all
|
|
@:
|
|
EOF
|