Skip to contentSkip to conversation

build: more adjustments to top-level Makefile dependencies

PATCH In review Wei Liu 3 participants 3 messages May 19, 2017 Kbuild

lore
Share & tools
lore

Wei Liu

author
#0 lore raw

PATCH 1/1 build: more adjustments to top-level Makefile dependencies

In the original code, top-level dist target unconditionally invokes dist target for tools/include, which is wrong when tools component is not enabled.

Make dist-tools depend on dist-tools-public-headers, which depends on build-tools-public-headers.

Discovered by Travis-CI.

---
Cc: Ian Jackson <[email protected]>
Cc: Julien Grall <[email protected]>

Tested with

1. ./configure --disable-tools --disable-stubdom then make -j8 dist
2. ./configure, make -j8 dist-stubdom then make -j8 dist-tools
3. ./configure --disable-tools then make -j8 dist
3. ./configure, make -j8 dist

Travis is now happy, too.

I'm sure make --enable-stubdom --disable-tools didn't work with or without this patch, because tools/include needs files generated by tools' ./configure.

---
 Makefile | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
Makefile +7 -1
index e958bdc44b..fc30b3cc29 100644
@@ -42,6 +42,10 @@ export DESTDIR
 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
+
 # build and install everything into the standard system directories
 .PHONY: install
 install: $(TARGS_INSTALL)
@@ -80,13 +84,15 @@ test:
 .PHONY: dist
 dist: DESTDIR=$(DISTDIR)/install
 dist: $(TARGS_DIST) dist-misc
-	make -C tools/include dist
 
 dist-misc:
 	$(INSTALL_DIR) $(DISTDIR)/
 	$(INSTALL_DATA) ./COPYING $(DISTDIR)
 	$(INSTALL_DATA) ./README $(DISTDIR)
 	$(INSTALL_PROG) ./install.sh $(DISTDIR)
+
+
+dist-tools: dist-tools-public-headers
 dist-%: DESTDIR=$(DISTDIR)/install
 dist-%: install-%
 	@: # do nothing
Signature · 7 lines
2.11.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Acked-by on v1 1/1
#1 lore raw

Wei Liu writes ("[PATCH for-4.9] build: more adjustments to top-level Makefile dependencies"):

Quoted 6 lines

In the original code, top-level dist target unconditionally invokes dist target for tools/include, which is wrong when tools component is not enabled.

Make dist-tools depend on dist-tools-public-headers, which depends on build-tools-public-headers.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#2 lore raw

Hi,

Quoted 9 lines · Ian Jackson

Wei Liu writes ("[PATCH for-4.9] build: more adjustments to top-level Makefile dependencies"):

Quoted 6 lines

In the original code, top-level dist target unconditionally invokes dist target for tools/include, which is wrong when tools component is not enabled.

Make dist-tools depend on dist-tools-public-headers, which depends on build-tools-public-headers.

Cheers,

Signature · 6 lines
Julien Grall

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel