[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 3/5] docs: rename *.in files to *.src



Rename the *.in files under docs to *.src, resulting to replace the
@...@ markers only at build time.

This allows to change the affected document files without having to
run "configure" for making the change effective.

While at it add the generated files to the distclean make target.

Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
---
 docs/Makefile                                            | 8 +++++++-
 docs/configure                                           | 7 +------
 docs/configure.ac                                        | 9 +--------
 ...guration.5.pod.in => xl-disk-configuration.5.pod.src} | 0
 ...ation.5.pod.in => xl-network-configuration.5.pod.src} | 0
 docs/man/{xl.1.pod.in => xl.1.pod.src}                   | 0
 docs/man/{xl.cfg.5.pod.in => xl.cfg.5.pod.src}           | 0
 docs/man/{xl.conf.5.pod.in => xl.conf.5.pod.src}         | 0
 8 files changed, 9 insertions(+), 15 deletions(-)
 rename docs/man/{xl-disk-configuration.5.pod.in => 
xl-disk-configuration.5.pod.src} (100%)
 rename docs/man/{xl-network-configuration.5.pod.in => 
xl-network-configuration.5.pod.src} (100%)
 rename docs/man/{xl.1.pod.in => xl.1.pod.src} (100%)
 rename docs/man/{xl.cfg.5.pod.in => xl.cfg.5.pod.src} (100%)
 rename docs/man/{xl.conf.5.pod.in => xl.conf.5.pod.src} (100%)

diff --git a/docs/Makefile b/docs/Makefile
index 37776d303c..5d7fbcb032 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -8,8 +8,10 @@ DATE           := $(call date,"+%Y-%m-%d")
 DOC_ARCHES      := arm ppc riscv x86_32 x86_64
 MAN_SECTIONS    := 1 5 7 8
 
+GEN-MAN := $(sort $(patsubst %.src,%,$(wildcard man/*.pod.src)))
+
 # Documentation sources to build
-MAN-SRC-y := $(sort $(basename $(wildcard man/*.pod man/*.pandoc)))
+MAN-SRC-y := $(sort $(basename $(wildcard man/*.pod man/*.pandoc) $(GEN-MAN)))
 
 RST-SRC-y := $(sort $(filter-out %index.rst,$(shell find * -type f -name 
'*.rst' -print)))
 
@@ -77,11 +79,15 @@ clean: clean-man-pages
 distclean: clean
        rm -rf $(XEN_ROOT)/config/Docs.mk config.log config.status config.cache 
\
                autom4te.cache
+       rm -f $(GEN-MAN)
 
 # Top level install targets
 
 .PHONY: man-pages install-man-pages clean-man-pages uninstall-man-pages
 
+man/%: man/%.src
+       $(apply-build-vars)
+
 # Metarules for generating manpages.  Run with $(1) substitued for section
 define GENERATE_MANPAGE_RULES
 
diff --git a/docs/configure b/docs/configure
index 98dda3cd0f..8871914dcb 100755
--- a/docs/configure
+++ b/docs/configure
@@ -1794,7 +1794,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 
-ac_config_files="$ac_config_files ../config/Docs.mk man/xl.cfg.5.pod 
man/xl.1.pod man/xl-disk-configuration.5.pod man/xl-network-configuration.5.pod 
man/xl.conf.5.pod"
+ac_config_files="$ac_config_files ../config/Docs.mk"
 
 
 
@@ -3063,11 +3063,6 @@ 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.5.pod") CONFIG_FILES="$CONFIG_FILES man/xl.cfg.5.pod" ;;
-    "man/xl.1.pod") CONFIG_FILES="$CONFIG_FILES man/xl.1.pod" ;;
-    "man/xl-disk-configuration.5.pod") CONFIG_FILES="$CONFIG_FILES 
man/xl-disk-configuration.5.pod" ;;
-    "man/xl-network-configuration.5.pod") CONFIG_FILES="$CONFIG_FILES 
man/xl-network-configuration.5.pod" ;;
-    "man/xl.conf.5.pod") CONFIG_FILES="$CONFIG_FILES man/xl.conf.5.pod" ;;
 
   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
   esac
diff --git a/docs/configure.ac b/docs/configure.ac
index c2e5edd3b3..43dc516056 100644
--- a/docs/configure.ac
+++ b/docs/configure.ac
@@ -5,14 +5,7 @@ AC_PREREQ([2.67])
 AC_INIT([Xen Hypervisor Documentation], m4_esyscmd([../version.sh 
../xen/Makefile]),
     [xen-devel@xxxxxxxxxxxxx], [xen], [https://www.xen.org/])
 AC_CONFIG_SRCDIR([misc/xen-command-line.pandoc])
-AC_CONFIG_FILES([
-../config/Docs.mk
-man/xl.cfg.5.pod
-man/xl.1.pod
-man/xl-disk-configuration.5.pod
-man/xl-network-configuration.5.pod
-man/xl.conf.5.pod
-])
+AC_CONFIG_FILES([../config/Docs.mk])
 AC_CONFIG_AUX_DIR([../])
 
 # M4 Macro includes
diff --git a/docs/man/xl-disk-configuration.5.pod.in 
b/docs/man/xl-disk-configuration.5.pod.src
similarity index 100%
rename from docs/man/xl-disk-configuration.5.pod.in
rename to docs/man/xl-disk-configuration.5.pod.src
diff --git a/docs/man/xl-network-configuration.5.pod.in 
b/docs/man/xl-network-configuration.5.pod.src
similarity index 100%
rename from docs/man/xl-network-configuration.5.pod.in
rename to docs/man/xl-network-configuration.5.pod.src
diff --git a/docs/man/xl.1.pod.in b/docs/man/xl.1.pod.src
similarity index 100%
rename from docs/man/xl.1.pod.in
rename to docs/man/xl.1.pod.src
diff --git a/docs/man/xl.cfg.5.pod.in b/docs/man/xl.cfg.5.pod.src
similarity index 100%
rename from docs/man/xl.cfg.5.pod.in
rename to docs/man/xl.cfg.5.pod.src
diff --git a/docs/man/xl.conf.5.pod.in b/docs/man/xl.conf.5.pod.src
similarity index 100%
rename from docs/man/xl.conf.5.pod.in
rename to docs/man/xl.conf.5.pod.src
-- 
2.51.0




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.