[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v3 01/11] x86emul/test: add missing dependency for x86_emulate.o



On Wed, Feb 01, 2017 at 06:03:20AM -0700, Jan Beulich wrote:
> >>> On 01.02.17 at 13:02, <wei.liu2@xxxxxxxxxx> wrote:
> > --- a/tools/tests/x86_emulator/Makefile
> > +++ b/tools/tests/x86_emulator/Makefile
> > @@ -45,7 +45,7 @@ x86_emulate/x86_emulate.c x86_emulate/x86_emulate.h:
> >  
> >  HOSTCFLAGS += $(CFLAGS_xeninclude)
> >  
> > -x86_emulate.o: x86_emulate.c x86_emulate/x86_emulate.c 
> > x86_emulate/x86_emulate.h
> > +x86_emulate.o: x86_emulate.c x86_emulate.h x86_emulate/x86_emulate.c 
> > x86_emulate/x86_emulate.h
> >     $(HOSTCC) $(HOSTCFLAGS) -D__XEN_TOOLS__ -c -g -o $@ $<
> >  
> >  test_x86_emulator.o: test_x86_emulator.c blowfish.h 
> > x86_emulate/x86_emulate.h
> 
> I think this latter one should be updated too. Which then calls for
> macroizing:
> 
> x86_emulate.h := x86_emulate.h x86_emulate/x86_emulate.h
> 
> Jan
> 

Not sure I understand what you want, but using x86_emulate.h as variable
name looks a bit weird. Anyway, this is what I come up with:


From 4bd9c4cbe3ca6197d38355eac24023ccf7b24335 Mon Sep 17 00:00:00 2001
From: Wei Liu <wei.liu2@xxxxxxxxxx>
Date: Wed, 1 Feb 2017 11:49:41 +0000
Subject: [PATCH] x86emul/test: add missing dependency for x86_emulate.o

f4497d6b74 added x86_emulate.h private header but didn't add dependency
for it.

Use macro to reduce repetition.

Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
---
 tools/tests/x86_emulator/Makefile | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tools/tests/x86_emulator/Makefile 
b/tools/tests/x86_emulator/Makefile
index 0b5baff67c..b489959d1d 100644
--- a/tools/tests/x86_emulator/Makefile
+++ b/tools/tests/x86_emulator/Makefile
@@ -45,8 +45,10 @@ x86_emulate/x86_emulate.c x86_emulate/x86_emulate.h:
 
 HOSTCFLAGS += $(CFLAGS_xeninclude)
 
-x86_emulate.o: x86_emulate.c x86_emulate/x86_emulate.c 
x86_emulate/x86_emulate.h
+x86_emulate.h := x86_emulate.h x86_emulate/x86_emulate.h
+
+x86_emulate.o: x86_emulate.c x86_emulate/x86_emulate.c $(x86_emulate.h)
        $(HOSTCC) $(HOSTCFLAGS) -D__XEN_TOOLS__ -c -g -o $@ $<
 
-test_x86_emulator.o: test_x86_emulator.c blowfish.h x86_emulate/x86_emulate.h
+test_x86_emulator.o: test_x86_emulator.c blowfish.h $(x86_emulate.h)
        $(HOSTCC) $(HOSTCFLAGS) -c -g -o $@ $<
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.