Skip to contentSkip to conversation

libxl: Add make deps

PATCH Superseded Jean Guyader 2 participants 3 messages Dec 3, 2009

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libxl: Add make deps

---
 tools/libxl/Makefile |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
tools/libxl/Makefile +6 -1
index 0358cea..79c585f 100644
@@ -25,11 +25,16 @@ LIBCONFIG_OUTPUT = $(LIBCONFIG_SOURCE)/.libs
 
 LIBXL_OBJS-y = osdeps.o
 LIBXL_OBJS = flexarray.o libxl.o libxl_dom.o libxl_exec.o libxl_xshelp.o libxl_device.o libxl_internal.o xenguest.o libxl_utils.o $(LIBXL_OBJS-y)
+LIBXL_HEADERS = flexarray.h libxl.h libxl_internal.h libxl_osdeps.h libxl_utils.h xen_uuid.h
+LIBXL_SRCS = ${LIBXL_OBJS:.o=.c} $(LIBXL_HEADERS) xl.c
 
 CLIENTS = xl
 
 .PHONY: all
-all: $(CLIENTS) libxenlight.so libxenlight.a
+all: $(CLIENTS) libxenlight.so libxenlight.a .deps
+
+.deps: $(LIBXL_SRCS)
+	$(CC) -MM $(LIBXL_SRCS) > .deps
 
 libxenlight.so: libxenlight.so.$(MAJOR)
 	ln -sf $< $@

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#1 lore raw

PATCH 1/1 libxl: Makefile and libconfig

Get rid of the depedency on the LIBCONFIG_SOURCE directory.

---
 tools/libxl/Makefile |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)
tools/libxl/Makefile +3 -5
index 79c585f..4fba7f6 100644
@@ -51,13 +51,11 @@ libxenlight.a: $(LIBXL_OBJS)
 $(LIBCONFIG_SOURCE).tar.gz:
 	$(WGET) $(LIBCONFIG_URL)/$@
 
-$(LIBCONFIG_SOURCE): $(LIBCONFIG_SOURCE).tar.gz
-	tar xzf $<
-
-$(LIBCONFIG_OUTPUT)/libconfig.so: $(LIBCONFIG_SOURCE)
+$(LIBCONFIG_OUTPUT)/libconfig.so: $(LIBCONFIG_SOURCE).tar.gz
+	[ ! -d "$(LIBCONFIG_SOURCE)" ] && tar xzf $<
 	cd $(LIBCONFIG_SOURCE) && ./configure --prefix=$(DESTDIR)$(PREFIX) && $(MAKE)
 
-xl.o: $(LIBCONFIG_SOURCE)
+xl.o: $(LIBCONFIG_OUTPUT)/libconfig.so xl.c
 	$(CC) $(CFLAGS) -I$(LIBCONFIG_SOURCE) -c xl.c
 
 $(CLIENTS): xl.o libxenlight.so $(LIBCONFIG_OUTPUT)/libconfig.so

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#2 lore raw

Re: [PATCH] libxl: Makefile and libconfig

Review

Quoted 2 lines · Jean Guyader

+$(LIBCONFIG_OUTPUT)/libconfig.so: $(LIBCONFIG_SOURCE).tar.gz

(quoted diff) +1 -0
+	[ ! -d "$(LIBCONFIG_SOURCE)" ]&&  tar xzf $<

If the .tar.gz changes you have to rm -rf first and then extract.

Paolo