Patchwork Re: [PATCH] Fix multiple qemu-options.def generation

login
register
mail settings
Submitter Paolo Bonzini
Date Feb. 10, 2011, 9:51 a.m.
Message ID <4D53B514.7050605@redhat.com>
Download mbox | patch
Permalink /patch/82586/
State New
Headers show

Comments

Paolo Bonzini - Feb. 10, 2011, 9:51 a.m.
> diff --git a/Makefile.objs b/Makefile.objs
> index 4a1eaa1..ee9f190 100755
> --- a/Makefile.objs
> +++ b/Makefile.objs
> @@ -269,10 +269,10 @@ vl.o: QEMU_CFLAGS+=$(GPROF_CFLAGS)
>  vl.o: QEMU_CFLAGS+=$(SDL_CFLAGS)
> -vl.o: qemu-options.def
> +vl.o: ../qemu-options.def
> os-posix.o: qemu-options.def
> os-win32.o: qemu-options.def
> -qemu-options.def: $(SRC_PATH)/qemu-options.hx
> +%qemu-options.def: $(SRC_PATH)/qemu-options.hx
>                $(call quiet-command,sh $(SRC_PATH)/hxtool -h < $< > $@,"  GEN   $(TARGET_DIR)$@")

This is wrong, I think the problem is that you are missing a vpath 
directive.

Does this help?


Paolo
Pavel Dovgaluk - Feb. 10, 2011, 9:54 a.m.
> > diff --git a/Makefile.objs b/Makefile.objs
> > index 4a1eaa1..ee9f190 100755
> > --- a/Makefile.objs
> > +++ b/Makefile.objs
> > @@ -269,10 +269,10 @@ vl.o: QEMU_CFLAGS+=$(GPROF_CFLAGS)
> >  vl.o: QEMU_CFLAGS+=$(SDL_CFLAGS)
> > -vl.o: qemu-options.def
> > +vl.o: ../qemu-options.def
> > os-posix.o: qemu-options.def
> > os-win32.o: qemu-options.def
> > -qemu-options.def: $(SRC_PATH)/qemu-options.hx
> > +%qemu-options.def: $(SRC_PATH)/qemu-options.hx
> >                $(call quiet-command,sh $(SRC_PATH)/hxtool -h < $< > $@,"  GEN
> $(TARGET_DIR)$@")
> 
> This is wrong, I think the problem is that you are missing a vpath
> directive.
> 
> Does this help?

 This patch was for older version of qemu.
 Current one does not have this problem.

Pavel Dovgaluk

Patch

diff --git a/rules.mak b/rules.mak
index ed59c9e..6f753ae 100644
--- a/rules.mak
+++ b/rules.mak
@@ -39,7 +39,7 @@  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)
 
-VPATH_SUFFIXES = %.c %.h %.S %.m %.mak %.texi
+VPATH_SUFFIXES = %.c %.h %.S %.m %.mak %.texi %.def
 set-vpath = $(if $1,$(foreach PATTERN,$(VPATH_SUFFIXES),$(eval vpath $(PATTERN) $1)))
 
 # find-in-path