ia64/linux-2.6.18-xen.hg

annotate scripts/mkmakefile @ 562:66faefe721eb

pvSCSI backend driver

Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
Signed-off-by: Jun Kamada <kama@jp.fujitsu.com>
author Keir Fraser <keir.fraser@citrix.com>
date Mon Jun 02 09:58:27 2008 +0100 (2008-06-02)
parents 831230e53067
children
rev   line source
ian@0 1 #!/bin/sh
ian@0 2 # Generates a small Makefile used in the root of the output
ian@0 3 # directory, to allow make to be started from there.
ian@0 4 # The Makefile also allow for more convinient build of external modules
ian@0 5
ian@0 6 # Usage
ian@0 7 # $1 - Kernel src directory
ian@0 8 # $2 - Output directory
ian@0 9 # $3 - version
ian@0 10 # $4 - patchlevel
ian@0 11
ian@0 12
ian@0 13 test ! -r $2/Makefile -o -O $2/Makefile || exit 0
ian@0 14 echo " GEN $2/Makefile"
ian@0 15
ian@0 16 cat << EOF > $2/Makefile
ian@0 17 # Automatically generated by $0: don't edit
ian@0 18
ian@0 19 VERSION = $3
ian@0 20 PATCHLEVEL = $4
ian@0 21
ian@0 22 KERNELSRC := $1
ian@0 23 KERNELOUTPUT := $2
ian@0 24
ian@0 25 MAKEFLAGS += --no-print-directory
ian@0 26
ian@0 27 .PHONY: all \$(MAKECMDGOALS)
ian@0 28
ian@0 29 all:
ian@0 30 \$(MAKE) -C \$(KERNELSRC) O=\$(KERNELOUTPUT)
ian@0 31
ian@0 32 Makefile:;
ian@0 33
ian@0 34 \$(filter-out all Makefile,\$(MAKECMDGOALS)) %/:
ian@0 35 \$(MAKE) -C \$(KERNELSRC) O=\$(KERNELOUTPUT) \$@
ian@0 36 EOF