All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Cleaner Makefiles for VM-Tools
@ 2005-04-12  7:26 aq
  0 siblings, 0 replies; only message in thread
From: aq @ 2005-04-12  7:26 UTC (permalink / raw)
  To: aliguori, xen-devel

[-- Attachment #1: Type: text/plain, Size: 625 bytes --]

hi Anthony and VM-Tools team,

Here is the small patch for VM-Tools.

List of changes:
- cleaner Makefile(s)
- Remove some unecessary targets (thanks to default Makefile rules)
- Addition of uninstall target: now users can uninstall vm-tools.

$diffstat vm-tools.diff.txt 
 Makefile          |    6 ++++++
 docs/Makefile     |    5 +++++
 docs/man/Makefile |   21 +++++++++------------
 scripts/Makefile  |    3 +++
 src/Makefile      |   30 ++++++++++--------------------
 xen/Makefile      |    4 ++++
 6 files changed, 37 insertions(+), 32 deletions(-)

Signed-of-by: Nguyen Anh Quynh <aquynh@gmail.com>

Best regards,
aq

[-- Attachment #2: vm-tools.diff.txt --]
[-- Type: text/plain, Size: 4862 bytes --]

diff -Nurp vm-tools-0.0.4/docs/Makefile vm-tools-0.0.4-aq/docs/Makefile
--- vm-tools-0.0.4/docs/Makefile	2005-02-14 15:21:05.000000000 -0500
+++ vm-tools-0.0.4-aq/docs/Makefile	2005-04-11 04:41:23.000000000 -0500
@@ -21,8 +21,13 @@
 ###############################################################################
 
 all:
+	true
 
 clean:
+	true
 
 install:
 	$(MAKE) -C man install
+
+uninstall:
+	$(MAKE) -C man uninstall
diff -Nurp vm-tools-0.0.4/docs/man/Makefile vm-tools-0.0.4-aq/docs/man/Makefile
--- vm-tools-0.0.4/docs/man/Makefile	2005-03-08 15:23:28.000000000 -0500
+++ vm-tools-0.0.4-aq/docs/man/Makefile	2005-04-12 02:04:47.000000000 -0500
@@ -23,21 +23,18 @@
 INSTALL=install -D
 PREFIX=/usr/share
 GZIP=gzip -f
+GZIPEXT=gz
+MANS=vm-balloon.1 vm-create.1 vm-list.1 vm-console.1 vm-shutdown.1 vm.1
 
 all:
+	true
 
 clean:
+	true
 
 install:
-	$(INSTALL) vm-balloon.1 $(DESTDIR)$(PREFIX)/man/man1/vm-balloon.1 && \
-	$(GZIP) $(DESTDIR)$(PREFIX)/man/man1/vm-balloon.1
-	$(INSTALL) vm-create.1 $(DESTDIR)$(PREFIX)/man/man1/vm-create.1 && \
-	$(GZIP) $(DESTDIR)$(PREFIX)/man/man1/vm-create.1
-	$(INSTALL) vm-list.1 $(DESTDIR)$(PREFIX)/man/man1/vm-list.1 && \
-	$(GZIP) $(DESTDIR)$(PREFIX)/man/man1/vm-list.1
-	$(INSTALL) vm-console.1 $(DESTDIR)$(PREFIX)/man/man1/vm-console.1 && \
-	$(GZIP) $(DESTDIR)$(PREFIX)/man/man1/vm-console.1
-	$(INSTALL) vm-shutdown.1 $(DESTDIR)$(PREFIX)/man/man1/vm-shutdown.1 &&\
-	$(GZIP) $(DESTDIR)$(PREFIX)/man/man1/vm-shutdown.1
-	$(INSTALL) vm.1 $(DESTDIR)$(PREFIX)/man/man1/vm.1 &&\
-	$(GZIP) $(DESTDIR)$(PREFIX)/man/man1/vm.1
+	$(foreach i,$(MANS),$(INSTALL) $i $(DESTDIR)$(PREFIX)/man/man1/$i && \
+						$(GZIP) $(DESTDIR)$(PREFIX)/man/man1/$i;)
+
+uninstall:
+	$(foreach i,$(MANS),$(RM) $(DESTDIR)$(PREFIX)/man/man1/$i.$(GZIPEXT);)
diff -Nurp vm-tools-0.0.4/Makefile vm-tools-0.0.4-aq/Makefile
--- vm-tools-0.0.4/Makefile	2005-03-01 16:19:54.000000000 -0500
+++ vm-tools-0.0.4-aq/Makefile	2005-04-11 04:10:27.000000000 -0500
@@ -33,3 +33,9 @@ install:
 	$(MAKE) -C docs install && \
 	$(MAKE) -C scripts install && \
 	$(MAKE) -C src install
+
+uninstall:
+	$(MAKE) -C xen uninstall && \
+	$(MAKE) -C docs uninstall && \
+	$(MAKE) -C scripts uninstall && \
+	$(MAKE) -C src uninstall
diff -Nurp vm-tools-0.0.4/scripts/Makefile vm-tools-0.0.4-aq/scripts/Makefile
--- vm-tools-0.0.4/scripts/Makefile	2005-02-28 19:40:26.000000000 -0500
+++ vm-tools-0.0.4-aq/scripts/Makefile	2005-04-11 20:50:12.000000000 -0500
@@ -29,5 +29,8 @@ all:
 install: 	all
 	$(INSTALL) -m755 vm $(DESTDIR)$(PREFIX)/bin/vm
 
+uninstall: 	all
+	$(RM) $(DESTDIR)$(PREFIX)/bin/vm
+
 clean:
 	true
diff -Nurp vm-tools-0.0.4/src/Makefile vm-tools-0.0.4-aq/src/Makefile
--- vm-tools-0.0.4/src/Makefile	2005-04-01 15:50:08.000000000 -0500
+++ vm-tools-0.0.4-aq/src/Makefile	2005-04-12 01:55:01.000000000 -0500
@@ -27,28 +27,18 @@ SRCDIR=..
 INCDIR=$(SRCDIR)/include
 CFLAGS=-g -Wshadow -Wall -I$(INCDIR) 
 LDLIBS=-L$(SRCDIR)/xen -lxen -lxc
+PROGS=vm-balloon vm-console vm-create vm-list vm-maxmem vm-pause vm-sched vm-shutdown vm-top
 
-all: vm-balloon vm-console vm-create vm-list vm-maxmem vm-pause vm-sched vm-shutdown vm-top
+all: $(PROGS)
 
-vm-top: vm-top.o
-vm-balloon: vm-balloon.o
-vm-console: vm-console.o
-vm-create: vm-create.o netif.o blkif.o console.o vdev.o memmap.o table.o
-vm-list: vm-list.o
-vm-maxmem: vm-maxmem.o
-vm-pause: vm-pause.o
-vm-sched: vm-sched.o
-vm-shutdown: vm-shutdown.o
+vm-create: netif.o blkif.o console.o vdev.o memmap.o table.o
 
 install: all
-	$(INSTALL) -m755 vm-balloon $(DESTDIR)$(PREFIX)/bin/vm-balloon
-	$(INSTALL) -m755 vm-console $(DESTDIR)$(PREFIX)/bin/vm-console
-	$(INSTALL) -m755 vm-create $(DESTDIR)$(PREFIX)/bin/vm-create
-	$(INSTALL) -m755 vm-list $(DESTDIR)$(PREFIX)/bin/vm-list
-	$(INSTALL) -m755 vm-maxmem $(DESTDIR)$(PREFIX)/bin/vm-maxmem
-	$(INSTALL) -m755 vm-pause $(DESTDIR)$(PREFIX)/bin/vm-pause
-	$(INSTALL) -m755 vm-sched  $(DESTDIR)$(PREFIX)/bin/vm-sched
-	$(INSTALL) -m755 vm-shutdown $(DESTDIR)$(PREFIX)/bin/vm-shutdown
-	$(INSTALL) -m755 vm-top $(DESTDIR)$(PREFIX)/bin/vm-top
+	$(foreach i,$(PROGS),$(INSTALL) -m755 $i $(DESTDIR)$(PREFIX)/bin/$i;)
 
-clean:; $(RM) *.o vm-balloon vm-console vm-create vm-list vm-maxmem vm-pause vm-sched vm-shutdown vm-top
+uninstall: 
+	$(foreach i,$(PROGS),$(RM) $(RM) $(DESTDIR)$(PREFIX)/bin/$i;)
+
+clean:
+	$(RM) *.o 
+	$(RM) $(PROGS)
diff -Nurp vm-tools-0.0.4/xen/Makefile vm-tools-0.0.4-aq/xen/Makefile
--- vm-tools-0.0.4/xen/Makefile	2005-02-08 11:46:48.000000000 -0500
+++ vm-tools-0.0.4-aq/xen/Makefile	2005-04-11 20:49:51.000000000 -0500
@@ -37,4 +37,8 @@ install: libxen.a
                    $(DESTDIR)$(PREFIX)/include/xen/ctrl_chan.h
 	$(INSTALL) -m644 libxen.a $(DESTDIR)$(PREFIX)/lib/libxen.a
 
+uninstall:
+	$(RM) $(DESTDIR)$(PREFIX)/include/xen/ctrl_chan.h
+	$(RM) $(DESTDIR)$(PREFIX)/lib/libxen.a
+
 clean:; $(RM) *.o libxen.a

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-04-12  7:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-12  7:26 [PATCH] Cleaner Makefiles for VM-Tools aq

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.