Tools/BaseTools/Bin/PosixLike/*:
authorjljusten <jljusten@de2fecce-e211-0410-80a6-f3fac2684e05>
Tue, 16 Oct 2007 22:44:27 +0000 (22:44 +0000)
committerjljusten <jljusten@de2fecce-e211-0410-80a6-f3fac2684e05>
Tue, 16 Oct 2007 22:44:27 +0000 (22:44 +0000)
  Initial support for running BaseTools from binaries or source (python)
  on unix-like operating systems.

git-svn-id: https://edk2.tianocore.org/svn/edk2/trunk@4145 de2fecce-e211-0410-80a6-f3fac2684e05

edk2/Tools/BaseTools/Bin/PosixLike/BuildEnv [new symlink]
edk2/Tools/BaseTools/Bin/PosixLike/GenFw [new symlink]
edk2/Tools/BaseTools/Bin/PosixLike/RunBinToolFromBuildDir [new file with mode: 0755]
edk2/Tools/BaseTools/Bin/PosixLike/RunToolFromSource [new file with mode: 0755]
edk2/Tools/BaseTools/Bin/PosixLike/build [new symlink]

diff --git a/edk2/Tools/BaseTools/Bin/PosixLike/BuildEnv b/edk2/Tools/BaseTools/Bin/PosixLike/BuildEnv
new file mode 120000 (symlink)
index 0000000..af6c748
--- /dev/null
@@ -0,0 +1 @@
+RunToolFromSource
\ No newline at end of file
diff --git a/edk2/Tools/BaseTools/Bin/PosixLike/GenFw b/edk2/Tools/BaseTools/Bin/PosixLike/GenFw
new file mode 120000 (symlink)
index 0000000..0993e62
--- /dev/null
@@ -0,0 +1 @@
+RunBinToolFromBuildDir
\ No newline at end of file
diff --git a/edk2/Tools/BaseTools/Bin/PosixLike/RunBinToolFromBuildDir b/edk2/Tools/BaseTools/Bin/PosixLike/RunBinToolFromBuildDir
new file mode 100755 (executable)
index 0000000..c136892
--- /dev/null
@@ -0,0 +1,27 @@
+#!/usr/bin/env bash
+
+if [ ! $WORKSPACE=="" ]
+then
+  echo WORKSPACE environment variable must be set
+elif [ -e $WORKSPACE/Conf/BaseToolsCBinaries ]
+then
+  $WORKSPACE/Conf/BaseToolsCBinaries/`basename $0`
+elif [ -e $WORKSPACE/Conf/BaseToolsSource ]
+then
+  if [ ! -e $WORKSPACE/Conf/BaseToolsSource/Source/C/bin/`basename $0` ]
+  then
+    echo BaseTools C Tool binary was not found \(`basename $0`\)
+    echo You may need to run:
+    echo "  make -C $WORKSPACE/Conf/BaseToolsSource/Source/C"
+  else
+    $WORKSPACE/Conf/BaseToolsSource/Source/C/bin/`basename $0` $*
+  fi
+else
+  echo Unable to find the real \'`basename $0`\' to run
+  echo A symbolic link is needed under
+  echo "  $WORKSPACE/Conf"
+  echo This message was printed by
+  echo "  $0"
+  exit -1
+fi
+
diff --git a/edk2/Tools/BaseTools/Bin/PosixLike/RunToolFromSource b/edk2/Tools/BaseTools/Bin/PosixLike/RunToolFromSource
new file mode 100755 (executable)
index 0000000..25e5c84
--- /dev/null
@@ -0,0 +1,21 @@
+#!/usr/bin/env bash
+
+if [ ! $WORKSPACE=="" ]
+then
+  echo WORKSPACE environment variable must be set
+elif [ -e $WORKSPACE/Conf/BaseToolsFrozenPython ]
+then
+  $WORKSPACE/Conf/BaseToolsFrozenPython/`basename $0`
+elif [ -e $WORKSPACE/Conf/BaseToolsSource ]
+then
+  PYTHONPATH=$WORKSPACE/Conf/BaseToolsSource/Source/Python \
+  python $WORKSPACE/Conf/BaseToolsSource/Source/Python/`basename $0`/`basename $0`.py $*
+else
+  echo Unable to find the real \'`basename $0`\' to run
+  echo A symbolic link is needed under
+  echo "  $WORKSPACE/Conf"
+  echo This message was printed by
+  echo "  $0"
+  exit -1
+fi
+
diff --git a/edk2/Tools/BaseTools/Bin/PosixLike/build b/edk2/Tools/BaseTools/Bin/PosixLike/build
new file mode 120000 (symlink)
index 0000000..af6c748
--- /dev/null
@@ -0,0 +1 @@
+RunToolFromSource
\ No newline at end of file