Rombobjörn

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjörn Persson <bjorn@rombobjörn.se>2013-10-10 15:21:47 +0200
committerBjörn Persson <bjorn@rombobjörn.se>2013-10-10 15:21:47 +0200
commitad44350ecf956894238841b387125ab9824e3850 (patch)
treecfc72da024fb7317b4f6728001b2b6fcee57295c
parent0a7d36c71e387b5c2fa95fb14685ea274e6d5aca (diff)
Made Bindir relative to Libexecdir.
When directory variables in project files are relative pathnames, then Comfignat.Bindir is now relative to Comfignat.Libexecdir, while the other pathnames are relative to Comfignat.Bindir. This should help programs in Libexecdir figure out the pathnames of files they need. The manual now also notes that runstatedir and lockdir are always absolute.
-rw-r--r--comfignat.gpr.gp7
-rw-r--r--comfignat.mk4
-rwxr-xr-xmanual.en.html4
3 files changed, 9 insertions, 6 deletions
diff --git a/comfignat.gpr.gp b/comfignat.gpr.gp
index 4c9d8eb..ac2e7d4 100644
--- a/comfignat.gpr.gp
+++ b/comfignat.gpr.gp
@@ -78,12 +78,13 @@ abstract project Comfignat is
-- tell them where to find or write different kinds of files at run time.
-- Most of the directory names are relative to Bindir if the software was
-- configured as a relocatable package. Otherwise they are absolute
- -- pathnames.
+ -- pathnames. Bindir is relative to Libexecdir when the package is
+ -- relocatable.
--
-- Programs that can be run from a command prompt are in Bindir. This is
- -- normally the same directory that the program itself is in, so this
- -- variable is probably of little use at run time.
+ -- usually the same directory that the program itself is in, so this
+ -- variable is probably useful only to programs in Libexecdir.
#if Bindir'Defined then
Bindir := $Bindir;
#else
diff --git a/comfignat.mk b/comfignat.mk
index cc11575..09ec0eb 100644
--- a/comfignat.mk
+++ b/comfignat.mk
@@ -373,7 +373,7 @@ maybe_relative_to = \
# maybe_relative_to converts an absolute pathname into a relative one if a
# relocatable package is desired.
# Parameters:
-# 1: an absolute pathname to convert to relative
+# 1: an absolute pathname to maybe convert to relative
# 2: the absolute base pathname that 1 may be made relative to
# First check that the value of relocatable_package is a single word and that
# that word is either "true" or "false". Complain and stop if that isn't so.
@@ -420,7 +420,7 @@ ifeq (${dirgpr},)
# directory variables to comfignat.gpr, and convey the usage-relevant ones
# to usage projects in the form that usage projects need.
- all_directories += '-DBindir="${call embed_pathname,${bindir}}"'
+ all_directories += '-DBindir="${call maybe_relative_to,${bindir},${libexecdir}}"'
all_directories += '-DLibexecdir="${call embed_pathname,${libexecdir}}"'
all_directories += '-DIncludedir="${call embed_pathname,${includedir}}"'
all_directories += '-DArchincludedir="${call embed_pathname,${archincludedir}}"'
diff --git a/manual.en.html b/manual.en.html
index d0aff66..14184bd 100755
--- a/manual.en.html
+++ b/manual.en.html
@@ -243,7 +243,9 @@ usage project files that are preprocessed with Gnatprep. If the Make variable
<var>relocatable_package</var> is set to "<samp>true</samp>" on the command
line, then the variables for embedding will be relative to <var>bindir</var> in
build project files, and relative to <var>gprdir</var> in usage project
-files.</p>
+files, except that <var>bindir</var> will instead be relative to
+<var>libexecdir</var>, and <var>runstatedir</var> and <var>lockdir</var> are
+always absolute.</p>
<ul>
<li><p>Programs that can be run from a command prompt shall be placed in