Skip to contentSkip to conversation

debian add-build.patch (5 of 5)

PATCH Adam Heath 1 participant 1 message Feb 5, 2005 Kbuild

lore
Share & tools
lore

Adam Heath

author
#0 lore raw

Name: add-build.patch
Depends: tools-misc-TARGETS.patch, python-install.patch, pic-lib.patch
Description: add build targets
Add build targets to all makefiles. Debian does builds as non-root, so it's better to do as much as possible before requiring root privs.

DiffStat:

 Makefile                |    5 +++++
 docs/Makefile           |    3 ++-
 tools/Makefile          |   18 +++++++++---------
 tools/examples/Makefile |    1 +
 tools/libxc/Makefile    |    7 ++++---
 tools/libxutil/Makefile |    5 +++--
 tools/misc/Makefile     |    5 +++--
 tools/python/Makefile   |    3 ++-
 tools/xentrace/Makefile |    5 +++--
 tools/xfrd/Makefile     |    3 ++-
 xen/Makefile            |    7 ++++---
 11 files changed, 38 insertions(+), 24 deletions(-)
tools/examples/Makefile +1 -0
@@ -21,6 +21,7 @@
 XEN_SCRIPTS += block-enbd
 
 all: 
+build:
 
 install: all install-initd install-configs install-scripts
 
tools/python/Makefile +2 -1
@@ -2,7 +2,8 @@
 XEN_ROOT = ../..
 include $(XEN_ROOT)/tools/Rules.mk
 
-all:
+all: build
+build:
 	CFLAGS="$(CFLAGS)" python setup.py build
 
 install: build
tools/libxutil/Makefile +3 -2
@@ -41,7 +41,8 @@
 LIB      += $(LIB_NAME).so.$(MAJOR).$(MINOR)
 LIB      += $(LIB_NAME).a
 
-all: check-for-zlib
+all: build
+build: check-for-zlib
 	$(MAKE) $(LIB)
 
 $(LIB_PIC_OBJS): %.opic: %.c
@@ -67,7 +68,7 @@
 	false; \
 	fi
 
-install: all
+install: build
 	[ -d $(DESTDIR)/usr/lib ] || $(INSTALL_DIR) -p $(DESTDIR)/usr/lib
 	$(INSTALL_PROG) $(LIB_NAME).so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/lib
 	$(INSTALL_DATA) $(LIB_NAME).a $(DESTDIR)/usr/lib
tools/libxc/Makefile +4 -3
@@ -45,7 +45,8 @@
 
 LIB		:= $(LIB_NAME).a $(LIB_NAME).so $(LIB_NAME).so.$(MAJOR) $(LIB_NAME).so.$(MAJOR).$(MINOR)
 
-all: check-for-zlib mk-symlinks
+all: build
+build: check-for-zlib mk-symlinks
 	$(MAKE) $(LIB)
 
 check-for-zlib:
