mirror of
git://git.yoctoproject.org/linux-yocto.git
synced 2025-07-13 09:09:40 +02:00

With the current way of generating the Makefile in the output directory for builds outside of the source tree, specifying real targets (rather than phony ones) doesn't work in an already (partially) built tree, as the stub Makefile doesn't have any dependency information available. Thus, all targets where files may actually exist must be listed explicitly and, due to what I'd call a make misbehavior, directory targets must then also be special cased. Signed-Off-By: Jan Beulich <jbeulich@novell.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
648 B
648 B
#!/bin/sh
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
$2 - Output directory
$3 - version
$4 - patchlevel
cat << EOF
Automatically generated by $0: don't edit
VERSION = $3 PATCHLEVEL = $4
KERNELSRC := $1 KERNELOUTPUT := $2
MAKEFLAGS += --no-print-directory
.PHONY: all $(MAKECMDGOALS)
all: $(MAKE) -C $(KERNELSRC) O=$(KERNELOUTPUT)
Makefile:;
$(filter-out all Makefile,$(MAKECMDGOALS)) %/: $(MAKE) -C $(KERNELSRC) O=$(KERNELOUTPUT) $@ EOF