diff mbox

[for-4.9] tools/build: Fix installation of public headers

Message ID 1495472449-4804-1-git-send-email-andrew.cooper3@citrix.com (mailing list archive)
State New, archived
Headers show

Commit Message

Andrew Cooper May 22, 2017, 5 p.m. UTC
The recent build fixes have left the install-tools rule no longer installing
the Xen public headers into /usr/include/xen/

Use pattern rules to generalise the %-tools-public-headers targets, and switch
install-tools to depend on install-tools-public-headers rather than
build-tools-public-headers.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Ian Jackson <Ian.Jackson@eu.citrix.com>
CC: Wei Liu <wei.liu2@citrix.com>
CC: Julien Grall <julien.grall@arm.com>
---
 Makefile | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

Comments

Wei Liu May 24, 2017, 2:31 p.m. UTC | #1
On Mon, May 22, 2017 at 06:00:49PM +0100, Andrew Cooper wrote:
> The recent build fixes have left the install-tools rule no longer installing
> the Xen public headers into /usr/include/xen/
> 
> Use pattern rules to generalise the %-tools-public-headers targets, and switch
> install-tools to depend on install-tools-public-headers rather than
> build-tools-public-headers.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

Reviewed-by: Wei Liu <wei.liu2@citrix.com>
Ian Jackson May 24, 2017, 3:35 p.m. UTC | #2
Wei Liu writes ("Re: [PATCH for-4.9] tools/build: Fix installation of public headers"):
> Reviewed-by: Wei Liu <wei.liu2@citrix.com>

FAOD I think this patch is broken and am developing a replacement.

Ian.
diff mbox

Patch

diff --git a/Makefile b/Makefile
index fc30b3c..7e40ad6 100644
--- a/Makefile
+++ b/Makefile
@@ -38,13 +38,9 @@  mini-os-dir-force-update: mini-os-dir
 export XEN_TARGET_ARCH
 export DESTDIR
 
-.PHONY: build-tools-public-headers
-build-tools-public-headers:
-	$(MAKE) -C tools/include
-
-.PHONY: dist-tools-public-headers
-dist-tools-public-headers: build-tools-public-headers
-	$(MAKE) -C tools/include dist
+$(foreach i,build install dist,$(eval PHONY: $(i)-tools-public-headers))
+%-tools-public-headers:
+	$(MAKE) -C tools/include $*
 
 # build and install everything into the standard system directories
 .PHONY: install
@@ -109,7 +105,7 @@  install-xen:
 	$(MAKE) -C xen install
 
 .PHONY: install-tools
-install-tools: build-tools-public-headers
+install-tools: install-tools-public-headers
 	$(MAKE) -C tools install
 
 .PHONY: install-stubdom