diff options
author | Klemens Nanni <contact@autoboot.org> | 2015-11-21 17:14:22 +0100 |
---|---|---|
committer | Francis Rowe <info@gluglug.org.uk> | 2015-11-21 23:44:13 +0000 |
commit | 9a4e9bb75aee17ec7d5ee288dfbe1045bfc568c0 (patch) | |
tree | 25e0ada0b0dcfa803039d04a1c7265877c487ccb | |
parent | e9e8f47951b4658d4b9e7dcf01926863d5142804 (diff) | |
download | librebootfr-9a4e9bb75aee17ec7d5ee288dfbe1045bfc568c0.tar.gz librebootfr-9a4e9bb75aee17ec7d5ee288dfbe1045bfc568c0.zip |
build/clean/*: Use make properly (-C flag)
Instead of manually cd'ing into and out of
directories, use make's -C flag.
-rwxr-xr-x | resources/scripts/helpers/build/clean/coreboot | 36 | ||||
-rwxr-xr-x | resources/scripts/helpers/build/clean/flashrom | 19 | ||||
-rwxr-xr-x | resources/scripts/helpers/build/clean/grub | 14 | ||||
-rwxr-xr-x | resources/scripts/helpers/build/clean/memtest86plus | 14 | ||||
-rwxr-xr-x | resources/scripts/helpers/build/clean/rom_images | 6 |
5 files changed, 25 insertions, 64 deletions
diff --git a/resources/scripts/helpers/build/clean/coreboot b/resources/scripts/helpers/build/clean/coreboot index 58d13bc1..135e1944 100755 --- a/resources/scripts/helpers/build/clean/coreboot +++ b/resources/scripts/helpers/build/clean/coreboot @@ -3,6 +3,7 @@ # helper script: clean the dependencies that were built in coreboot # # Copyright (C) 2014, 2015 Francis Rowe <info@gluglug.org.uk> +# Copyright (C) 2015 Klemens Nanni <contact@autoboot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -19,40 +20,21 @@ # # This script assumes that the current working directory is the root -# of libreboot_src or libreboot git [ "x${DEBUG+set}" = 'xset' ] && set -v set -u -e # clean coreboot utilities (dependencies for 'build'): -# ------------------------------------------------------- -printf "Cleaning the previous build of the utilities in coreboot\n" +printf "Cleaning the previous build of coreboot and its utilities\n" -cd "coreboot/" +# clean coreboot and crossgcc (source archives preserved) +make -C coreboot clean +make -C coreboot crossgcc-clean -# ---------------------- -# clean coreboot itself: -# ---------------------- -make clean - -# ------------------- -# clean the utilities -# ------------------- -# clean cbfstool -cd "util/cbfstool/" -make clean - -# go back to coreboot dir -cd "../../" - -# ------------------------------------- -# clean reference crossGCC for coreboot -# source archive not deleted (intended) -# ------------------------------------- -make crossgcc-clean - -# done. go back to main directory -cd "../" +# Clean its utilities as well +for util in {cbfs,ifd,nvram}tool cbmem; do + make -C coreboot/util/"${util}" clean +done printf "\n\n" diff --git a/resources/scripts/helpers/build/clean/flashrom b/resources/scripts/helpers/build/clean/flashrom index 2a16adcb..b9ccaf17 100755 --- a/resources/scripts/helpers/build/clean/flashrom +++ b/resources/scripts/helpers/build/clean/flashrom @@ -3,6 +3,7 @@ # helper script: clean the dependencies that were built in flashrom # # Copyright (C) 2014, 2015 Francis Rowe <info@gluglug.org.uk> +# Copyright (C) 2015 Klemens Nanni <contact@autoboot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -19,24 +20,16 @@ # # This script assumes that the current working directory is the root -# of libreboot_src or libreboot git +# of git or release archive [ "x${DEBUG+set}" = 'xset' ] && set -v set -u -e -# clean flashrom -# -------------------------------------------------------- - printf "Cleaning the previous build of flashrom\n" -cd "flashrom/" - -make clean -# remove patched binaries -rm -f "flashrom_lenovobios_sst" -rm -f "flashrom_lenovobios_macronix" - -# done. go back to main directory -cd "../" +# clean flashrom +make -C flashrom clean +rm -f "flashrom/flashrom_lenovobios_sst" +rm -f "flashrom/flashrom_lenovobios_macronix" printf "\n\n" diff --git a/resources/scripts/helpers/build/clean/grub b/resources/scripts/helpers/build/clean/grub index e4b4a656..6c96e851 100755 --- a/resources/scripts/helpers/build/clean/grub +++ b/resources/scripts/helpers/build/clean/grub @@ -3,6 +3,7 @@ # helper script: clean the dependencies that were built in GRUB # # Copyright (C) 2014, 2015 Francis Rowe <info@gluglug.org.uk> +# Copyright (C) 2015 Klemens Nanni <contact@autoboot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -19,20 +20,13 @@ # # This script assumes that the current working directory is the root -# of libreboot_src or libreboot git +# of git or release archive [ "x${DEBUG+set}" = 'xset' ] && set -v set -u -e -# clean grub -# -------------------------------------------------------- - -cd "grub/" - printf "Cleaning the previous build of GRUB\n" -[ -f "Makefile" ] && make distclean - -# done. go back to main directoy -cd "../" +# clean GURB +make -C grub distclean printf "\n\n" diff --git a/resources/scripts/helpers/build/clean/memtest86plus b/resources/scripts/helpers/build/clean/memtest86plus index e6a92180..6a01443f 100755 --- a/resources/scripts/helpers/build/clean/memtest86plus +++ b/resources/scripts/helpers/build/clean/memtest86plus @@ -3,6 +3,7 @@ # helper script: clean the dependencies that were built in memtest86+ # # Copyright (C) 2014, 2015 Francis Rowe <info@gluglug.org.uk> +# Copyright (C) 2015 Klemens Nanni <contact@autoboot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -19,21 +20,14 @@ # # This script assumes that the current working directory is the root -# of libreboot_src or libreboot git +# of git or release archive [ "x${DEBUG+set}" = 'xset' ] && set -v set -u -e -# clean memtest86+ -# -------------------------------------------------------- - printf "Cleaning the previous build of MemTest86+\n" -cd "memtest86plus"/ - -make clean - -# done. go back to main directory -cd "../" +# clean MemTest86+ +make -C memtest86plus clean printf "\n\n" diff --git a/resources/scripts/helpers/build/clean/rom_images b/resources/scripts/helpers/build/clean/rom_images index f0c342ab..603e35b2 100755 --- a/resources/scripts/helpers/build/clean/rom_images +++ b/resources/scripts/helpers/build/clean/rom_images @@ -3,6 +3,7 @@ # helper script: delete the ROM images # # Copyright (C) 2014, 2015 Francis Rowe <info@gluglug.org.uk> +# Copyright (C) 2015 Klemens Nanni <contact@autoboot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -19,15 +20,12 @@ # # This script assumes that the current working directory is the root -# of libreboot_src or libreboot git +# of git or release archive [ "x${DEBUG+set}" = 'xset' ] && set -v set -u -e # Delete the ROM images -# -------------------------------------------------------- - -# delete the bin/ directory rm -Rf "bin/" printf "Deleted the bin/ directory containing the ROM images.\n\n" |