Skip to contentSkip to conversation

docs: Build docs for ARM as well as x86_64

PATCH Applied Ian Campbell 3 participants 5 messages Jul 22, 2013 – Aug 8, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 docs: Build docs for ARM as well as x86_64

From: Ian Campbell <[email protected]>

Also do x86_32 (which is still relevant since it is "compat mode").

Install as hypercall-$ARCH but keep the hypercall path around as a symlink to the x86_64 version so links (e.g. to http://xenbits.xen.org/docs/ keep working.

---
 docs/Makefile | 21 ++++++++++++++++-----
 1 file changed, 16 insertions(+), 5 deletions(-)
docs/Makefile +16 -5
index 472b7ed..f480171 100644
@@ -4,6 +4,8 @@ include $(XEN_ROOT)/Config.mk
 
 VERSION		:= $(shell $(MAKE) -C $(XEN_ROOT)/xen --no-print-directory xenversion)
 
+DOC_ARCHES      := arm x86_32 x86_64
+
 DOC_MAN5SRC	:= $(wildcard man/*.pod.5)
 DOC_MAN1SRC	:= $(wildcard man/*.pod.1)
 DOC_MAN1	:= $(patsubst man/%.pod.1,man1/%.1,$(DOC_MAN1SRC))
@@ -13,7 +15,8 @@ DOC_HTML	:= $(patsubst %.markdown,html/%.html,$(DOC_MARKDOWN)) \
 		   $(patsubst man/%.pod.1,html/man/%.1.html,$(DOC_MAN1SRC)) \
 		   $(patsubst man/%.pod.5,html/man/%.5.html,$(DOC_MAN5SRC)) \
 		   $(patsubst %.txt,html/%.txt,$(wildcard misc/*.txt)) \
-		   html/hypercall/index.html
+		   html/hypercall/index.html \
+		   $(patsubst %,html/hypercall-%/index.html,$(DOC_ARCHES))
 DOC_TXT         := $(patsubst %.txt,txt/%.txt,$(wildcard misc/*.txt)) \
 		   $(patsubst %.markdown,txt/%.txt,$(DOC_MARKDOWN)) \
 		   $(patsubst man/%.pod.1,txt/man/%.1.txt,$(DOC_MAN1SRC)) \
@@ -121,15 +124,23 @@ else
 	@echo "pod2html not installed; skipping $<."
 endif
 
-html/hypercall/index.html: $(CURDIR)/xen-headers
+# For non-x86 arches exclude the subarch whole x86 arch.
+$(foreach i,$(filter-out x86_32 x86_64,$(DOC_ARCHES)),html/hypercall-$(i)/index.html): EXTRA_EXCLUDE := -X arch-x86
+
+html/hypercall-%/index.html: $(CURDIR)/xen-headers Makefile
 	rm -rf $(@D)
 	$(INSTALL_DIR) $(@D)
 	$(PERL) -w $(CURDIR)/xen-headers -O $(@D) \
-		-T 'arch-x86_64 - Xen public headers' \
-		-X arch-x86_32 -X xen-x86_32 -X arch-arm \
+		-T 'arch-$* - Xen public headers' \
+		$(patsubst %,-X arch-%,$(filter-out $*,$(DOC_ARCHES))) \
+		$(patsubst %,-X xen-%,$(filter-out $*,$(DOC_ARCHES))) \
+		$(EXTRA_EXCLUDE) \
 		$(XEN_ROOT)/xen include/public include/xen/errno.h
 
--include html/hypercall/.deps
+html/hypercall/index.html: html/hypercall-x86_64/index.html
+	ln -nfs hypercall-x86_64 html/hypercall
+
+-include $(wildcard html/hypercall-*/.deps)
 
 txt/%.txt: %.txt
 	$(INSTALL_DIR) $(@D)
Signature · 1 line
1.8.3.2
#1 lore raw

ping?

Quoted 63 lines · Ian Campbell

From: Ian Campbell <[email protected]>

Also do x86_32 (which is still relevant since it is "compat mode").

Install as hypercall-$ARCH but keep the hypercall path around as a symlink to the x86_64 version so links (e.g. to http://xenbits.xen.org/docs/ keep working.

---
 docs/Makefile | 21 ++++++++++++++++-----
 1 file changed, 16 insertions(+), 5 deletions(-)
docs/Makefile +16 -5
index 472b7ed..f480171 100644
@@ -4,6 +4,8 @@ include $(XEN_ROOT)/Config.mk
 
 VERSION		:= $(shell $(MAKE) -C $(XEN_ROOT)/xen --no-print-directory xenversion)
 
+DOC_ARCHES      := arm x86_32 x86_64
+
 DOC_MAN5SRC	:= $(wildcard man/*.pod.5)
 DOC_MAN1SRC	:= $(wildcard man/*.pod.1)
 DOC_MAN1	:= $(patsubst man/%.pod.1,man1/%.1,$(DOC_MAN1SRC))
@@ -13,7 +15,8 @@ DOC_HTML	:= $(patsubst %.markdown,html/%.html,$(DOC_MARKDOWN)) \
 		   $(patsubst man/%.pod.1,html/man/%.1.html,$(DOC_MAN1SRC)) \
 		   $(patsubst man/%.pod.5,html/man/%.5.html,$(DOC_MAN5SRC)) \
 		   $(patsubst %.txt,html/%.txt,$(wildcard misc/*.txt)) \
-		   html/hypercall/index.html
+		   html/hypercall/index.html \
+		   $(patsubst %,html/hypercall-%/index.html,$(DOC_ARCHES))
 DOC_TXT         := $(patsubst %.txt,txt/%.txt,$(wildcard misc/*.txt)) \
 		   $(patsubst %.markdown,txt/%.txt,$(DOC_MARKDOWN)) \
 		   $(patsubst man/%.pod.1,txt/man/%.1.txt,$(DOC_MAN1SRC)) \
@@ -121,15 +124,23 @@ else
 	@echo "pod2html not installed; skipping $<."
 endif
 
-html/hypercall/index.html: $(CURDIR)/xen-headers
+# For non-x86 arches exclude the subarch whole x86 arch.
+$(foreach i,$(filter-out x86_32 x86_64,$(DOC_ARCHES)),html/hypercall-$(i)/index.html): EXTRA_EXCLUDE := -X arch-x86
+
+html/hypercall-%/index.html: $(CURDIR)/xen-headers Makefile
 	rm -rf $(@D)
 	$(INSTALL_DIR) $(@D)
 	$(PERL) -w $(CURDIR)/xen-headers -O $(@D) \
-		-T 'arch-x86_64 - Xen public headers' \
-		-X arch-x86_32 -X xen-x86_32 -X arch-arm \
+		-T 'arch-$* - Xen public headers' \
+		$(patsubst %,-X arch-%,$(filter-out $*,$(DOC_ARCHES))) \
+		$(patsubst %,-X xen-%,$(filter-out $*,$(DOC_ARCHES))) \
+		$(EXTRA_EXCLUDE) \
 		$(XEN_ROOT)/xen include/public include/xen/errno.h
 
--include html/hypercall/.deps
+html/hypercall/index.html: html/hypercall-x86_64/index.html
+	ln -nfs hypercall-x86_64 html/hypercall
+
+-include $(wildcard html/hypercall-*/.deps)
 
 txt/%.txt: %.txt
 	$(INSTALL_DIR) $(@D)
Acked-by
#2 lore raw

Ian Campbell writes ("Re: [PATCH] docs: Build docs for ARM as well as x86_64"):

Quoted 8 lines · Ian Campbell
Quoted 7 lines

From: Ian Campbell <[email protected]>

Also do x86_32 (which is still relevant since it is "compat mode").

Install as hypercall-$ARCH but keep the hypercall path around as a symlink to the x86_64 version so links (e.g. to
http://xenbits.xen.org/docs/ keep working.

Quoted 2 lines
Quoted 2 lines

+# For non-x86 arches exclude the subarch whole x86 arch.
+$(foreach i,$(filter-out x86_32 x86_64,$(DOC_ARCHES)),html/hypercall-$(i)/index.html): EXTRA_EXCLUDE := -X arch-x86

Yuk.

In general I think we can be more relaxed about peer review for docs changes, including docs build system changes.

Ian.

#3 lore raw
Quoted 11 lines · Ian Jackson

Ian Campbell writes ("Re: [PATCH] docs: Build docs for ARM as well as x86_64"):

Quoted 8 lines · Ian Campbell
Quoted 7 lines

From: Ian Campbell <[email protected]>

Also do x86_32 (which is still relevant since it is "compat mode").

Install as hypercall-$ARCH but keep the hypercall path around as a symlink to the x86_64 version so links (e.g. to
http://xenbits.xen.org/docs/ keep working.

Thanks, I'll hold off on committing, partly because I've just kicked off my script on another batch and partly...

Quoted 5 lines
Quoted 3 lines
Quoted 3 lines

+# For non-x86 arches exclude the subarch whole x86 arch.
+$(foreach i,$(filter-out x86_32 x86_64,$(DOC_ARCHES)),html/hypercall-$(i)/index.html): EXTRA_EXCLUDE := -X arch-x86

Yuk.

... in case anyone has any better ideas, because yes, "Yuk".

Quoted 2 lines

In general I think we can be more relaxed about peer review for docs changes, including docs build system changes.

I'd be happy to relax.

Ian.

Applied
#4 lore raw
In reply to Ian Jackson
Quoted 11 lines · Ian Jackson

Ian Campbell writes ("Re: [PATCH] docs: Build docs for ARM as well as x86_64"):

Quoted 8 lines · Ian Campbell
Quoted 7 lines

From: Ian Campbell <[email protected]>

Also do x86_32 (which is still relevant since it is "compat mode").

Install as hypercall-$ARCH but keep the hypercall path around as a symlink to the x86_64 version so links (e.g. to
http://xenbits.xen.org/docs/ keep working.

Applied.