added BaseTools/PseudoBin
authorjljusten <jljusten@7335b38e-4728-0410-8992-fb3ffe349368>
Tue, 11 Dec 2007 09:28:19 +0000 (09:28 +0000)
committerjljusten <jljusten@7335b38e-4728-0410-8992-fb3ffe349368>
Tue, 11 Dec 2007 09:28:19 +0000 (09:28 +0000)
  This directory can be used in place of the normal 'Bin' directory.
  The 'pseudo' refers to the fact that the tools here may not be
  actual binaries.  For example, the 'pseudo-bins' might be 'scripts'
  or 'batch files' that run python on the corresponding python script
  code.

  This is supported in edk2 as of:
  https://edk2.tianocore.org/svn/edk2/trunk/edk2/BaseTools/BuildEnv r4386

git-svn-id: https://buildtools.tianocore.org/svn/buildtools/trunk/BaseTools@920 7335b38e-4728-0410-8992-fb3ffe349368

14 files changed:
PseudoBin/Darwin-i386 [new symlink]
PseudoBin/PosixLike/BuildEnv [new symlink]
PseudoBin/PosixLike/GenFds [new symlink]
PseudoBin/PosixLike/GenFfs [new symlink]
PseudoBin/PosixLike/GenFv [new symlink]
PseudoBin/PosixLike/GenFw [new symlink]
PseudoBin/PosixLike/GenSec [new symlink]
PseudoBin/PosixLike/RunBinToolFromBuildDir [new file with mode: 0755]
PseudoBin/PosixLike/RunToolFromSource [new file with mode: 0755]
PseudoBin/PosixLike/Trim [new symlink]
PseudoBin/PosixLike/build [new symlink]
PseudoBin/PosixLike/fpd2dsc [new symlink]
PseudoBin/PosixLike/msa2inf [new symlink]
PseudoBin/PosixLike/spd2dec [new symlink]

diff --git a/PseudoBin/Darwin-i386 b/PseudoBin/Darwin-i386
new file mode 120000 (symlink)
index 0000000..6de8e47
--- /dev/null
@@ -0,0 +1 @@
+PosixLike
\ No newline at end of file
diff --git a/PseudoBin/PosixLike/BuildEnv b/PseudoBin/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/PseudoBin/PosixLike/GenFds b/PseudoBin/PosixLike/GenFds
new file mode 120000 (symlink)
index 0000000..af6c748
--- /dev/null
@@ -0,0 +1 @@
+RunToolFromSource
\ No newline at end of file
diff --git a/PseudoBin/PosixLike/GenFfs b/PseudoBin/PosixLike/GenFfs
new file mode 120000 (symlink)
index 0000000..0993e62
--- /dev/null
@@ -0,0 +1 @@
+RunBinToolFromBuildDir
\ No newline at end of file
diff --git a/PseudoBin/PosixLike/GenFv b/PseudoBin/PosixLike/GenFv
new file mode 120000 (symlink)
index 0000000..0993e62
--- /dev/null
@@ -0,0 +1 @@
+RunBinToolFromBuildDir
\ No newline at end of file
diff --git a/PseudoBin/PosixLike/GenFw b/PseudoBin/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/PseudoBin/PosixLike/GenSec b/PseudoBin/PosixLike/GenSec
new file mode 120000 (symlink)
index 0000000..0993e62
--- /dev/null
@@ -0,0 +1 @@
+RunBinToolFromBuildDir
\ No newline at end of file
diff --git a/PseudoBin/PosixLike/RunBinToolFromBuildDir b/PseudoBin/PosixLike/RunBinToolFromBuildDir
new file mode 100755 (executable)
index 0000000..a99cac3
--- /dev/null
@@ -0,0 +1,29 @@
+#!/usr/bin/env bash
+#python `dirname $0`/RunToolFromSource.py `basename $0` $*
+#exec `dirname $0`/../../../../C/bin/`basename $0` $*
+
+TOOL_BASENAME=`basename $0`
+
+if [ -n "$WORKSPACE" -a -e $WORKSPACE/Conf/BaseToolsCBinaries ]
+then
+  exec $WORKSPACE/Conf/BaseToolsCBinaries/$TOOL_BASENAME
+elif [ -n "$WORKSPACE" -a -e $WORKSPACE/Conf/BaseToolsSource ]
+then
+  if [ ! -e $WORKSPACE/Conf/BaseToolsSource/Source/C/bin/$TOOL_BASENAME ]
+  then
+    echo BaseTools C Tool binary was not found \($TOOL_BASENAME\)
+    echo You may need to run:
+    echo "  make -C $WORKSPACE/Conf/BaseToolsSource/Source/C"
+  else
+    exec $WORKSPACE/Conf/BaseToolsSource/Source/C/bin/$TOOL_BASENAME $*
+  fi
+elif [ -e `dirname $0`/../../Source/C/bin/$TOOL_BASENAME ]
+then
+  exec `dirname $0`/../../Source/C/bin/$TOOL_BASENAME $*
+else
+  echo Unable to find the real \'$TOOL_BASENAME\' to run
+  echo This message was printed by
+  echo "  $0"
+  exit -1
+fi
+
diff --git a/PseudoBin/PosixLike/RunToolFromSource b/PseudoBin/PosixLike/RunToolFromSource
new file mode 100755 (executable)
index 0000000..2cb8b86
--- /dev/null
@@ -0,0 +1,5 @@
+#!/usr/bin/env bash
+#python `dirname $0`/RunToolFromSource.py `basename $0` $*
+PYTHONPATH="`dirname $0`/../../Source/Python" \
+    python "`dirname $0`/../../Source/Python"/`basename $0`/`basename $0`.py $*
+
diff --git a/PseudoBin/PosixLike/Trim b/PseudoBin/PosixLike/Trim
new file mode 120000 (symlink)
index 0000000..af6c748
--- /dev/null
@@ -0,0 +1 @@
+RunToolFromSource
\ No newline at end of file
diff --git a/PseudoBin/PosixLike/build b/PseudoBin/PosixLike/build
new file mode 120000 (symlink)
index 0000000..af6c748
--- /dev/null
@@ -0,0 +1 @@
+RunToolFromSource
\ No newline at end of file
diff --git a/PseudoBin/PosixLike/fpd2dsc b/PseudoBin/PosixLike/fpd2dsc
new file mode 120000 (symlink)
index 0000000..af6c748
--- /dev/null
@@ -0,0 +1 @@
+RunToolFromSource
\ No newline at end of file
diff --git a/PseudoBin/PosixLike/msa2inf b/PseudoBin/PosixLike/msa2inf
new file mode 120000 (symlink)
index 0000000..af6c748
--- /dev/null
@@ -0,0 +1 @@
+RunToolFromSource
\ No newline at end of file
diff --git a/PseudoBin/PosixLike/spd2dec b/PseudoBin/PosixLike/spd2dec
new file mode 120000 (symlink)
index 0000000..af6c748
--- /dev/null
@@ -0,0 +1 @@
+RunToolFromSource
\ No newline at end of file