aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlloyd <[email protected]>2014-02-13 19:32:27 +0000
committerlloyd <[email protected]>2014-02-13 19:32:27 +0000
commit45b536e7a41ff1f6f2e064dc55549cb8076bc81b (patch)
tree3a92de1f2d4b20f398d72ede2413acc74ae96b82
parent76bb8ade2fab7c32ee949458f6f5c88d943431eb (diff)
Add --destdir option to configure.py
-rwxr-xr-xconfigure.py6
-rw-r--r--src/build-data/makefile/header.in2
-rw-r--r--src/cmd/main.cpp2
3 files changed, 7 insertions, 3 deletions
diff --git a/configure.py b/configure.py
index 269fcbe86..c069a86c7 100755
--- a/configure.py
+++ b/configure.py
@@ -412,13 +412,15 @@ def process_command_line(args):
install_group = optparse.OptionGroup(parser, 'Installation options')
install_group.add_option('--prefix', metavar='DIR',
- help='set the base install directory')
+ help='set the install prefix')
install_group.add_option('--docdir', metavar='DIR',
help='set the documentation install directory')
install_group.add_option('--libdir', metavar='DIR',
help='set the library install directory')
install_group.add_option('--includedir', metavar='DIR',
help='set the include file install directory')
+ install_group.add_option('--destdir', metavar='DIR',
+ help='set the install directory')
parser.add_option_group(target_group)
parser.add_option_group(build_group)
@@ -1210,6 +1212,8 @@ def create_template_vars(build_config, options, modules, cc, arch, osinfo):
'includedir': options.includedir or osinfo.header_dir,
'docdir': options.docdir or osinfo.doc_dir,
+ 'destdir': options.destdir or options.prefix or osinfo.install_root,
+
'build_dir': build_config.build_dir,
'appobj_dir': build_config.appobj_dir,
diff --git a/src/build-data/makefile/header.in b/src/build-data/makefile/header.in
index 4229de29b..5f81fa0a5 100644
--- a/src/build-data/makefile/header.in
+++ b/src/build-data/makefile/header.in
@@ -21,7 +21,7 @@ VERSION = %{version}
BRANCH = %{version_major}.%{version_minor}
# Installation Settings
-DESTDIR = %{prefix}
+DESTDIR = %{destdir}
BINDIR = $(DESTDIR)/bin
LIBDIR = $(DESTDIR)/%{libdir}
HEADERDIR = $(DESTDIR)/%{includedir}/botan-$(BRANCH)/botan
diff --git a/src/cmd/main.cpp b/src/cmd/main.cpp
index f16db2027..cd42658b9 100644
--- a/src/cmd/main.cpp
+++ b/src/cmd/main.cpp
@@ -40,7 +40,7 @@ int config_main(int argc, char* argv[])
if(argc != 2)
{
std::cout << "Usage: " << argv[0] << " <what>\n"
- << " prefix: Print include params\n"
+ << " prefix: Print install prefix\n"
<< " cflags: Print include params\n"
<< " ldflags: Print linker params\n"
<< " libs: Print libraries\n";