[Xorp-hackers] [PATCH 8/9] xorp: etc: templates: Sconscript: Copy necessary template files to $BUILDDIR/etc/templates
igorm at etf.rs
igorm at etf.rs
Mon Feb 6 09:00:36 PST 2012
From: Igor Maravic <igorm at etf.rs>
Copy necessary template files to $BUILDDIR/etc/templates, if env['rtld_origin'] is set to TRUE.
With this, we can run xorpsh from $BUILDDIR. Also makes running xorp_rtrmgr from $BUILDDIR
easier.
Signed-off-by: Igor Maravic <igorm at etf.rs>
---
xorp/etc/templates/SConscript | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/xorp/etc/templates/SConscript b/xorp/etc/templates/SConscript
index b3e0894..a598734 100644
--- a/xorp/etc/templates/SConscript
+++ b/xorp/etc/templates/SConscript
@@ -133,6 +133,26 @@ for tp in tp_raw:
Default(all_tp_raw)
+if env['rtld_origin']:
+ template_source_dir = os.path.join(env['xorp_sourcedir'], "etc/templates")
+
+ cmd_files = [c.__add__('.cmds') for c in cmds]
+ for obj in cmd_files:
+ #copy all necessary cmd_files in $BUILDDIR/etc/templates
+ Execute(Copy(os.path.join(env['xorp_alias_templatedir'], str(obj)),
+ os.path.join(template_source_dir, str(obj))))
+
+ tp_files = [t.__add__('.tp') for t in tps]
+ for obj in tp_files:
+ #copy all necessary tp_files in $BUILDDIR/etc/templates
+ Execute(Copy(os.path.join(env['xorp_alias_templatedir'], str(obj)),
+ os.path.join(template_source_dir, str(obj))))
+
+ tp_raw_files = [t.__add__('.tp') for t in tp_raw]
+ for obj in tp_raw_files:
+ #copy all necessary tp_files in $BUILDDIR/etc/templates
+ Execute(Copy(os.path.join(env['xorp_alias_templatedir'], str(obj)),
+ os.path.join(template_source_dir, str(obj))))
e.Alias('install', [
e.InstallData(env['xorp_templatedir'],
--
1.7.5.4
More information about the Xorp-hackers
mailing list