@@ -67,7 +68,7 @@
 	( cd xen/linux >/dev/null ; \
 	  ln -sf ../../$(LINUX_ROOT)/include/asm-xen/linux-public/*.h . )
 
-install: all
+install: build
 	[ -d $(DESTDIR)/usr/lib ] || $(INSTALL_DIR) $(DESTDIR)/usr/lib
 	[ -d $(DESTDIR)/usr/include ] || $(INSTALL_DIR) $(DESTDIR)/usr/include
 	$(INSTALL_PROG) $(LIB_NAME).so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/lib
@@ -79,7 +80,7 @@
 clean:
 	rm -rf *.a *.so *.o *.opic *.rpm $(LIB) *~ $(DEPS) xen
 
-rpm: all
+rpm: build
 	rm -rf staging
 	mkdir staging
 	mkdir staging/i386
tools/misc/Makefile +3 -2
@@ -19,10 +19,11 @@
 INSTALL_BIN  = $(TARGETS) xencons
 INSTALL_SBIN = netfix xm xend xensv xenperf
 
-all: $(TARGETS)
+all: build
+build: $(TARGETS)
 	$(MAKE) -C miniterm
 
-install: all
+install: build
 	[ -d $(DESTDIR)/usr/bin ] || $(INSTALL_DIR) $(DESTDIR)/usr/bin
 	[ -d $(DESTDIR)/usr/sbin ] || $(INSTALL_DIR) $(DESTDIR)/usr/sbin
 	$(INSTALL_PROG) $(INSTALL_BIN) $(DESTDIR)/usr/bin
tools/xentrace/Makefile +3 -2
@@ -21,9 +21,10 @@
 MAN1     = $(wildcard *.1)
 MAN8     = $(wildcard *.8)
 
-all: $(BIN)
+all: build
+build: $(BIN)
 
-install: all
+install: build
 	[ -d $(DESTDIR)/usr/bin ] || $(INSTALL_DIR) $(DESTDIR)/usr/bin
 	[ -d $(DESTDIR)/usr/man/man1 ] || \
 		$(INSTALL_DIR) $(DESTDIR)/usr/man/man1
tools/xfrd/Makefile +2 -1
@@ -63,7 +63,8 @@
 
 #$(warning XFRD_LIBS = $(XFRD_LIBS))
 
-all: xfrd
+all: build
+build: xfrd
 
 xfrd: $(XFRD_PROG_OBJ)
 	$(CC) -o $@ $^ $(XFRD_LIBS)
tools/Makefile +9 -9
@@ -20,12 +20,12 @@
 	$(MAKE) -C xfrd install
 	$(MAKE) -C sv install
 
-clean:
-	$(MAKE) -C libxutil clean
-	$(MAKE) -C libxc clean
-	$(MAKE) -C misc clean
-	$(MAKE) -C examples clean
-	$(MAKE) -C xentrace clean
-	$(MAKE) -C python clean
-	$(MAKE) -C xfrd clean
-
+clean build:
+	$(MAKE) -C check $@
+	$(MAKE) -C libxutil $@
+	$(MAKE) -C libxc $@
+	$(MAKE) -C misc $@
+	$(MAKE) -C examples $@
+	$(MAKE) -C xentrace $@
+	$(MAKE) -C python $@
+	$(MAKE) -C xfrd $@
xen/Makefile +4 -3
@@ -16,7 +16,7 @@
 
 include Rules.mk
 
-default: $(TARGET).gz
+default: build
 $(TARGET).gz: $(TARGET)
 	gzip -f -9 < $< > [email protected]
 	mv [email protected] $@
@@ -24,9 +24,10 @@
 debug:	
 	objdump -D -S $(TARGET)-syms > $(TARGET).s
 
-dist:
-	$(MAKE) install
+dist: install
 
+build: $(TARGET).gz
+	
 install: $(TARGET).gz
 	[ -d $(DESTDIR)/boot ] || $(INSTALL_DIR) $(DESTDIR)/boot
 	$(INSTALL_DATA) $(TARGET).gz $(DESTDIR)/boot
docs/Makefile +2 -1
@@ -20,7 +20,8 @@
 GFX  = $(patsubst %.obj, %.eps, $(wildcard figs/*.obj))
 GFX += $(patsubst %.fig, %.eps, $(wildcard figs/*.fig))
 
-all: ps pdf html
+all: build
+build: ps pdf html
 	rm -f *.aux *.dvi *.bbl *.blg *.glo *.idx *.ilg *.log *.ind *.toc
 
 ps: $(DOC_PS)
Makefile +5 -0
@@ -37,6 +37,11 @@
 # build and install everything into the standard system directories
 install: install-xen install-tools install-kernels install-docs
 
+build: kernels
+	$(MAKE) -C xen build
+	$(MAKE) -C tools build
+	$(MAKE) -C docs build
+
 # build and install everything into local dist directory
 dist: xen tools kernels docs
 	$(INSTALL_DIR) $(DISTDIR)/check

-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl