diff options
author | Ian Jackson <Ian.Jackson@eu.citrix.com> | 2010-09-21 12:17:04 +0100 |
---|---|---|
committer | Ian Jackson <Ian.Jackson@eu.citrix.com> | 2010-09-21 12:17:04 +0100 |
commit | 39ae85c6eef75a8f5edeeb3cb2a86da5a93a32bc (patch) | |
tree | 1b8991c320bb86b95d1b376eee8b3baa6f72e680 /docs/misc/distro_mapping.txt | |
parent | 89acd8b4d60220b35bf97d94fe55a5cba47a5048 (diff) | |
download | xen-39ae85c6eef75a8f5edeeb3cb2a86da5a93a32bc.tar.gz xen-39ae85c6eef75a8f5edeeb3cb2a86da5a93a32bc.tar.bz2 xen-39ae85c6eef75a8f5edeeb3cb2a86da5a93a32bc.zip |
tools, build system: Detect distro-variant directories at build-time
In b59f87f56b1e, the defaults for some of the directory config
variables implicitly changed. In this commit we arrange for the
defaults to be auto-detected (with the same logic as the run-time
scripts use).
This will make the build more likely to produce answers which the
builder intends. (And, in particular, it should un-break the
automated tests, which didn't set these variables explicitly and
therefore got broken by b59f87f56b1e.)
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Diffstat (limited to 'docs/misc/distro_mapping.txt')
-rw-r--r-- | docs/misc/distro_mapping.txt | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/docs/misc/distro_mapping.txt b/docs/misc/distro_mapping.txt index d91495b925..7f41b96474 100644 --- a/docs/misc/distro_mapping.txt +++ b/docs/misc/distro_mapping.txt @@ -2,26 +2,26 @@ With directory layout differences between Red Hat, Debian, Suse and other distros one needs to set the variables for the elements below -----------------+------------------+---------------+----------------+ - | RedHat (default) | Debian | Suse | + | Red Hat | Debian | Suse | -----------------+------------------+---------------+----------------+ CONFIG_LEAF_DIR | sysconfig | default | sysconfig | SUBSYS_DIR | /var/run/subsys | /var/run | /var/run | INITD_DIR | /etc/rc.d/init.d | /etc/init.d | /etc/init.d | -----------------+------------------+---------------+----------------+ -The build currently defaults to the elements used by Red Hat. -For others, these env variables must be set in the shell env -or modified in Config.mk before running make. +The existence of these directories are tested at build-time (on the +build host, via the "setvar_dir" macro in Config.mk) and for some +scripts at run-time. If the Red Hat directory exists, it is used; +otherwise the Debian one is used. -This mechanism sets the location that files are installed to, but does -not change the code itself. Scripts that refer to files affected by these -directories must check each possible location at run time. +You can override this by setting the variables in the environment or +your ".config" (which is included by .config). To add support for new distributions that don't use the above locations, one must grep for the above elements and add appropriate checks. -For example if a new distro uses /etc/bork as it's config dir, It's not -sufficient to set CONFIG_LEAF_DIR=bork, one must also add tests for the +For example if a new distro uses /etc/bork as its config dir, it's not +sufficient to set CONFIG_LEAF_DIR=bork; one must also add tests for the existance of the bork dir in every context where config files are read. |