[TOOLS] Fix foreign header build breakage.
authorIan Campbell <ian.campbell@xensource.com>
Wed, 31 Jan 2007 10:25:12 +0000 (10:25 +0000)
committerIan Campbell <ian.campbell@xensource.com>
Wed, 31 Jan 2007 10:25:12 +0000 (10:25 +0000)
Having both the Xen tree and the tools tree recurse into the foreign
headers directory causes headaches in parallel builds and when
building 32-bit tools + 64 bit Xen in the same tree.

Therefore we cause mk-symlinks to symlink in the foreign headers build
bits and generate a local version of the headers and checker tool.

Only libxc needs to do this since the other tools were actually
picking up the libxc version of the headers anyway so the mk-symlinks
calls can be removed from these components.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
tools/Rules.mk
tools/blktap/Makefile
tools/security/Makefile
tools/xenfb/Makefile

index 6c8049bc1089371ce6802b2d4defda4970eb24d5..af530ac65dcc8b880759b7126179e8a330ad68f9 100644 (file)
@@ -32,7 +32,7 @@ CFLAGS += $(CFLAGS-y)
 %.o: %.cc
        $(CC) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $<
 
-.PHONY: mk-symlinks mk-symlinks-xen mk-symlinks-$(XEN_OS) mk-foreign-headers
+.PHONY: mk-symlinks mk-symlinks-xen mk-symlinks-$(XEN_OS)
 
 mk-symlinks-SunOS:
 
@@ -43,7 +43,7 @@ mk-symlinks-Linux:
          ln -sf ../../$(LINUX_ROOT)/include/xen/public/*.h . )
        ( cd xen && rm -f sys && ln -sf linux sys )
 
-mk-symlinks-xen: mk-foreign-headers
+mk-symlinks-xen:
        mkdir -p xen
        ( cd xen && ln -sf ../$(XEN_ROOT)/xen/include/public/*.h . )
        mkdir -p xen/hvm
@@ -53,9 +53,9 @@ mk-symlinks-xen: mk-foreign-headers
        mkdir -p xen/arch-x86
        ( cd xen/arch-x86 && ln -sf ../../$(XEN_ROOT)/xen/include/public/arch-x86/*.h . )
        mkdir -p xen/foreign
-       ( cd xen/foreign && ln -sf ../../$(XEN_ROOT)/xen/include/public/foreign/*.h . )
-
-mk-foreign-headers:
-       make -C $(XEN_ROOT)/xen/include/public/foreign
+       ( cd xen/foreign && ln -sf ../../$(XEN_ROOT)/xen/include/public/foreign/Makefile . )
+       ( cd xen/foreign && ln -sf ../../$(XEN_ROOT)/xen/include/public/foreign/reference.size . )
+       ( cd xen/foreign && ln -sf ../../$(XEN_ROOT)/xen/include/public/foreign/*.py . )
+       make -C xen/foreign
 
 mk-symlinks: mk-symlinks-xen mk-symlinks-$(XEN_OS)
index fb194f3203a5be19d9870edf8ea7b509ef26d300..671c4f4b87775c10e3de2845f40295f63a655846 100644 (file)
@@ -9,7 +9,7 @@ SUBDIRS-y += drivers
 all: build
 
 .PHONY: build
-build: mk-symlinks
+build:
        @set -e; for subdir in $(SUBDIRS-y); do \
        $(MAKE) -C $$subdir all;       \
                done
@@ -22,7 +22,7 @@ install:
 
 .PHONY: clean
 clean:
-       rm -rf *.a *.so *.o *.rpm $(LIB) *~ $(DEPS) xen TAGS
+       rm -rf *.a *.so *.o *.rpm $(LIB) *~ $(DEPS) TAGS
        @set -e; for subdir in $(SUBDIRS-y); do \
        $(MAKE) -C $$subdir clean;       \
                done
index cd0835a9100022b59b239d5089b898ee3fa39968..d29a1926bbd387d31b8865c38f59d0f0e15b3fee 100644 (file)
@@ -86,7 +86,7 @@ install:
 endif
 
 .PHONY: build
-build: mk-symlinks $(ACM_INST_TOOLS) $(ACM_NOINST_TOOLS)
+build: $(ACM_INST_TOOLS) $(ACM_NOINST_TOOLS)
        python python/setup.py build
        chmod 700 $(ACM_SCRIPTS)
 
@@ -104,7 +104,6 @@ clean:
        $(RM) $(ACM_INST_TOOLS) $(ACM_NOINST_TOOLS)
        $(RM) $(ACM_OBJS)
        $(RM) $(PROG_DEPS)
-       $(RM) -r xen
        $(RM) -r build
 
 .PHONY: mrproper
index e7c76e73b509479e405460a68771530088c3bfdf..b9bd3ba1e67e0b722bcf1a3cf7216ff3e9d8d4fc 100644 (file)
@@ -12,7 +12,7 @@ INSTALL_DIR     = $(INSTALL) -d -m0755
 all: build
 
 .PHONY: build
-build: mk-symlinks
+build:
        $(MAKE) vncfb sdlfb
 
 install: all