mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 05:36:47 +00:00
scripts/makefile_helper: initial commit
The buildsystem's Makefile hardcodes the location of the BUILD_DIR used by the rest of the buildsystem. Add a script to handle what BUILD_DIR might be set to. Signed-off-by: Ian Leonard <antonlacon@gmail.com>
This commit is contained in:
parent
d546803ae4
commit
1f4ffcc981
23
scripts/makefile_helper
Executable file
23
scripts/makefile_helper
Executable file
@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
# Copyright (C) 2022-present Team LibreELEC (https://libreelec.tv)
|
||||
|
||||
set -e
|
||||
|
||||
# If config/options can't be sourced, abort. PWD isn't the expected ROOT.
|
||||
. config/options ""
|
||||
|
||||
# task handling
|
||||
case $1 in
|
||||
--clean)
|
||||
rm -rf "${BUILD_ROOT}/${BUILD_BASE}."*/* "${BUILD_ROOT}/${BUILD_BASE}."*/.stamps
|
||||
;;
|
||||
--distclean)
|
||||
rm -rf "${BUILD_ROOT}/.ccache" "${BUILD_ROOT}/${BUILD_BASE}."*
|
||||
;;
|
||||
*)
|
||||
echo "error: ${0}: unsupported option on CLI; aborting"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
Loading…
x
Reference in New Issue
Block a user