bitkeeper revision 1.1159.270.3 (42330ae8efsd9SdlhNX6EpksrtV6oQ)
authordoogie@brainfood.com[kaf24] <doogie@brainfood.com[kaf24]>
Sat, 12 Mar 2005 15:29:44 +0000 (15:29 +0000)
committerdoogie@brainfood.com[kaf24] <doogie@brainfood.com[kaf24]>
Sat, 12 Mar 2005 15:29:44 +0000 (15:29 +0000)
[PATCH] add-build.patch

 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.
Signed-off-by: Adam Heath <doogie@brainfood.com>
Makefile
docs/Makefile
tools/Makefile
tools/examples/Makefile
tools/libxc/Makefile
tools/libxutil/Makefile
tools/misc/Makefile
tools/python/Makefile
tools/xentrace/Makefile
tools/xfrd/Makefile
xen/Makefile

index b7229fc9a779202209674013fab26aae1ca5f40d..cf860ad1fba9d9fb303d3565599b40f690d40380 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -37,6 +37,11 @@ all: dist
 # 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
index 8b968dc87e674d932ba83e39bf2566f8e69de096..117e63ce4f99cbbc783d6fae89ac60c69d961e34 100644 (file)
@@ -18,7 +18,8 @@ DOC_HTML      := $(patsubst src/%.tex,html/%/index.html,$(DOC_TEX))
 
 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)
index 0140f8baae3890040abab7f3bff0eff6aba1a797..c582a014d00a545df223bad653145f31c1f10c4c 100644 (file)
@@ -20,13 +20,13 @@ install:
        $(MAKE) -C xfrd install
        $(MAKE) -C sv install
 
-clean:
-       $(MAKE) -C check 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 $@
 
index 72c1f610eb97007ddb73e694a30bfc4790a34406..5957a422b902a44e8f29398debba4c7f9c19b35e 100644 (file)
@@ -21,6 +21,7 @@ XEN_SCRIPTS += block-file
 XEN_SCRIPTS += block-enbd
 
 all: 
+build:
 
 install: all install-initd install-configs install-scripts
 
index 01fd926cf447d9d2e06127f775a4e2c992225d5b..a254f3f396e30e11a22359feb5ae2771b2ec8636 100644 (file)
@@ -44,7 +44,8 @@ PIC_OBJS := $(patsubst %.c,%.opic,$(SRCS))
 
 LIB      := libxc.a libxc.so libxc.so.$(MAJOR) libxc.so.$(MAJOR).$(MINOR)
 
-all: check-for-zlib mk-symlinks
+all: build
+build: check-for-zlib mk-symlinks
        $(MAKE) $(LIB)
 
 check-for-zlib:
@@ -66,7 +67,7 @@ mk-symlinks:
        ( 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) libxc.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/lib
@@ -78,7 +79,7 @@ install: all
 clean:
        rm -rf *.a *.so* *.o *.opic *.rpm $(LIB) *~ $(DEPS) xen
 
-rpm: all
+rpm: build
        rm -rf staging
        mkdir staging
        mkdir staging/i386
index a9be3e3977cdb67e993d121b64f91cc2c9238b1a..95e8597b3ec9c692550ceea1d9d72256afbe745b 100644 (file)
@@ -40,7 +40,8 @@ LIB      += libxutil.so.$(MAJOR)
 LIB      += libxutil.so.$(MAJOR).$(MINOR)
 LIB      += libxutil.a
 
-all: check-for-zlib
+all: build
+build: check-for-zlib
        $(MAKE) $(LIB)
 
 libxutil.so: libxutil.so.$(MAJOR)
@@ -63,7 +64,7 @@ check-for-zlib:
        false; \
        fi
 
-install: all
+install: build
        [ -d $(DESTDIR)/usr/lib ] || $(INSTALL_DIR) -p $(DESTDIR)/usr/lib
        $(INSTALL_PROG) libxutil.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/lib
        $(INSTALL_DATA) libxutil.a $(DESTDIR)/usr/lib
index 39bfc424e681a976457a4e0c8d352c7f4f980f00..7bfe0fad6b6474e7e94c71ab49307c5cf5ce31f3 100644 (file)
@@ -19,10 +19,11 @@ TARGETS  = xenperf
 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
index 7d152e12ae78c5d9f19370fc40e6e4a326133ac5..3a42f6047fa73f11dbd34804582fb7d1896d238b 100644 (file)
@@ -2,7 +2,8 @@
 XEN_ROOT = ../..
 include $(XEN_ROOT)/tools/Rules.mk
 
-all:
+all: build
+build:
        CFLAGS="$(CFLAGS)" python setup.py build
 
 install: all
index 5ed26cf795a1f9a4a8f41145ccf1f18b580d3815..3ee097ee318ac881dcdc788c87b18666706520c1 100644 (file)
@@ -21,9 +21,10 @@ SCRIPTS  = xentrace_format
 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
index 4cdc810e95f2f3b9eeb39a5264bdb329a68a5313..fb6f2ae244a27bdcaf9cc1ba5194ed4ba1383056 100644 (file)
@@ -63,7 +63,8 @@ XFRD_LIBS += $(CURL_LIBS)
 
 #$(warning XFRD_LIBS = $(XFRD_LIBS))
 
-all: xfrd
+all: build
+build: xfrd
 
 xfrd: $(XFRD_PROG_OBJ)
        $(CC) -o $@ $^ $(XFRD_LIBS)
index 04ce606de58cce7280a37c016125c8211e3122b8..7593e017fa11238f93ed923f15887c29cb5dbc2d 100644 (file)
@@ -16,7 +16,7 @@ export BASEDIR          := $(CURDIR)
 
 include Rules.mk
 
-default: $(TARGET).gz
+default: build
 $(TARGET).gz: $(TARGET)
        gzip -f -9 < $< > $@.new
        mv $@.new $@
@@ -24,9 +24,10 @@ $(TARGET).gz: $(TARGET)
 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