mirror of
https://github.com/torvalds/linux
synced 2024-10-07 03:42:55 +00:00
kbuild: merge scripts/mkmakefile to top Makefile
scripts/mkmakefile is simple enough to be merged in the Makefile. Use $(call cmd,...) to show the log instead of doing it in the shell script. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
This commit is contained in:
parent
92f378f19e
commit
2728fcfa4f
11
Makefile
11
Makefile
|
@ -544,14 +544,21 @@ scripts_basic:
|
||||||
$(Q)rm -f .tmp_quiet_recordmcount
|
$(Q)rm -f .tmp_quiet_recordmcount
|
||||||
|
|
||||||
PHONY += outputmakefile
|
PHONY += outputmakefile
|
||||||
|
ifdef building_out_of_srctree
|
||||||
# Before starting out-of-tree build, make sure the source tree is clean.
|
# Before starting out-of-tree build, make sure the source tree is clean.
|
||||||
# outputmakefile generates a Makefile in the output directory, if using a
|
# outputmakefile generates a Makefile in the output directory, if using a
|
||||||
# separate output directory. This allows convenient use of make in the
|
# separate output directory. This allows convenient use of make in the
|
||||||
# output directory.
|
# output directory.
|
||||||
# At the same time when output Makefile generated, generate .gitignore to
|
# At the same time when output Makefile generated, generate .gitignore to
|
||||||
# ignore whole output directory
|
# ignore whole output directory
|
||||||
|
|
||||||
|
quiet_cmd_makefile = GEN Makefile
|
||||||
|
cmd_makefile = { \
|
||||||
|
echo "\# Automatically generated by $(srctree)/Makefile: don't edit"; \
|
||||||
|
echo "include $(srctree)/Makefile"; \
|
||||||
|
} > Makefile
|
||||||
|
|
||||||
outputmakefile:
|
outputmakefile:
|
||||||
ifdef building_out_of_srctree
|
|
||||||
$(Q)if [ -f $(srctree)/.config -o \
|
$(Q)if [ -f $(srctree)/.config -o \
|
||||||
-d $(srctree)/include/config -o \
|
-d $(srctree)/include/config -o \
|
||||||
-d $(srctree)/arch/$(SRCARCH)/include/generated ]; then \
|
-d $(srctree)/arch/$(SRCARCH)/include/generated ]; then \
|
||||||
|
@ -562,7 +569,7 @@ ifdef building_out_of_srctree
|
||||||
false; \
|
false; \
|
||||||
fi
|
fi
|
||||||
$(Q)ln -fsn $(srctree) source
|
$(Q)ln -fsn $(srctree) source
|
||||||
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkmakefile $(srctree)
|
$(call cmd,makefile)
|
||||||
$(Q)test -e .gitignore || \
|
$(Q)test -e .gitignore || \
|
||||||
{ echo "# this is build directory, ignore it"; echo "*"; } > .gitignore
|
{ echo "# this is build directory, ignore it"; echo "*"; } > .gitignore
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -1,17 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
# SPDX-License-Identifier: GPL-2.0
|
|
||||||
# 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 convinient build of external modules
|
|
||||||
|
|
||||||
# Usage
|
|
||||||
# $1 - Kernel src directory
|
|
||||||
|
|
||||||
if [ "${quiet}" != "silent_" ]; then
|
|
||||||
echo " GEN Makefile"
|
|
||||||
fi
|
|
||||||
|
|
||||||
cat << EOF > Makefile
|
|
||||||
# Automatically generated by $0: don't edit
|
|
||||||
include $1/Makefile
|
|
||||||
EOF
|
|
Loading…
Reference in a new issue