2012-09-04 12:54:00 +00:00
|
|
|
#!/bin/sh
|
2017-12-19 15:49:00 +00:00
|
|
|
# SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
# Copyright(c) 2010-2014 Intel Corporation
|
2012-09-04 12:54:00 +00:00
|
|
|
|
|
|
|
# Auto-generate a Makefile in build directory
|
|
|
|
# Args:
|
|
|
|
# $1: path of project src root
|
|
|
|
|
|
|
|
echo "# Automatically generated by gen-build-mk.sh"
|
|
|
|
echo
|
|
|
|
echo "ifdef O"
|
|
|
|
echo "ifeq (\"\$(origin O)\", \"command line\")"
|
|
|
|
echo "\$(error \"Cannot specify O= as you are already in a build directory\")"
|
|
|
|
echo "endif"
|
|
|
|
echo "endif"
|
|
|
|
echo
|
|
|
|
echo "MAKEFLAGS += --no-print-directory"
|
|
|
|
echo
|
|
|
|
echo "all:"
|
2018-11-12 12:26:15 +00:00
|
|
|
echo " @\$(MAKE) -C $1 O=\$(CURDIR)"
|
2012-09-04 12:54:00 +00:00
|
|
|
echo
|
|
|
|
echo "%::"
|
2018-11-12 12:26:15 +00:00
|
|
|
echo " @\$(MAKE) -C $1 O=\$(CURDIR) \$@"
|