summaryrefslogtreecommitdiff
path: root/script/update/project/build
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2023-10-06 22:59:36 +0100
committerLeah Rowe <leah@libreboot.org>2023-10-07 00:11:21 +0100
commit4e39d5a5a808b0d59c6fb3426e1d9bc0195d6b08 (patch)
tree26ccd90ebffb18c70132e6192f27bac1c4c3522c /script/update/project/build
parent965b6a7ed73f1dbd78a353c83b99a88b50c86f38 (diff)
put all src downloads under src/
build/release/src was partly re-written to accomodate this memtest86plus was patched to have a central Makefile, and lbmk modified to use that, rather than mess with build32 and build64. the central Makefile just builds both targets or cleans both targets Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'script/update/project/build')
-rwxr-xr-xscript/update/project/build21
1 files changed, 10 insertions, 11 deletions
diff --git a/script/update/project/build b/script/update/project/build
index 2c6eff97..69c11105 100755
--- a/script/update/project/build
+++ b/script/update/project/build
@@ -33,7 +33,7 @@ main()
-x) mode="crossgcc-clean" ;;
*) err "Invalid option" ;;
esac
- shift; project="${OPTARG}"; shift
+ shift; project="${OPTARG#src/}"; shift
done
[ -z ${_f} ] && err "flag not specified (-m, -u, -b, -c or -x)"
[ -z ${project} ] && err "project name not specified"
@@ -48,15 +48,13 @@ main()
build_projects()
{
[ $# -gt 0 ] && x_ ./update project build ${_f} ${@}
- codedir="${project}"
+ codedir="src/${project}"
- [ -d "${codedir}" ] || x_ ./update project repo "${codedir%/*}"
- [ -d "${codedir}" ] || \
- err "build_targets: ${codedir%/*} not downloaded"
+ [ -d "${codedir}" ] || x_ ./update project repo "${project}"
if [ "${project}" = "uefitool" ]; then
(
- x_ cd uefitool
+ x_ cd src/uefitool
cmake UEFIExtract/ || [ -f Makefile ] || \
err "build_targets: !cmake UEFIExtract/"
)
@@ -138,7 +136,7 @@ handle_src_tree()
[ -z ${arch} ] && \
err "handle_src_tree: ${target_dir}: undefined cpu type"
- codedir="${project}/${tree}"
+ codedir="src/${project}/${tree}"
if [ ! -d "${codedir}" ]; then
if [ "${mode}" = "distclean" ] || \
[ "${mode}" = "crossgcc-clean" ]; then
@@ -171,13 +169,14 @@ check_cross_compiler()
[ "${crossgcc_ada}" != "y" ] && \
export BUILD_LANGUAGES=c
- cbdir="coreboot/${tree}"
+ cbdir="src/coreboot/${tree}"
[ "${project}" != "coreboot" ] && \
- cbdir="coreboot/default" # not u-boot (e.g. linux will use it)
+ cbdir="src/coreboot/default" # not u-boot (e.g. linux)
[ "${project}" = "u-boot" ] && \
- cbdir="coreboot/cros" # u-boot only used on coreboot/cros
+ cbdir="src/coreboot/cros" # u-boot only used on coreboot/cros
+
# only true if not building coreboot:
- ctarget="${cbdir#coreboot/}"
+ ctarget="${cbdir#src/coreboot/}"
[ -d "${cbdir}" ] || \
x_ ./update project trees coreboot ${ctarget}