diff --git a/.gitignore b/.gitignore index f11e61321a..26bc583f74 100644 --- a/.gitignore +++ b/.gitignore @@ -45,8 +45,8 @@ build-* dist/* docs/tmp.* docs/html/ -docs/man/xl.cfg.pod.5 -docs/man/xl.pod.1 +docs/man/xl.cfg.5.pod +docs/man/xl.1.pod docs/man1/ docs/man5/ docs/man7/ diff --git a/docs/Makefile b/docs/Makefile index 8f933cf93f..2867efc53b 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -6,12 +6,10 @@ VERSION := $(shell $(MAKE) -C $(XEN_ROOT)/xen --no-print-directory xenversion) DATE := $(shell date +%Y-%m-%d) DOC_ARCHES := arm x86_32 x86_64 +MAN_SECTIONS := 1 5 7 8 # Documentation sources to build -MAN1SRC-y := $(sort $(wildcard man/*.pod.1 man/*.markdown.1)) -MAN5SRC-y := $(sort $(wildcard man/*.pod.5 man/*.markdown.5)) -MAN7SRC-y := $(sort $(wildcard man/*.pod.7 man/*.markdown.7)) -MAN8SRC-y := $(sort $(wildcard man/*.pod.8 man/*.markdown.8)) +MAN-SRC-y := $(sort $(basename $(wildcard man/*.pod man/*.pandoc))) MARKDOWNSRC-y := $(sort $(shell find misc -name '*.markdown' -print)) @@ -20,38 +18,20 @@ TXTSRC-y := $(sort $(shell find misc -name '*.txt' -print)) PANDOCSRC-y := $(sort $(shell find designs/ features/ misc/ process/ specs/ -name '*.pandoc' -print)) # Documentation targets -DOC_MAN1 := $(patsubst man/%.pod.1,man1/%.1,$(MAN1SRC-y)) \ - $(patsubst man/%.markdown.1,man1/%.1,$(MAN1SRC-y)) -DOC_MAN5 := $(patsubst man/%.pod.5,man5/%.5,$(MAN5SRC-y)) \ - $(patsubst man/%.markdown.5,man5/%.5,$(MAN5SRC-y)) -DOC_MAN7 := $(patsubst man/%.pod.7,man7/%.7,$(MAN7SRC-y)) \ - $(patsubst man/%.markdown.7,man7/%.7,$(MAN7SRC-y)) -DOC_MAN8 := $(patsubst man/%.pod.8,man8/%.8,$(MAN8SRC-y)) \ - $(patsubst man/%.markdown.8,man8/%.8,$(MAN8SRC-y)) +$(foreach i,$(MAN_SECTIONS), \ + $(eval DOC_MAN$(i) := $(patsubst man/%.$(i),man$(i)/%.$(i), \ + $(filter %.$(i),$(MAN-SRC-y))))) + DOC_HTML := html/SUPPORT.html \ $(patsubst %.markdown,html/%.html,$(MARKDOWNSRC-y)) \ $(patsubst %.pandoc,html/%.html,$(PANDOCSRC-y)) \ - $(patsubst man/%.markdown.1,html/man/%.1.html,$(MAN1SRC-y)) \ - $(patsubst man/%.markdown.5,html/man/%.5.html,$(MAN5SRC-y)) \ - $(patsubst man/%.markdown.7,html/man/%.7.html,$(MAN7SRC-y)) \ - $(patsubst man/%.markdown.8,html/man/%.8.html,$(MAN8SRC-y)) \ - $(patsubst man/%.pod.1,html/man/%.1.html,$(MAN1SRC-y)) \ - $(patsubst man/%.pod.5,html/man/%.5.html,$(MAN5SRC-y)) \ - $(patsubst man/%.pod.7,html/man/%.7.html,$(MAN7SRC-y)) \ - $(patsubst man/%.pod.8,html/man/%.8.html,$(MAN8SRC-y)) \ + $(patsubst %,html/%.html,$(MAN-SRC-y)) \ $(patsubst %.txt,html/%.txt,$(TXTSRC-y)) \ $(patsubst %,html/hypercall/%/index.html,$(DOC_ARCHES)) DOC_TXT := $(patsubst %.txt,txt/%.txt,$(TXTSRC-y)) \ $(patsubst %.markdown,txt/%.txt,$(MARKDOWNSRC-y)) \ $(patsubst %.pandoc,txt/%.txt,$(PANDOCSRC-y)) \ - $(patsubst man/%.markdown.1,txt/man/%.1.txt,$(MAN1SRC-y)) \ - $(patsubst man/%.markdown.5,txt/man/%.5.txt,$(MAN5SRC-y)) \ - $(patsubst man/%.markdown.7,txt/man/%.7.txt,$(MAN7SRC-y)) \ - $(patsubst man/%.markdown.8,txt/man/%.8.txt,$(MAN8SRC-y)) \ - $(patsubst man/%.pod.1,txt/man/%.1.txt,$(MAN1SRC-y)) \ - $(patsubst man/%.pod.5,txt/man/%.5.txt,$(MAN5SRC-y)) \ - $(patsubst man/%.pod.7,txt/man/%.7.txt,$(MAN7SRC-y)) \ - $(patsubst man/%.pod.8,txt/man/%.8.txt,$(MAN8SRC-y)) + $(patsubst %,txt/%.txt,$(MAN-SRC-y)) DOC_PDF := $(patsubst %.markdown,pdf/%.pdf,$(MARKDOWNSRC-y)) \ $(patsubst %.pandoc,pdf/%.pdf,$(PANDOCSRC-y)) @@ -99,7 +79,7 @@ distclean: clean define GENERATE_MANPAGE_RULES # Real manpages -man$(1)/%.$(1): man/%.pod.$(1) Makefile +man$(1)/%.$(1): man/%.$(1).pod Makefile ifneq ($(POD2MAN),) @$(INSTALL_DIR) $$(@D) $(POD2MAN) --release=$(VERSION) --name=$$* -s $(1) -c "Xen" $$< $$@ @@ -107,7 +87,7 @@ else @echo "pod2man not installed; skipping $$@" endif -man$(1)/%.$(1): man/%.markdown.$(1) Makefile +man$(1)/%.$(1): man/%.$(1).pandoc Makefile ifneq ($(PANDOC),) @$(INSTALL_DIR) $$(@D) $(PANDOC) --standalone -V title=$$* -V section=$(1) \ @@ -118,7 +98,7 @@ else endif # HTML manpages -html/man/%.$(1).html: man/%.pod.$(1) Makefile +html/man/%.$(1).html: man/%.$(1).pod Makefile ifneq ($(POD2HTML),) @$(INSTALL_DIR) $$(@D) $(POD2HTML) --infile=$$< --outfile=$$@ @@ -126,7 +106,7 @@ else @echo "pod2html not installed; skipping $$@" endif -html/man/%.$(1).html: man/%.markdown.$(1) Makefile +html/man/%.$(1).html: man/%.$(1).pandoc Makefile ifneq ($(PANDOC),) @$(INSTALL_DIR) $$(@D) $(PANDOC) --standalone $$< -t html --toc --output $$@ @@ -135,7 +115,7 @@ else endif # Text manpages -txt/man/%.$(1).txt: man/%.pod.$(1) Makefile +txt/man/%.$(1).txt: man/%.$(1).pod Makefile ifneq ($(POD2TEXT),) @$(INSTALL_DIR) $$(@D) $(POD2TEXT) $$< $$@ @@ -143,7 +123,7 @@ else @echo "pod2text not installed; skipping $$@" endif -txt/man/%.$(1).txt: man/%.markdown.$(1) Makefile +txt/man/%.$(1).txt: man/%.$(1).pandoc Makefile ifneq ($(PANDOC),) @$(INSTALL_DIR) $$(@D) $(PANDOC) --standalone $$< -t plain --output $$@ @@ -169,7 +149,7 @@ clean-man$(1)-pages: # Uninstall .PHONY: uninstall-man$(1)-pages uninstall-man$(1)-pages: - rm -f $(addprefix $(DESTDIR)$(mandir)/man$(1)/, $(filter-out %.pod.$(1) %.markdown.$(1), $(notdir $(DOC_MAN$(1))))) + rm -f $(addprefix $(DESTDIR)$(mandir)/,$(DOC_MAN$(1))) # Link buld/install/clean to toplevel rules man-pages: man$(1)-pages @@ -180,7 +160,7 @@ uninstall-man-pages: uninstall-man$(1)-pages endef # Generate manpage rules for each section -$(foreach i,1 5 7 8,$(eval $(call GENERATE_MANPAGE_RULES,$(i)))) +$(foreach i,$(MAN_SECTIONS),$(eval $(call GENERATE_MANPAGE_RULES,$(i)))) .PHONY: install-html install-html: html txt figs diff --git a/docs/configure b/docs/configure index a3b4cb6223..3e0089c435 100755 --- a/docs/configure +++ b/docs/configure @@ -1752,7 +1752,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu -ac_config_files="$ac_config_files ../config/Docs.mk man/xl.cfg.pod.5 man/xl.pod.1" +ac_config_files="$ac_config_files ../config/Docs.mk man/xl.cfg.5.pod man/xl.1.pod" ac_aux_dir= for ac_dir in ../ "$srcdir"/../; do @@ -3031,8 +3031,8 @@ for ac_config_target in $ac_config_targets do case $ac_config_target in "../config/Docs.mk") CONFIG_FILES="$CONFIG_FILES ../config/Docs.mk" ;; - "man/xl.cfg.pod.5") CONFIG_FILES="$CONFIG_FILES man/xl.cfg.pod.5" ;; - "man/xl.pod.1") CONFIG_FILES="$CONFIG_FILES man/xl.pod.1" ;; + "man/xl.cfg.5.pod") CONFIG_FILES="$CONFIG_FILES man/xl.cfg.5.pod" ;; + "man/xl.1.pod") CONFIG_FILES="$CONFIG_FILES man/xl.1.pod" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac diff --git a/docs/configure.ac b/docs/configure.ac index a2929c4aaa..577716265c 100644 --- a/docs/configure.ac +++ b/docs/configure.ac @@ -7,8 +7,8 @@ AC_INIT([Xen Hypervisor Documentation], m4_esyscmd([../version.sh ../xen/Makefil AC_CONFIG_SRCDIR([misc/xen-command-line.markdown]) AC_CONFIG_FILES([ ../config/Docs.mk -man/xl.cfg.pod.5 -man/xl.pod.1 +man/xl.cfg.5.pod +man/xl.1.pod ]) AC_CONFIG_AUX_DIR([../]) diff --git a/docs/man/xen-pci-device-reservations.pod.7 b/docs/man/xen-pci-device-reservations.7.pod similarity index 100% rename from docs/man/xen-pci-device-reservations.pod.7 rename to docs/man/xen-pci-device-reservations.7.pod diff --git a/docs/man/xen-pv-channel.pod.7 b/docs/man/xen-pv-channel.7.pod similarity index 100% rename from docs/man/xen-pv-channel.pod.7 rename to docs/man/xen-pv-channel.7.pod diff --git a/docs/man/xen-tscmode.pod.7 b/docs/man/xen-tscmode.7.pod similarity index 100% rename from docs/man/xen-tscmode.pod.7 rename to docs/man/xen-tscmode.7.pod diff --git a/docs/man/xen-vbd-interface.markdown.7 b/docs/man/xen-vbd-interface.7.pandoc similarity index 100% rename from docs/man/xen-vbd-interface.markdown.7 rename to docs/man/xen-vbd-interface.7.pandoc diff --git a/docs/man/xen-vtpm.pod.7 b/docs/man/xen-vtpm.7.pod similarity index 100% rename from docs/man/xen-vtpm.pod.7 rename to docs/man/xen-vtpm.7.pod diff --git a/docs/man/xen-vtpmmgr.pod.7 b/docs/man/xen-vtpmmgr.7.pod similarity index 100% rename from docs/man/xen-vtpmmgr.pod.7 rename to docs/man/xen-vtpmmgr.7.pod diff --git a/docs/man/xenstore-chmod.pod.1 b/docs/man/xenstore-chmod.1.pod similarity index 100% rename from docs/man/xenstore-chmod.pod.1 rename to docs/man/xenstore-chmod.1.pod diff --git a/docs/man/xenstore-ls.pod.1 b/docs/man/xenstore-ls.1.pod similarity index 100% rename from docs/man/xenstore-ls.pod.1 rename to docs/man/xenstore-ls.1.pod diff --git a/docs/man/xenstore-read.pod.1 b/docs/man/xenstore-read.1.pod similarity index 100% rename from docs/man/xenstore-read.pod.1 rename to docs/man/xenstore-read.1.pod diff --git a/docs/man/xenstore-write.pod.1 b/docs/man/xenstore-write.1.pod similarity index 100% rename from docs/man/xenstore-write.pod.1 rename to docs/man/xenstore-write.1.pod diff --git a/docs/man/xenstore.pod.1 b/docs/man/xenstore.1.pod similarity index 100% rename from docs/man/xenstore.pod.1 rename to docs/man/xenstore.1.pod diff --git a/docs/man/xentop.pod.1 b/docs/man/xentop.1.pod similarity index 100% rename from docs/man/xentop.pod.1 rename to docs/man/xentop.1.pod diff --git a/docs/man/xentrace.pod.8 b/docs/man/xentrace.8.pod similarity index 100% rename from docs/man/xentrace.pod.8 rename to docs/man/xentrace.8.pod diff --git a/docs/man/xentrace_format.pod.1 b/docs/man/xentrace_format.1.pod similarity index 100% rename from docs/man/xentrace_format.pod.1 rename to docs/man/xentrace_format.1.pod diff --git a/docs/man/xl-disk-configuration.pod.5 b/docs/man/xl-disk-configuration.5.pod similarity index 100% rename from docs/man/xl-disk-configuration.pod.5 rename to docs/man/xl-disk-configuration.5.pod diff --git a/docs/man/xl-network-configuration.pod.5 b/docs/man/xl-network-configuration.5.pod similarity index 100% rename from docs/man/xl-network-configuration.pod.5 rename to docs/man/xl-network-configuration.5.pod diff --git a/docs/man/xl-numa-placement.pod.7 b/docs/man/xl-numa-placement.7.pod similarity index 100% rename from docs/man/xl-numa-placement.pod.7 rename to docs/man/xl-numa-placement.7.pod diff --git a/docs/man/xl.pod.1.in b/docs/man/xl.1.pod.in similarity index 100% rename from docs/man/xl.pod.1.in rename to docs/man/xl.1.pod.in diff --git a/docs/man/xl.cfg.pod.5.in b/docs/man/xl.cfg.5.pod.in similarity index 100% rename from docs/man/xl.cfg.pod.5.in rename to docs/man/xl.cfg.5.pod.in diff --git a/docs/man/xl.conf.pod.5 b/docs/man/xl.conf.5.pod similarity index 100% rename from docs/man/xl.conf.pod.5 rename to docs/man/xl.conf.5.pod diff --git a/docs/man/xlcpupool.cfg.pod.5 b/docs/man/xlcpupool.cfg.5.pod similarity index 100% rename from docs/man/xlcpupool.cfg.pod.5 rename to docs/man/xlcpupool.cfg.5.pod