edksetup.sh implements a test that requires the current working
directory to contain the edksetup.sh script. This test has the side
effect of requiring the WORKSPACE to be set to the same directory as
the edksetup.sh. In a multiple workspace configuration, it is
required to be able to have a WORKSPACE that is different from the
directory that contains edksetup.sh. This changeset skips this test
if PACKAGE_PATH is set.
Change-Id: Ie6f16a08c012baf4e650c48cc8e91cdc466d05f2
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chris Ruffin <chris.ruffin@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
Rework the argument parsing logic to a more extensible traditional
while/case setup to prepare for further additions.
While doing that, align the Usage printout to look a bit more like
the output of Edk2Setup.bat (and be more correct).
And also stop passing around command line options to the BuildEnv
script (which does not check them anyway).
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Since WORKSPACE should point at the EDK2 tree, the right place
to check its validity is edksetup.sh, not BaseTools/BuildEnv.
This patch makes sure that BuildEnv is always invoked with a valid
WORKSPACE. This lets us show better error messages, and ensures that
we never dirty the user's environment.
BuildEnv will maintain backwards-compatibility and, should the variable
be missing, it will be able to set a default WORKSPACE. Only the sanity
checks will be of lower quality.
Note that the error message in SetupEnv will never be shown if
SetWorkspace sets WORKSPACE=`pwd`.
Suggested-by: Laszlo Ersek <lersek@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15701 6f19259b-4bc3-4df7-8a09-765794883524
EDK_TOOLS_PATH is basically a replacement for $WORKSPACE/BaseTools.
It makes sense to check for BuildEnv there, then, if $WORKSPACE
is absent but $EDK_TOOLS_PATH is present.
With this patch, it is possible to separately package tools in
/usr and use them compile EDK2 (doing "rm -rf BaseTools" in the
EDK2 tree). This is desirable for OS distributions that need to
distribute the tools in a "free software" repository and OVMF in
a "non-free software" repository; bundling the same code in two
different packages causes confusion. It is also simpler for distros
because the build process for BaseTools and OVMF is completely
different.
Contributed-under: TianoCore Contribution Agreement 1.0
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15700 6f19259b-4bc3-4df7-8a09-765794883524
The typo was a check for the string "BaseTool" instead of "BaseTools".
Also fixed the issue where the script returned success even when
configuration failed.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15200 6f19259b-4bc3-4df7-8a09-765794883524
Support both BaseTools and AntTools. Do not require the user
to use BaseTools/BuildEnv for the BaseTools support.
Use this command to for help: . edksetup.sh --help
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4687 6f19259b-4bc3-4df7-8a09-765794883524
Now we look for the 'NewBuild' parameter, and if so, ask the user to
'source' the correct script. (. Tools/BuildEnv)
Otherwise we 'source' the Tools/OldBuildEnv script for the user.
Tools/OldBuildEnv:
This is the old contents of $WORKSPACE/edksetup.sh
Tools/BuildEnv:
This script is used to configure the BaseTools build environment for
unix-like operating systems.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4141 6f19259b-4bc3-4df7-8a09-765794883524
1, WORKSPACE environment in unix-like system can be obtained automatically as edksetup.bat in window's environment.
2, XMLBEANS_HOME environment in unix-like system should be also check as edksetup.bat in windows's environment.
3, In some unix-like system like darwin's system, system environment should be export to user's environment explicitly, this behavior is different in microsoft windows's platform.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@849 6f19259b-4bc3-4df7-8a09-765794883524