]> Git Repo - linux.git/blame - scripts/mkmakefile
kbuild: mkmakefile: do not check the generated Makefile marker
[linux.git] / scripts / mkmakefile
CommitLineData
1da177e4 1#!/bin/sh
b2441318 2# SPDX-License-Identifier: GPL-2.0
1da177e4
LT
3# Generates a small Makefile used in the root of the output
4# directory, to allow make to be started from there.
5# The Makefile also allow for more convinient build of external modules
6
7# Usage
8# $1 - Kernel src directory
1da177e4 9
d2301249 10if [ "${quiet}" != "silent_" ]; then
4fd61277 11 echo " GEN Makefile"
d2301249 12fi
fd5f0cd6 13
4fd61277 14cat << EOF > Makefile
1da177e4
LT
15# Automatically generated by $0: don't edit
16
0ff35771
PF
17ifeq ("\$(origin V)", "command line")
18VERBOSE := \$(V)
19endif
20ifneq (\$(VERBOSE),1)
21Q := @
22endif
23
1da177e4
LT
24MAKEFLAGS += --no-print-directory
25
9319f453 26.PHONY: __sub-make \$(MAKECMDGOALS)
96678281 27
9319f453 28__sub-make:
80d0dda3 29 \$(Q)\$(MAKE) -C $1 O=\$(CURDIR) \$(MAKECMDGOALS)
0b35786d 30
9319f453 31\$(filter-out __sub-make, \$(MAKECMDGOALS)): __sub-make
3c955b40 32 @:
1da177e4 33EOF
This page took 0.702628 seconds and 4 git commands to generate.