mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 13:46:49 +00:00
Merge pull request #6359 from antonlacon/makefile-helper
Have make clean/distclean respect builder's set BUILD_DIR
This commit is contained in:
commit
ab5106a617
6
Makefile
6
Makefile
@ -1,5 +1,3 @@
|
||||
BUILD_DIRS=build.*
|
||||
|
||||
all: release
|
||||
|
||||
system:
|
||||
@ -15,10 +13,10 @@ noobs:
|
||||
./scripts/image noobs
|
||||
|
||||
clean:
|
||||
rm -rf $(BUILD_DIRS)/* $(BUILD_DIRS)/.stamps
|
||||
./scripts/makefile_helper --clean
|
||||
|
||||
distclean:
|
||||
rm -rf ./.ccache ./$(BUILD_DIRS)
|
||||
./scripts/makefile_helper --distclean
|
||||
|
||||
src-pkg:
|
||||
tar cvJf sources.tar.xz sources
|
||||
|
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