mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 07:13:54 -06:00
Use vpath directive
The vpath directive has two advantages over the VPATH variable: 1) it allows to skip searching of .o files; 2) the default semantics are to append to the vpath, so there is no confusion between "VPATH=xyz" and "VPATH+=xyz". Since "vpath %.c %.h PATH" is not valid, I'm introducing a wrapper macro to append one or more directories to the vpath. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
e726fe7d60
commit
076d247142
7 changed files with 16 additions and 13 deletions
|
@ -39,6 +39,8 @@ quiet-command = $(if $(V),$1,$(if $(2),@echo $2 && $1, @$1))
|
|||
cc-option = $(if $(shell $(CC) $1 $2 -S -o /dev/null -xc /dev/null \
|
||||
>/dev/null 2>&1 && echo OK), $2, $3)
|
||||
|
||||
set-vpath = $(if $1,$(foreach PATTERN,%.c %.h %.S, $(eval vpath $(PATTERN) $1)))
|
||||
|
||||
# Generate timestamp files for .h include files
|
||||
|
||||
%.h: %.h-timestamp
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue