diff options
author | Ariel Constenla-Haile <arielch@apache.org> | 2012-12-06 12:31:44 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-06-26 09:11:40 +0100 |
commit | 2250429dda5539466e2c3d1e33e555c4d66131e6 (patch) | |
tree | 55712f35f2e51433b25b4bb3f52267e785076190 /odk/config/configure.pl | |
parent | 7a123cae332c99b047b3d6392b5df803d1aa2c79 (diff) |
Related: #i121442# Add sed and cat as dependencies to odk
(cherry picked from commit 0a78e6e85d8e921705b7ea90038f822d47fb58ab)
Conflicts:
odk/cfgWin.js
odk/configure.pl
odk/docs/install.html
odk/setsdkenv_unix.sh.in
odk/setsdkenv_windows.template
odk/settings/std.mk
Change-Id: Ie124ffbb857e796923981e13dc3116c7af341056
Diffstat (limited to 'odk/config/configure.pl')
-rwxr-xr-x[-rw-r--r--] | odk/config/configure.pl | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/odk/config/configure.pl b/odk/config/configure.pl index 9a460c89066b..04bfb4bfb076 100644..100755 --- a/odk/config/configure.pl +++ b/odk/config/configure.pl @@ -64,6 +64,16 @@ $main::OO_SDK_ZIP_HOME = ""; $main::OO_SDK_ZIP_HOME_SUGGESTION = searchprog("zip"); $main::zipVersion = "2.3"; +$main::OO_SDK_CAT_HOME = ""; +$main::OO_SDK_CAT_HOME_SUGGESTION = searchprog("cat"); +# TODO cat version +# $main::catVersion = ""; + +$main::OO_SDK_SED_HOME = ""; +$main::OO_SDK_SED_HOME_SUGGESTION = searchprog("sed"); +# TODO sed version +# $main::sedVersion = ""; + $main::OO_SDK_CPP_HOME = ""; $main::cppName = "gcc"; $main::cppVersion = "4.0.1"; @@ -305,6 +315,54 @@ while ( (!$main::correctVersion) && } } +# prepare cat path +$main::correctVersion = 0; +while ( (!$main::correctVersion) && + ((! -d "$main::OO_SDK_CAT_HOME" ) || + ((-d "$main::OO_SDK_CAT_HOME") && (! -e "$main::OO_SDK_CAT_HOME/cat"))) ) +{ + print " Enter cat tool directory [$main::OO_SDK_CAT_HOME_SUGGESTION]: "; + $main::OO_SDK_CAT_HOME = readStdIn(); + chop($main::OO_SDK_CAT_HOME); + if ( $main::OO_SDK_CAT_HOME eq "" ) + { + $main::OO_SDK_CAT_HOME = $main::OO_SDK_CAT_HOME_SUGGESTION; + } + if ( (! -d "$main::OO_SDK_CAT_HOME") || + ((-d "$main::OO_SDK_CAT_HOME") && (! -e "$main::OO_SDK_CAT_HOME/cat")) ) + { + $main::OO_SDK_CAT_HOME = ""; + print " Error: cat tool is required, please specify a cat tool directory.\n"; + } + # else ... + # TODO check version + # NOTE: only Linux cat understands --version +} + +# prepare sed path +$main::correctVersion = 0; +while ( (!$main::correctVersion) && + ((! -d "$main::OO_SDK_SED_HOME" ) || + ((-d "$main::OO_SDK_SED_HOME") && (! -e "$main::OO_SDK_SED_HOME/sed"))) ) +{ + print " Enter sed tool directory [$main::OO_SDK_SED_HOME_SUGGESTION]: "; + $main::OO_SDK_SED_HOME = readStdIn(); + chop($main::OO_SDK_SED_HOME); + if ( $main::OO_SDK_SED_HOME eq "" ) + { + $main::OO_SDK_SED_HOME = $main::OO_SDK_SED_HOME_SUGGESTION; + } + if ( (! -d "$main::OO_SDK_SED_HOME") || + ((-d "$main::OO_SDK_SED_HOME") && (! -e "$main::OO_SDK_SED_HOME/sed")) ) + { + $main::OO_SDK_SED_HOME = ""; + print " Error: sed tool is required, please specify a sed tool directory.\n"; + } + # else ... + # TODO check version + # NOTE: only Linux sed understands --version +} + # prepare C++ compiler path $main::correctVersion = 0; while ( (!$main::correctVersion) && @@ -789,6 +847,8 @@ sub prepareScriptFile() $_ =~ s#\@OO_SDK_URE_HOME\@#$main::OO_SDK_URE_HOME#go; $_ =~ s#\@OO_SDK_MAKE_HOME\@#$main::OO_SDK_MAKE_HOME#go; $_ =~ s#\@OO_SDK_ZIP_HOME\@#$main::OO_SDK_ZIP_HOME#go; + $_ =~ s#\@OO_SDK_CAT_HOME\@#$main::OO_SDK_CAT_HOME#go; + $_ =~ s#\@OO_SDK_SED_HOME\@#$main::OO_SDK_SED_HOME#go; $_ =~ s#\@OO_SDK_CPP_HOME\@#$main::OO_SDK_CPP_HOME#go; $_ =~ s#\@OO_SDK_CC_55_OR_HIGHER\@#$main::OO_SDK_CC_55_OR_HIGHER#go; $_ =~ s#\@OO_SDK_JAVA_HOME\@#$main::OO_SDK_JAVA_HOME#go; |