From 28f70a28a1102a84be2e9fde8062f692353af37f Mon Sep 17 00:00:00 2001 From: Ralph Lange Date: Fri, 24 Apr 2009 12:25:21 +0000 Subject: [PATCH] Base path can be set through environment var EPICS_MBA_BASE. --- src/makeBaseApp/makeBaseApp.pl | 6 +++++- src/makeBaseExt/makeBaseExt.pl | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/makeBaseApp/makeBaseApp.pl b/src/makeBaseApp/makeBaseApp.pl index 8337df967..80570b276 100755 --- a/src/makeBaseApp/makeBaseApp.pl +++ b/src/makeBaseApp/makeBaseApp.pl @@ -173,6 +173,8 @@ sub get_commandline_opts { #no args } elsif ($release{"EPICS_BASE"}) { # second choice is configure/RELEASE $epics_base = UnixPath($release{"EPICS_BASE"}); $epics_base =~s|^\$\(TOP\)/||; + } elsif ($ENV{EPICS_MBA_BASE}) { # third choice is env var EPICS_MBA_BASE + $epics_base = UnixPath($ENV{EPICS_MBA_BASE}); } elsif ($command =~ m|/bin/|) { # assume script was run with full path to base $epics_base = $command; $epics_base =~ s|^(.*)/bin/.*makeBaseApp.*|$1|; @@ -436,7 +438,8 @@ EOF If arch is not specified, you will be prompted -b base Set the location of EPICS base (full path) If not specified, base path is taken from configure/RELEASE - If configure does not exist, base path is taken from command + If configure does not exist, from environment + If not found in environment, from makeBaseApp.pl location -d Enable debug messages -i Specifies that ioc boot directories will be generated -l List valid application types for this installation @@ -454,6 +457,7 @@ EOF Environment: EPICS_MBA_DEF_APP_TYPE Application type you want to use as default EPICS_MBA_TEMPLATE_TOP Template top directory +EPICS_MBA_BASE Location of EPICS base Example: Create exampleApp diff --git a/src/makeBaseExt/makeBaseExt.pl b/src/makeBaseExt/makeBaseExt.pl index 58ed2a14a..0503f2d94 100755 --- a/src/makeBaseExt/makeBaseExt.pl +++ b/src/makeBaseExt/makeBaseExt.pl @@ -124,6 +124,8 @@ sub get_commandline_opts { #no args s/EPICS_BASE\s*=\s*// and $epics_base = UnixPath($_), break; } close IN; + } elsif ($ENV{EPICS_MBA_BASE}) { # third choice is env var EPICS_MBA_BASE + $epics_base = UnixPath($ENV{EPICS_MBA_BASE}); } elsif ($command =~ m|/bin/|) { # assume script was called with full path to base $epics_base = $command; $epics_base =~ s|(/.*)/bin/.*makeBaseExt.*|$1|; @@ -262,12 +264,14 @@ where If this is specified the other options are not used -b base Set the location of EPICS base (full path) If not specified, base path is taken from configure/RELEASE - If configure does not exist, base path is taken from command + If configure does not exist, from environment + If not found in environment, from makeBaseApp.pl location -d Verbose output (useful for debugging) Environment: EPICS_MBE_DEF_EXT_TYPE Ext type you want to use as default EPICS_MBE_TEMPLATE_TOP Template top directory +EPICS_MBA_BASE Location of EPICS base Example: Create example extension