configure: reduce number of files created
cover configure: reduce number of files created
Instead of creating lots of files during configure, create those files (where possible) rather at build time. This reduces the need to run configure when e.g. changing a man page containing a path defined by the configure run.
Juergen Gross (5):
config: remove stale definition from Config.mk
build: add new make pattern for making file from file.src
docs: rename *.in files to *.src
config: remove unused paths from config/Paths.mk.in
tools: rename most *.in files to *.src
.gitignore | 1 +
Config.mk | 20 ++++++++++++------
config/Paths.mk.in | 5 -----
config/Tools-paths.mk.in | 10 +++++++++
docs/Makefile | 8 ++++++-
docs/configure | 7 +------
docs/configure.ac | 9 +-------
...pod.in => xl-disk-configuration.5.pod.src} | 0
....in => xl-network-configuration.5.pod.src} | 0
docs/man/{xl.1.pod.in => xl.1.pod.src} | 0
.../man/{xl.cfg.5.pod.in => xl.cfg.5.pod.src} | 0
.../{xl.conf.5.pod.in => xl.conf.5.pod.src} | 0
tools/configure | 21 ++-----------------
tools/configure.ac | 19 +----------------
tools/hotplug/FreeBSD/Makefile | 8 ++++++-
.../rc.d/{xencommons.in => xencommons.src} | 0
...xendriverdomain.in => xendriverdomain.src} | 0
tools/hotplug/Linux/Makefile | 11 +++++++++-
...xencommons.in => sysconfig.xencommons.src} | 0
...xendomains.in => sysconfig.xendomains.src} | 0
.../{xen-watchdog.in => xen-watchdog.src} | 0
.../init.d/{xencommons.in => xencommons.src} | 0
.../init.d/{xendomains.in => xendomains.src} | 0
...xendriverdomain.in => xendriverdomain.src} | 0
...launch-xenstore.in => launch-xenstore.src} | 0
.../Linux/{vif-setup.in => vif-setup.src} | 0
...common.sh.in => xen-hotplug-common.sh.src} | 0
.../Linux/{xendomains.in => xendomains.src} | 0
tools/hotplug/NetBSD/Makefile | 8 ++++++-
.../rc.d/{xencommons.in => xencommons.src} | 0
...xendriverdomain.in => xendriverdomain.src} | 0
tools/hotplug/common/Makefile | 5 ++++-
.../{hotplugpath.sh.in => hotplugpath.sh.src} | 0
tools/ocaml/libs/xs/Makefile | 7 +++++++
.../libs/xs/{paths.ml.in => paths.ml.src} | 0
tools/ocaml/xenstored/Makefile | 7 ++++++-
...oxenstored.conf.in => oxenstored.conf.src} | 0
.../xenstored/{paths.ml.in => paths.ml.src} | 0
38 files changed, 78 insertions(+), 68 deletions(-)
create mode 100644 config/Tools-paths.mk.in
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%)
rename tools/hotplug/FreeBSD/rc.d/{xencommons.in => xencommons.src} (100%)
rename tools/hotplug/FreeBSD/rc.d/{xendriverdomain.in => xendriverdomain.src} (100%)
rename tools/hotplug/Linux/init.d/{sysconfig.xencommons.in => sysconfig.xencommons.src} (100%)
rename tools/hotplug/Linux/init.d/{sysconfig.xendomains.in => sysconfig.xendomains.src} (100%)
rename tools/hotplug/Linux/init.d/{xen-watchdog.in => xen-watchdog.src} (100%)
rename tools/hotplug/Linux/init.d/{xencommons.in => xencommons.src} (100%)
rename tools/hotplug/Linux/init.d/{xendomains.in => xendomains.src} (100%)
rename tools/hotplug/Linux/init.d/{xendriverdomain.in => xendriverdomain.src} (100%)
rename tools/hotplug/Linux/{launch-xenstore.in => launch-xenstore.src} (100%)
rename tools/hotplug/Linux/{vif-setup.in => vif-setup.src} (100%)
rename tools/hotplug/Linux/{xen-hotplug-common.sh.in => xen-hotplug-common.sh.src} (100%)
rename tools/hotplug/Linux/{xendomains.in => xendomains.src} (100%)
rename tools/hotplug/NetBSD/rc.d/{xencommons.in => xencommons.src} (100%)
rename tools/hotplug/NetBSD/rc.d/{xendriverdomain.in => xendriverdomain.src} (100%)
rename tools/hotplug/common/{hotplugpath.sh.in => hotplugpath.sh.src} (100%)
rename tools/ocaml/libs/xs/{paths.ml.in => paths.ml.src} (100%)
rename tools/ocaml/xenstored/{oxenstored.conf.in => oxenstored.conf.src} (100%)
rename tools/ocaml/xenstored/{paths.ml.in => paths.ml.src} (100%)Signature · 1 line
2.51.0
PATCH 1/5 config: remove stale definition from Config.mk
buildmakevars2shellvars is used nowhere, so remove it.
--- Config.mk | 6 ------ 1 file changed, 6 deletions(-)
Config.mk +0 -6
@@ -149,12 +149,6 @@ else date = $(shell LC_ALL=C date $(1)) endif -define buildmakevars2shellvars - export PREFIX="$(prefix)"; \ - export XEN_SCRIPT_DIR="$(XEN_SCRIPT_DIR)"; \ - export XEN_ROOT="$(XEN_ROOT)" -endef - # # Compare $(1) and $(2) and replace $(2) with $(1) if they differ #
Signature · 1 line
2.51.0
Re: [PATCH 1/5] config: remove stale definition from Config.mk
Quoted 1 line · Juergen Gross
buildmakevars2shellvars is used nowhere, so remove it.
Amends: 1eb944f65055 ("tools: remove qemu-traditional")
Quoted 1 line
Signed-off-by Juergen Gross <[email protected]>
PATCH 2/5 build: add new make pattern for making file from file.src
In reply to Juergen GrossAdd a new make pattern for creating <file> from <file>.src at build time. Define the recipe as a macro in order to avoid replicating it for cases where it needs to handle subdirectories (creating <dir>/<file> from <dir>/<file>.src).
This can be used instead of the current approach to perform the similar step for file.in during ./configure by renaming the source file to file.src.
This will avoid having to run ./configure just because of modifying a file depending on a variable set by configure.
Prepare to have multiple files as source for the replacement patterns.
--- Config.mk | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
Config.mk +14 -0
@@ -159,6 +159,20 @@ define move-if-changed if ! cmp -s $(1) $(2); then mv -f $(1) $(2); else rm -f $(1); fi endef +PATH_FILES := Paths +INC_FILES := $(foreach f, $(PATH_FILES), $(XEN_ROOT)/config/$(f).mk) + +include $(INC_FILES) + +BUILD_MAKE_VARS := $(foreach f, $(PATH_FILES), $(shell awk '$$2 == ":=" { print $$1; }' $(XEN_ROOT)/config/$(f).mk.in)) + +define apply-build-vars + sed $(foreach v, $(BUILD_MAKE_VARS), -e 's#@$(v)@#$($(v))#g') <$< >$@ +endef + +%:: %.src + $(apply-build-vars) + CFLAGS += -fno-strict-aliasing CFLAGS += -std=gnu99
Signature · 1 line
2.51.0
Re: [PATCH 2/5] build: add new make pattern for making file from file.src
Quoted 9 lines · Juergen Gross
Config.mk +3
-0@@ -159,6 +159,20 @@ define move-if-changed if ! cmp -s $(1) $(2); then mv -f $(1) $(2); else rm -f $(1); fi endef +PATH_FILES := Paths +INC_FILES := $(foreach f, $(PATH_FILES), $(XEN_ROOT)/config/$(f).mk) +
Config.mk define move-if-changed · line 174
Quoted 10 lines
Config.mk +10
-0+include $(INC_FILES) + +BUILD_MAKE_VARS := $(foreach f, $(PATH_FILES), $(shell awk '$$2 == ":=" { print $$1; }' $(XEN_ROOT)/config/$(f).mk.in)) + +define apply-build-vars + sed $(foreach v, $(BUILD_MAKE_VARS), -e 's#@$(v)@#$($(v))#g') <$< >$@ +endef + +%:: %.src + $(apply-build-vars)
I'm not convinced of having this here, rather than in less central places (say under tools/ and docs/). I'm also not sure I really understand why it needs to be .src - can't we stick to .in, enumerating the specific files that want generating this way (thus avoiding accidental attempts to re-generate files which need generating a different way)?
Also - why the double colon here?
(Maybe I figure answers to these questions as I look at subsequent patches.)
Jan
Re: [PATCH 2/5] build: add new make pattern for making file from file.src
Quoted 26 lines · Jan Beulich
Quoted 9 lines · Juergen Gross
Config.mk +3
-0@@ -159,6 +159,20 @@ define move-if-changed if ! cmp -s $(1) $(2); then mv -f $(1) $(2); else rm -f $(1); fi endef +PATH_FILES := Paths +INC_FILES := $(foreach f, $(PATH_FILES), $(XEN_ROOT)/config/$(f).mk) +Config.mk define move-if-changed · line 174
Quoted 10 lines
Config.mk +10
-0+include $(INC_FILES) + +BUILD_MAKE_VARS := $(foreach f, $(PATH_FILES), $(shell awk '$$2 == ":=" { print $$1; }' $(XEN_ROOT)/config/$(f).mk.in)) + +define apply-build-vars + sed $(foreach v, $(BUILD_MAKE_VARS), -e 's#@$(v)@#$($(v))#g') <$< >$@ +endef + +%:: %.src + $(apply-build-vars)I'm not convinced of having this here, rather than in less central places (say under
tools/and docs/). I'm also not sure I really understand why it needs to be .src - can't we stick to .in, enumerating the specific files that want generating this way (thus avoiding accidental attempts to re-generate files which need generating a different way)?
Quoted 3 lines
Also - why the double colon here?
(Maybe I figure answers to these questions as I look at subsequent patches.)
I too am wondering about .src vs .in.
.in is a well known naming scheme, and the exact point in the build where it's generated isn't of interest IMO. I've not come across .src before, as far as I'm aware.
Is it going to cause a problem to keep all these files named .in ?
~Andrew
Re: [PATCH 2/5] build: add new make pattern for making file from file.src
In reply to Jan BeulichQuoted 18 lines · Jan Beulich
Quoted 17 lines · Juergen Gross
Config.mk +11
-0@@ -159,6 +159,20 @@ define move-if-changed if ! cmp -s $(1) $(2); then mv -f $(1) $(2); else rm -f $(1); fi endef +PATH_FILES := Paths +INC_FILES := $(foreach f, $(PATH_FILES), $(XEN_ROOT)/config/$(f).mk) + +include $(INC_FILES) + +BUILD_MAKE_VARS := $(foreach f, $(PATH_FILES), $(shell awk '$$2 == ":=" { print $$1; }' $(XEN_ROOT)/config/$(f).mk.in)) + +define apply-build-vars + sed $(foreach v, $(BUILD_MAKE_VARS), -e 's#@$(v)@#$($(v))#g') <$< >$@ +endef +
Quoted 8 lines
Config.mk define move-if-changed · line 174
Quoted 2 lines
Config.mk +2
-0+%:: %.src + $(apply-build-vars)I'm not convinced of having this here, rather than in less central places (say under
tools/and docs/). I'm also not sure I really understand why it needs to be .src - can't we stick to .in, enumerating the specific files that want generating this way (thus avoiding accidental attempts to re-generate files which need generating a different way)?
With enumerating the files to generate we could probably stick to *.in.
I'm fine with moving the rule to the tools and docs makefiles, but I'd like to keep the apply-build-vars definition here in order to avoid duplicating it.
Quoted 1 line
Also - why the double colon here?
I've followed the advice in the make reference for "match-anything pattern rules".
With enumerating the files to generate it should be possible to avoid the double colon.
Juergen
Re: [PATCH 2/5] build: add new make pattern for making file from file.src
Quoted 28 lines · Jürgen Groß
Quoted 18 lines · Jan Beulich
Quoted 17 lines · Juergen Gross
Config.mk +11
-0@@ -159,6 +159,20 @@ define move-if-changed if ! cmp -s $(1) $(2); then mv -f $(1) $(2); else rm -f $(1); fi endef +PATH_FILES := Paths +INC_FILES := $(foreach f, $(PATH_FILES), $(XEN_ROOT)/config/$(f).mk) + +include $(INC_FILES) + +BUILD_MAKE_VARS := $(foreach f, $(PATH_FILES), $(shell awk '$$2 == ":=" { print $$1; }' $(XEN_ROOT)/config/$(f).mk.in)) + +define apply-build-vars + sed $(foreach v, $(BUILD_MAKE_VARS), -e 's#@$(v)@#$($(v))#g') <$< >$@ +endef +Quoted 8 lines
Config.mk define move-if-changed · line 174
Quoted 2 lines
Config.mk +2
-0+%:: %.src + $(apply-build-vars)I'm not convinced of having this here, rather than in less central places (say under
tools/and docs/). I'm also not sure I really understand why it needs to be .src - can't we stick to .in, enumerating the specific files that want generating this way (thus avoiding accidental attempts to re-generate files which need generating a different way)?
Quoted 5 lines
With enumerating the files to generate we could probably stick to *.in.
I'm fine with moving the rule to the tools and docs makefiles, but I'd like to keep the apply-build-vars definition here in order to avoid duplicating it.
Oh, sure, I indeed meant only the rule to move.
Jan
PATCH 3/5 docs: rename *.in files to *.src
In reply to Juergen GrossRename 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.
---
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%)docs/Makefile +7 -1
@@ -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
docs/configure +1 -6
@@ -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
docs/configure.ac +1 -8
@@ -5,14 +5,7 @@ AC_PREREQ([2.67]) AC_INIT([Xen Hypervisor Documentation], m4_esyscmd([../version.sh ../xen/Makefile]), [[email protected]], [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
docs/man/xl-disk-configuration.5.pod.src renamed from docs/man/xl-disk-configuration.5.pod.in +0 -0
docs/man/xl-network-configuration.5.pod.src renamed from docs/man/xl-network-configuration.5.pod.in +0 -0
docs/man/xl.1.pod.src renamed from docs/man/xl.1.pod.in +0 -0
docs/man/xl.cfg.5.pod.src renamed from docs/man/xl.cfg.5.pod.in +0 -0
docs/man/xl.conf.5.pod.src renamed from docs/man/xl.conf.5.pod.in +0 -0
Signature · 1 line
2.51.0
PATCH 4/5 config: remove unused paths from config/Paths.mk.in
In reply to Juergen GrossSome paths in config/Paths.mk.in are used nowhere, so remove them.
--- config/Paths.mk.in | 5 ----- 1 file changed, 5 deletions(-)
config/Paths.mk.in +0 -5
@@ -20,10 +20,7 @@ libexecdir := @libexecdir@ datarootdir := @datarootdir@ mandir := @mandir@ docdir := @docdir@ -dvidir := @dvidir@ htmldir := @htmldir@ -pdfdir := @pdfdir@ -psdir := @psdir@ includedir := @includedir@ localstatedir := @localstatedir@ sysconfdir := @sysconfdir@
@@ -34,8 +31,6 @@ LIBEXEC_LIB := @LIBEXEC_LIB@ LIBEXEC_INC := @LIBEXEC_INC@ SHAREDIR := @SHAREDIR@ -MAN1DIR := $(mandir)/man1 -MAN8DIR := $(mandir)/man8 XEN_RUN_DIR := @XEN_RUN_DIR@ XEN_LOG_DIR := @XEN_LOG_DIR@
Signature · 1 line
2.51.0
Re: [PATCH 4/5] config: remove unused paths from config/Paths.mk.in
config/Paths.mk.in libexecdir := @libexecdir@ · line 25
Quoted 9 lines · Juergen Gross
config/Paths.mk.in +0
-2@@ -20,10 +20,7 @@ libexecdir := @libexecdir@ datarootdir := @datarootdir@ mandir := @mandir@ docdir := @docdir@ -dvidir := @dvidir@ htmldir := @htmldir@ -pdfdir := @pdfdir@
Question is whether we're mistakenly not respecting in particular this one, for the *.pdf we create. For all the others I agree there's no (present or potential) use. I notice though that docs/Makefile cleans e.g. *.dvi nevertheless.
Jan
Quoted 13 lines
config/Paths.mk.in +0
-3-psdir := @psdir@ includedir := @includedir@ localstatedir := @localstatedir@ sysconfdir := @sysconfdir@@@ -34,8 +31,6 @@ LIBEXEC_LIB := @LIBEXEC_LIB@ LIBEXEC_INC := @LIBEXEC_INC@ SHAREDIR := @SHAREDIR@ -MAN1DIR := $(mandir)/man1 -MAN8DIR := $(mandir)/man8 XEN_RUN_DIR := @XEN_RUN_DIR@ XEN_LOG_DIR := @XEN_LOG_DIR@
Re: [PATCH 4/5] config: remove unused paths from config/Paths.mk.in
Quoted 15 lines · Jan Beulich
config/Paths.mk.in libexecdir := @libexecdir@ · line 25
Quoted 9 lines · Juergen Gross
config/Paths.mk.in +0
-2@@ -20,10 +20,7 @@ libexecdir := @libexecdir@ datarootdir := @datarootdir@ mandir := @mandir@ docdir := @docdir@ -dvidir := @dvidir@ htmldir := @htmldir@ -pdfdir := @pdfdir@Question is whether we're mistakenly not respecting in particular this one, for the *.pdf we create. For all the others I agree there's no (present or potential) use. I notice though that docs/Makefile cleans e.g. *.dvi nevertheless.
Actually, I can't spot a use of htmldir either, when likely we should respect that one, too.
Jan
Re: [PATCH 4/5] config: remove unused paths from config/Paths.mk.in
Quoted 15 lines · Jan Beulich
Quoted 14 lines · Jan Beulich
config/Paths.mk.in libexecdir := @libexecdir@ · line 25
Quoted 9 lines · Juergen Gross
config/Paths.mk.in +0
-2@@ -20,10 +20,7 @@ libexecdir := @libexecdir@ datarootdir := @datarootdir@ mandir := @mandir@ docdir := @docdir@ -dvidir := @dvidir@ htmldir := @htmldir@ -pdfdir := @pdfdir@Question is whether we're mistakenly not respecting in particular this one, for the *.pdf we create. For all the others I agree there's no (present or potential) use. I notice though that docs/Makefile cleans e.g. *.dvi nevertheless.
Quoted 2 lines
Actually, I can't spot a use of htmldir either, when likely we should respect that one, too.
Besides the manpages, nothing generated in docs/ is really fit to package for end users. There's no coherent structure, some of it is straight braindumps from developers.
docdir is only used by the {un,}install-html targets (opencoding htmldir), and the rm in the install target is further evidence to the unsuitability of what's there.
I'd go so far as to suggest we should drop install-html, except that it would break the generation of https://xenbits.xen.org/docs/unstable/
~Andrew
Re: [PATCH 4/5] config: remove unused paths from config/Paths.mk.in
Quoted 23 lines · Andrew Cooper
Quoted 15 lines · Jan Beulich
Quoted 14 lines · Jan Beulich
config/Paths.mk.in libexecdir := @libexecdir@ · line 25
Quoted 9 lines · Juergen Gross
config/Paths.mk.in +0
-2@@ -20,10 +20,7 @@ libexecdir := @libexecdir@ datarootdir := @datarootdir@ mandir := @mandir@ docdir := @docdir@ -dvidir := @dvidir@ htmldir := @htmldir@ -pdfdir := @pdfdir@Question is whether we're mistakenly not respecting in particular this one, for the *.pdf we create. For all the others I agree there's no (present or potential) use. I notice though that docs/Makefile cleans e.g. *.dvi nevertheless.
Quoted 2 lines
Actually, I can't spot a use of htmldir either, when likely we should respect that one, too.
Besides the manpages, nothing generated in docs/ is really fit to package for end users. There's no coherent structure, some of it is straight braindumps from developers.
Quoted 6 lines
docdir is only used by the {un,}install-html targets (opencoding htmldir), and the rm in the install target is further evidence to the unsuitability of what's there.
I'd go so far as to suggest we should drop install-html, except that it would break the generation of https://xenbits.xen.org/docs/unstable/
I think I'll leave further cleanup for another patch.
As you said, docdir is being used right now and htmldir could be used in case the open coding via docdir is being cleaned up.
Juergen
Re: [PATCH 4/5] config: remove unused paths from config/Paths.mk.in
In reply to Jan BeulichQuoted 13 lines · Jan Beulich
config/Paths.mk.in libexecdir := @libexecdir@ · line 25
Quoted 9 lines · Juergen Gross
config/Paths.mk.in +0
-2@@ -20,10 +20,7 @@ libexecdir := @libexecdir@ datarootdir := @datarootdir@ mandir := @mandir@ docdir := @docdir@ -dvidir := @dvidir@ htmldir := @htmldir@ -pdfdir := @pdfdir@Question is whether we're mistakenly not respecting in particular this one, for the *.pdf we create.
We could as well use docdir for PDFs, right?
In case we really want pdfdir later we can easily re-add it.
Juergen
PATCH 5/5 tools: rename most *.in files to *.src
In reply to Juergen GrossRename the *.in files under tools read by configure to *.src, resulting to replace the @...@ markers only at build time.
As some of the markers are local to tools/configure, introduce config/Tools-paths.mk.in and add the related make variables to it. Add Tools-paths to the PATH_FILES make variable in order to include the definitions for replacing themin the *.src files.
Add the generated files to the distclean target.
---
.gitignore | 1 +
Config.mk | 2 +-
config/Tools-paths.mk.in | 10 +++++++++
tools/configure | 21 ++-----------------
tools/configure.ac | 19 +----------------
tools/hotplug/FreeBSD/Makefile | 8 ++++++-
.../rc.d/{xencommons.in => xencommons.src} | 0
...xendriverdomain.in => xendriverdomain.src} | 0
tools/hotplug/Linux/Makefile | 11 +++++++++-
...xencommons.in => sysconfig.xencommons.src} | 0
...xendomains.in => sysconfig.xendomains.src} | 0
.../{xen-watchdog.in => xen-watchdog.src} | 0
.../init.d/{xencommons.in => xencommons.src} | 0
.../init.d/{xendomains.in => xendomains.src} | 0
...xendriverdomain.in => xendriverdomain.src} | 0
...launch-xenstore.in => launch-xenstore.src} | 0
.../Linux/{vif-setup.in => vif-setup.src} | 0
...common.sh.in => xen-hotplug-common.sh.src} | 0
.../Linux/{xendomains.in => xendomains.src} | 0
tools/hotplug/NetBSD/Makefile | 8 ++++++-
.../rc.d/{xencommons.in => xencommons.src} | 0
...xendriverdomain.in => xendriverdomain.src} | 0
tools/hotplug/common/Makefile | 5 ++++-
.../{hotplugpath.sh.in => hotplugpath.sh.src} | 0
tools/ocaml/libs/xs/Makefile | 7 +++++++
.../libs/xs/{paths.ml.in => paths.ml.src} | 0
tools/ocaml/xenstored/Makefile | 7 ++++++-
...oxenstored.conf.in => oxenstored.conf.src} | 0
.../xenstored/{paths.ml.in => paths.ml.src} | 0
29 files changed, 56 insertions(+), 43 deletions(-)
create mode 100644 config/Tools-paths.mk.in
rename tools/hotplug/FreeBSD/rc.d/{xencommons.in => xencommons.src} (100%)
rename tools/hotplug/FreeBSD/rc.d/{xendriverdomain.in => xendriverdomain.src} (100%)
rename tools/hotplug/Linux/init.d/{sysconfig.xencommons.in => sysconfig.xencommons.src} (100%)
rename tools/hotplug/Linux/init.d/{sysconfig.xendomains.in => sysconfig.xendomains.src} (100%)
rename tools/hotplug/Linux/init.d/{xen-watchdog.in => xen-watchdog.src} (100%)
rename tools/hotplug/Linux/init.d/{xencommons.in => xencommons.src} (100%)
rename tools/hotplug/Linux/init.d/{xendomains.in => xendomains.src} (100%)
rename tools/hotplug/Linux/init.d/{xendriverdomain.in => xendriverdomain.src} (100%)
rename tools/hotplug/Linux/{launch-xenstore.in => launch-xenstore.src} (100%)
rename tools/hotplug/Linux/{vif-setup.in => vif-setup.src} (100%)
rename tools/hotplug/Linux/{xen-hotplug-common.sh.in => xen-hotplug-common.sh.src} (100%)
rename tools/hotplug/Linux/{xendomains.in => xendomains.src} (100%)
rename tools/hotplug/NetBSD/rc.d/{xencommons.in => xencommons.src} (100%)
rename tools/hotplug/NetBSD/rc.d/{xendriverdomain.in => xendriverdomain.src} (100%)
rename tools/hotplug/common/{hotplugpath.sh.in => hotplugpath.sh.src} (100%)
rename tools/ocaml/libs/xs/{paths.ml.in => paths.ml.src} (100%)
rename tools/ocaml/xenstored/{oxenstored.conf.in => oxenstored.conf.src} (100%)
rename tools/ocaml/xenstored/{paths.ml.in => paths.ml.src} (100%).gitignore +1 -0
@@ -47,6 +47,7 @@ config.status config.cache config/Toplevel.mk config/Paths.mk +config/Tools-paths.mk dist/* extras/
Config.mk +1 -1
@@ -159,7 +159,7 @@ define move-if-changed if ! cmp -s $(1) $(2); then mv -f $(1) $(2); else rm -f $(1); fi endef -PATH_FILES := Paths +PATH_FILES := Paths Tools-paths INC_FILES := $(foreach f, $(PATH_FILES), $(XEN_ROOT)/config/$(f).mk) include $(INC_FILES)
config/Tools-paths.mk.in new file +10 -0
@@ -0,0 +1,10 @@ +-include $(XEN_ROOT)/config/Paths.mk + +XENSTORED := @XENSTORED@ +XENSTORED_KVA := @XENSTORED_KVA@ +XENSTORED_PORT := @XENSTORED_PORT@ +XEN_RUN_STORED := @XEN_RUN_STORED@ + +LINUX_BACKEND_MODULES := @LINUX_BACKEND_MODULES@ + +qemu_xen_path := @qemu_xen_path@
tools/configure +2 -19
@@ -2742,7 +2742,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu -ac_config_files="$ac_config_files ../config/Tools.mk hotplug/common/hotplugpath.sh hotplug/FreeBSD/rc.d/xencommons hotplug/FreeBSD/rc.d/xendriverdomain hotplug/Linux/init.d/sysconfig.xencommons hotplug/Linux/init.d/sysconfig.xendomains hotplug/Linux/init.d/xen-watchdog hotplug/Linux/init.d/xencommons hotplug/Linux/init.d/xendomains hotplug/Linux/init.d/xendriverdomain hotplug/Linux/launch-xenstore hotplug/Linux/vif-setup hotplug/Linux/xen-hotplug-common.sh hotplug/Linux/xendomains hotplug/NetBSD/rc.d/xencommons hotplug/NetBSD/rc.d/xendriverdomain ocaml/libs/xs/paths.ml ocaml/xenstored/paths.ml ocaml/xenstored/oxenstored.conf" +ac_config_files="$ac_config_files ../config/Tools.mk ../config/Tools-paths.mk" ac_config_headers="$ac_config_headers config.h"
@@ -11268,24 +11268,7 @@ for ac_config_target in $ac_config_targets do case $ac_config_target in "../config/Tools.mk") CONFIG_FILES="$CONFIG_FILES ../config/Tools.mk" ;; - "hotplug/common/hotplugpath.sh") CONFIG_FILES="$CONFIG_FILES hotplug/common/hotplugpath.sh" ;; - "hotplug/FreeBSD/rc.d/xencommons") CONFIG_FILES="$CONFIG_FILES hotplug/FreeBSD/rc.d/xencommons" ;; - "hotplug/FreeBSD/rc.d/xendriverdomain") CONFIG_FILES="$CONFIG_FILES hotplug/FreeBSD/rc.d/xendriverdomain" ;; - "hotplug/Linux/init.d/sysconfig.xencommons") CONFIG_FILES="$CONFIG_FILES hotplug/Linux/init.d/sysconfig.xencommons" ;; - "hotplug/Linux/init.d/sysconfig.xendomains") CONFIG_FILES="$CONFIG_FILES hotplug/Linux/init.d/sysconfig.xendomains" ;; - "hotplug/Linux/init.d/xen-watchdog") CONFIG_FILES="$CONFIG_FILES hotplug/Linux/init.d/xen-watchdog" ;; - "hotplug/Linux/init.d/xencommons") CONFIG_FILES="$CONFIG_FILES hotplug/Linux/init.d/xencommons" ;; - "hotplug/Linux/init.d/xendomains") CONFIG_FILES="$CONFIG_FILES hotplug/Linux/init.d/xendomains" ;; - "hotplug/Linux/init.d/xendriverdomain") CONFIG_FILES="$CONFIG_FILES hotplug/Linux/init.d/xendriverdomain" ;; - "hotplug/Linux/launch-xenstore") CONFIG_FILES="$CONFIG_FILES hotplug/Linux/launch-xenstore" ;; - "hotplug/Linux/vif-setup") CONFIG_FILES="$CONFIG_FILES hotplug/Linux/vif-setup" ;; - "hotplug/Linux/xen-hotplug-common.sh") CONFIG_FILES="$CONFIG_FILES hotplug/Linux/xen-hotplug-common.sh" ;; - "hotplug/Linux/xendomains") CONFIG_FILES="$CONFIG_FILES hotplug/Linux/xendomains" ;; - "hotplug/NetBSD/rc.d/xencommons") CONFIG_FILES="$CONFIG_FILES hotplug/NetBSD/rc.d/xencommons" ;; - "hotplug/NetBSD/rc.d/xendriverdomain") CONFIG_FILES="$CONFIG_FILES hotplug/NetBSD/rc.d/xendriverdomain" ;; - "ocaml/libs/xs/paths.ml") CONFIG_FILES="$CONFIG_FILES ocaml/libs/xs/paths.ml" ;; - "ocaml/xenstored/paths.ml") CONFIG_FILES="$CONFIG_FILES ocaml/xenstored/paths.ml" ;; - "ocaml/xenstored/oxenstored.conf") CONFIG_FILES="$CONFIG_FILES ocaml/xenstored/oxenstored.conf" ;; + "../config/Tools-paths.mk") CONFIG_FILES="$CONFIG_FILES ../config/Tools-paths.mk" ;; "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "hotplug/Linux/systemd/proc-xen.mount") CONFIG_FILES="$CONFIG_FILES hotplug/Linux/systemd/proc-xen.mount" ;; "hotplug/Linux/systemd/xen-init-dom0.service") CONFIG_FILES="$CONFIG_FILES hotplug/Linux/systemd/xen-init-dom0.service" ;;
tools/configure.ac +1 -18
@@ -7,24 +7,7 @@ AC_INIT([Xen Hypervisor Tools], m4_esyscmd([../version.sh ../xen/Makefile]), AC_CONFIG_SRCDIR([libs/light/libxl.c]) AC_CONFIG_FILES([ ../config/Tools.mk -hotplug/common/hotplugpath.sh -hotplug/FreeBSD/rc.d/xencommons -hotplug/FreeBSD/rc.d/xendriverdomain -hotplug/Linux/init.d/sysconfig.xencommons -hotplug/Linux/init.d/sysconfig.xendomains -hotplug/Linux/init.d/xen-watchdog -hotplug/Linux/init.d/xencommons -hotplug/Linux/init.d/xendomains -hotplug/Linux/init.d/xendriverdomain -hotplug/Linux/launch-xenstore -hotplug/Linux/vif-setup -hotplug/Linux/xen-hotplug-common.sh -hotplug/Linux/xendomains -hotplug/NetBSD/rc.d/xencommons -hotplug/NetBSD/rc.d/xendriverdomain -ocaml/libs/xs/paths.ml -ocaml/xenstored/paths.ml -ocaml/xenstored/oxenstored.conf +../config/Tools-paths.mk ]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_AUX_DIR([../])
tools/hotplug/FreeBSD/Makefile +7 -1
@@ -8,6 +8,11 @@ XEN_SCRIPT_DATA := XEN_RCD_PROG := rc.d/xencommons rc.d/xendriverdomain +GEN_FILES := rc.d/xencommons rc.d/xendriverdomain + +rc.d/%:: rc.d/%.src + $(apply-build-vars) + .PHONY: all all:
@@ -35,7 +40,7 @@ uninstall-scripts: rm -f $(addprefix $(DESTDIR)$(XEN_SCRIPT_DIR)/, $(XEN_SCRIPT_DATA)) .PHONY: install-rcd -install-rcd: +install-rcd: $(GEN_FILES) $(INSTALL_DIR) $(DESTDIR)$(INITD_DIR) set -e; for i in $(XEN_RCD_PROG); \ do \
@@ -51,3 +56,4 @@ clean: .PHONY: distclean distclean: clean + rm -rf $(GEN_FILES)
tools/hotplug/FreeBSD/rc.d/xencommons.src renamed from tools/hotplug/FreeBSD/rc.d/xencommons.in +0 -0
tools/hotplug/FreeBSD/rc.d/xendriverdomain.src renamed from tools/hotplug/FreeBSD/rc.d/xendriverdomain.in +0 -0
tools/hotplug/Linux/Makefile +10 -1
@@ -26,6 +26,14 @@ XEN_SCRIPT_DATA := xen-script-common.sh locking.sh logging.sh XEN_SCRIPT_DATA += xen-hotplug-common.sh xen-network-common.sh vif-common.sh XEN_SCRIPT_DATA += block-common.sh +GEN_FILES := launch-xenstore vif-setup xendomains xen-hotplug-common.sh +GEN_FILES += init.d/sysconfig.xendomains init.d/xen-watchdog +GEN_FILES += init.d/xencommons init.d/xendomains +GEN_FILES += init.d/xendriverdomain init.d/sysconfig.xencommons + +init.d/%:: init.d/%.src + $(apply-build-vars) + .PHONY: all all: subdirs-all
@@ -37,7 +45,7 @@ uninstall: uninstall-initd uninstall-scripts subdirs-uninstall # See docs/misc/distro_mapping.txt for INITD_DIR location .PHONY: install-initd -install-initd: +install-initd: $(GEN_FILES) $(INSTALL_DIR) $(DESTDIR)$(INITD_DIR) $(INSTALL_DIR) $(DESTDIR)$(SYSCONFIG_DIR) $(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN)
@@ -81,3 +89,4 @@ clean: subdirs-clean .PHONY: distclean distclean: clean + rm -rf $(GEN_FILES)
tools/hotplug/Linux/init.d/sysconfig.xencommons.src renamed from tools/hotplug/Linux/init.d/sysconfig.xencommons.in +0 -0
tools/hotplug/Linux/init.d/sysconfig.xendomains.src renamed from tools/hotplug/Linux/init.d/sysconfig.xendomains.in +0 -0
tools/hotplug/Linux/init.d/xen-watchdog.src renamed from tools/hotplug/Linux/init.d/xen-watchdog.in +0 -0
tools/hotplug/Linux/init.d/xencommons.src renamed from tools/hotplug/Linux/init.d/xencommons.in +0 -0
tools/hotplug/Linux/init.d/xendomains.src renamed from tools/hotplug/Linux/init.d/xendomains.in +0 -0
tools/hotplug/Linux/init.d/xendriverdomain.src renamed from tools/hotplug/Linux/init.d/xendriverdomain.in +0 -0
tools/hotplug/Linux/launch-xenstore.src renamed from tools/hotplug/Linux/launch-xenstore.in +0 -0
tools/hotplug/Linux/vif-setup.src renamed from tools/hotplug/Linux/vif-setup.in +0 -0
tools/hotplug/Linux/xen-hotplug-common.sh.src renamed from tools/hotplug/Linux/xen-hotplug-common.sh.in +0 -0
tools/hotplug/Linux/xendomains.src renamed from tools/hotplug/Linux/xendomains.in +0 -0
tools/hotplug/NetBSD/Makefile +7 -1
@@ -12,6 +12,11 @@ XEN_SCRIPTS += qemu-ifup XEN_SCRIPT_DATA := XEN_RCD_PROG := rc.d/xencommons rc.d/xendomains rc.d/xen-watchdog rc.d/xendriverdomain +GEN_FILES := rc.d/xencommons rc.d/xendriverdomain + +rc.d/%:: rc.d/%.src + $(apply-build-vars) + .PHONY: all all:
@@ -39,7 +44,7 @@ uninstall-scripts: rm -f $(addprefix $(DESTDIR)$(XEN_SCRIPT_DIR)/, $(XEN_SCRIPT_DATA)) .PHONY: install-rcd -install-rcd: +install-rcd: $(GEN_FILES) $(INSTALL_DIR) $(DESTDIR)$(INITD_DIR) set -e; for i in $(XEN_RCD_PROG); \ do \
@@ -57,3 +62,4 @@ clean: .PHONY: distclean distclean: clean + rm -rf $(GEN_FILES)
tools/hotplug/NetBSD/rc.d/xencommons.src renamed from tools/hotplug/NetBSD/rc.d/xencommons.in +0 -0
tools/hotplug/NetBSD/rc.d/xendriverdomain.src renamed from tools/hotplug/NetBSD/rc.d/xendriverdomain.in +0 -0
tools/hotplug/common/Makefile +4 -1
@@ -7,6 +7,8 @@ include $(XEN_ROOT)/tools/Rules.mk XEN_SCRIPTS := XEN_SCRIPT_DATA := hotplugpath.sh +GEN_FILES := hotplugpath.sh + .PHONY: all all:
@@ -17,7 +19,7 @@ install: install-scripts uninstall: uninstall-scripts .PHONY: install-scripts -install-scripts: all +install-scripts: all $(GEN_FILES) $(INSTALL_DIR) $(DESTDIR)$(XEN_SCRIPT_DIR) set -e; for i in $(XEN_SCRIPTS); \ do \
@@ -38,3 +40,4 @@ clean: .PHONY: distclean distclean: clean + rm -rf $(GEN_FILES)
tools/hotplug/common/hotplugpath.sh.src renamed from tools/hotplug/common/hotplugpath.sh.in +0 -0
tools/ocaml/libs/xs/Makefile +7 -0
@@ -8,6 +8,8 @@ OCAMLOPTFLAGS += -for-pack Xenstore .NOTPARALLEL: # Ocaml is such a PITA! +GEN_FILES := paths.ml + PREINTF = xsraw.cmi xst.cmi PREOBJS = queueop xsraw xst PRELIBS = $(foreach obj, $(PREOBJS),$(obj).cmo) $(foreach obj,$(PREOJBS),$(obj).cmx)
@@ -17,6 +19,8 @@ LIBS = xenstore.cma xenstore.cmxa all: $(PREINTF) $(PRELIBS) $(INTF) $(LIBS) $(PROGRAMS) +$(OBJS): $(GEN_FILES) + bins: $(PROGRAMS) libs: $(LIBS)
@@ -43,4 +47,7 @@ install: $(LIBS) META uninstall: $(OCAMLFIND) remove -destdir $(OCAMLDESTDIR) xenstore +.PHONY: distclean + rm -rf $(GEN_FILES) + include $(OCAML_TOPLEVEL)/Makefile.rules
tools/ocaml/libs/xs/paths.ml.src renamed from tools/ocaml/libs/xs/paths.ml.in +0 -0
tools/ocaml/xenstored/Makefile +6 -1
@@ -72,6 +72,8 @@ XENSTOREDLIBS = \ -ccopt -L -ccopt $(OCAML_TOPLEVEL)/libs/xsd_glue $(OCAML_TOPLEVEL)/libs/xsd_glue/plugin_interface_v1.cmxa \ -ccopt -L -ccopt $(XEN_ROOT)/tools/libs/ctrl +GEN_FILES := paths.ml oxenstored.conf + PROGRAMS = oxenstored oxenstored_LIBS = $(XENSTOREDLIBS)
@@ -83,7 +85,7 @@ oxenstored_OBJS = $(oxenstored_MLSORTED:.ml=) OCAML_PROGRAM = oxenstored -all: $(INTF) $(LIBS) $(PROGRAMS) +all: $(GEN_FILES) $(INTF) $(LIBS) $(PROGRAMS) bins: $(PROGRAMS)
@@ -99,4 +101,7 @@ uninstall: rm -f $(DESTDIR)$(XEN_CONFIG_DIR)/oxenstored.conf rm -f $(DESTDIR)$(sbindir)/oxenstored +distclean: + rm -rf $(GEN_FILES) + include $(OCAML_TOPLEVEL)/Makefile.rules
tools/ocaml/xenstored/oxenstored.conf.src renamed from tools/ocaml/xenstored/oxenstored.conf.in +0 -0
tools/ocaml/xenstored/paths.ml.src renamed from tools/ocaml/xenstored/paths.ml.in +0 -0
Signature · 1 line
2.51.0