blob: 4d0faebb17199720d6126cfcef73af83626235ca [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#!/bin/sh
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01002# SPDX-License-Identifier: GPL-2.0
Linus Torvalds1da177e2005-04-16 15:20:36 -07003# 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
Linus Torvalds1da177e2005-04-16 15:20:36 -07009
Sam Ravnborgd2301242008-11-21 23:00:12 +010010if [ "${quiet}" != "silent_" ]; then
Masahiro Yamada4fd61272018-09-18 17:45:53 +090011 echo " GEN Makefile"
Sam Ravnborgd2301242008-11-21 23:00:12 +010012fi
Jan Beulichfd5f0cd2006-05-02 12:33:20 +020013
Masahiro Yamada4fd61272018-09-18 17:45:53 +090014cat << EOF > Makefile
Masahiro Yamada48b5ffd2019-03-30 21:04:16 +090015# Automatically generated by $(realpath $0): don't edit
16include $(realpath $1/Makefile)
Linus Torvalds1da177e2005-04-16 15:20:36 -070017EOF