diff mbox series

[XEN,v7,34/51] build: start building the tools with the main makefiles

Message ID 20210824105038.1257926-35-anthony.perard@citrix.com (mailing list archive)
State New, archived
Headers show
Series xen: Build system improvements, now with out-of-tree build! | expand

Commit Message

Anthony PERARD Aug. 24, 2021, 10:50 a.m. UTC
This will make out-of-tree build easier.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
---
 xen/Makefile       |  8 ++++----
 xen/tools/Makefile | 17 ++---------------
 2 files changed, 6 insertions(+), 19 deletions(-)

Comments

Jan Beulich Oct. 11, 2021, 3:49 p.m. UTC | #1
On 24.08.2021 12:50, Anthony PERARD wrote:
> This will make out-of-tree build easier.
> 
> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>

Acked-by: Jan Beulich <jbeulich@suse.com>
diff mbox series

Patch

diff --git a/xen/Makefile b/xen/Makefile
index 0da08bc39930..8381ffd5d168 100644
--- a/xen/Makefile
+++ b/xen/Makefile
@@ -200,7 +200,7 @@  endif # root-make-done
 
 PHONY += tools_fixdep
 tools_fixdep:
-	$(MAKE) -C tools fixdep
+	$(MAKE) $(build)=tools tools/fixdep
 
 ifeq ($(config-build),y)
 # ===========================================================================
@@ -228,7 +228,7 @@  ifeq ($(need-config),y)
 # "tools_fixdep" which is a .PHONY target and would force make to call
 # "defconfig" again to update $(KCONFIG_CONFIG).
 tools/fixdep:
-	$(MAKE) -C tools fixdep
+	$(MAKE) $(build)=tools tools/fixdep
 
 # Allow people to just run `make` as before and not force them to configure
 $(KCONFIG_CONFIG): tools/fixdep
@@ -391,7 +391,7 @@  _debug:
 
 .PHONY: _clean
 _clean:
-	$(MAKE) -C tools clean
+	$(MAKE) $(clean) tools
 	$(MAKE) $(clean) include
 	$(MAKE) $(clean) common
 	$(MAKE) $(clean) drivers
@@ -420,7 +420,7 @@  $(TARGET).gz: $(TARGET)
 	mv $@.new $@
 
 $(TARGET): tools_fixdep FORCE
-	$(MAKE) -C tools
+	$(MAKE) $(build)=tools
 	$(MAKE) $(build)=. include/xen/compile.h
 	[ -e arch/$(TARGET_ARCH)/efi ] && for f in $$(cd common/efi; echo *.[ch]); \
 		do test -r arch/$(TARGET_ARCH)/efi/$$f || \
diff --git a/xen/tools/Makefile b/xen/tools/Makefile
index 722f3664549d..a5078b7cb8de 100644
--- a/xen/tools/Makefile
+++ b/xen/tools/Makefile
@@ -1,15 +1,2 @@ 
-
-include $(XEN_ROOT)/Config.mk
-
-.PHONY: default
-default: symbols fixdep
-
-.PHONY: clean
-clean:
-	rm -f *.o symbols fixdep
-
-symbols: symbols.c
-	$(HOSTCC) $(HOSTCFLAGS) -o $@ $<
-
-fixdep: fixdep.c
-	$(HOSTCC) $(HOSTCFLAGS) -o $@ $<
+hostprogs-always-y += symbols
+hostprogs-always-y += fixdep