gnuboot/Makefile.am

122 lines
4.3 KiB
Makefile
Raw Normal View History

#
# Makefile for compatibility purposes
# You can use this, but it's recommended to run build system commands directly
#
# See docs/maintain/ and docs/git/ for information about the build system
#
# Copyright (C) 2020, 2021 Leah Rowe <info@minifree.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
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# For making pipefail work.
SHELL := bash
.PHONY: all check download modules ich9m-descriptors payloads roms release \
clean crossgcc-clean \
install-dependencies-pureos-trisquel install-dependencies-arch \
install-dependencies-void
LOG = make-$(shell date '+%s').log
all: roms
download:
echo 'Makefile: running $@ target' >> $(LOG)
./download all 2>&1 | tee -a $(LOG)
@echo "[ OK ] Makefile: $@ target. See $(LOG) for the log."
modules:
echo 'Makefile: running $@ target' >> $(LOG)
./build module all 2>&1 | tee -a $(LOG)
@echo "[ OK ] Makefile: $@ target. See $(LOG) for the log."
ich9m-descriptors:
echo 'Makefile: running $@ target' >> $(LOG)
./build build descriptors | tee -a $(LOG)
@echo "[ OK ] Makefile: $@ target. See $(LOG) for the log."
payloads:
echo 'Makefile: running $@ target' >> $(LOG)
set -o pipefail ; ./build payload all | tee -a $(LOG)
@echo "[ OK ] Makefile: $@ target. See $(LOG) for the log."
roms:
echo 'Makefile: running $@ target' >> $(LOG)
set -o pipefail ; ./build boot roms all | tee -a $(LOG)
@echo "[ OK ] Makefile: $@ target. See $(LOG) for the log."
release:
echo 'Makefile: running $@ target' >> $(LOG)
set -o pipefail ; ./build release src | tee -a $(LOG)
set -o pipefail ; ./build release roms | tee -a $(LOG)
set -o pipefail ; ./build release website | tee -a $(LOG)
set -o pipefail ; ./build release gnuboot-source | tee -a $(LOG)
set -o pipefail ; ./build test roms | tee -a $(LOG)
set -o pipefail ; ./build test release | tee -a $(LOG)
@echo "[ OK ] Makefile: $@ target. See $(LOG) for the log."
clean:
./build clean cbutils
./build clean i945-thinkpads-install-utilities
./build clean ich9utils
./build clean payloads
./build clean seabios
./build clean grub
./build clean memtest86plus
./build clean rom_images
crossgcc-clean:
./build clean crossgcc
distclean:
./build distclean all
install-dependencies-pureos-trisquel:
echo 'Makefile: running $@ target' >> $(LOG)
set -o pipefail ; ./build dependencies pureos-trisquel | tee -a $(LOG)
@echo "[ OK ] Makefile: $@ target. See $(LOG) for the log."
install-dependencies-arch:
echo 'Makefile: running $@ target' >> $(LOG)
set -o pipefail ; ./build dependencies arch | tee -a $(LOG)
@echo "[ OK ] Makefile: $@ target. See $(LOG) for the log."
2021-11-20 20:51:56 +01:00
install-dependencies-void:
echo 'Makefile: running $@ target' >> $(LOG)
set -o pipefail ; ./build dependencies void | tee -a $(LOG)
@echo "[ OK ] Makefile: $@ target. See $(LOG) for the log."
check:
echo 'Makefile: running $@ target' >> $(LOG)
set -o pipefail ; ./tests/lint | tee -a $(LOG)
set -o pipefail ; ./tests/distclean | tee -a $(LOG)
set -o pipefail ; ./tests/targets 2>&1 | tee -a $(LOG)
Add checkpatch.scm script and require maintainers to run it. The goal of this script is similar to Linux's checkpatch.pl: it is meant to check patch before sending them. Right now it only tests if a signed-off-by is missing, and if the commit information (commit message, author, date, etc but not the diff) is too big as a workaround to the bug #66268[1], but over time more checks can be added. The report of the bug #66268[1] mention that what tend to trigger the issue is commits "with a large (4kB) commit message". [1]https://debbugs.gnu.org/cgi/bugreport.cgi?bug=66268 So we want to avoid such commits to avoid breaking "guix git authenticate" in the future. To do that, checkpatch.scm reports an error if the size of the patch from the beginning of the patch file until the point where the diff starts is less than 2500 Bytes. A lower threshold has been chosen as the commit object size can be bigger than the patch file without the diff, as there are at least signatures inside the commit objects. The last commit GNUtoo signed at the time of writing is the commit 83f955870a6d46a6aeb2d8fcc7279fc4b54a6806 ("website/docs/build: mark the Trisquel bug as solved and clarify the Guix one") and this is done with an RSA GPG key of 4096 bits and in this case the signature is about 855 bytes. This was calculated with 'git cat-file -p 83f95587'. As GNU Boot is looking for contributions, including contributions by less technical users, we do not require its use by people sending patches, however it is still a good idea to require its use by the GNU Boot maintainers as we want to spot the most important issues that cannot be fixed later on. Thanks to neox for the research and the calculation on the git commit signature size. Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> Acked-by: Adrien 'neox' Bourmault <neox@gnu.org>
2024-11-26 19:37:24 +01:00
set -o pipefail ; ./tests/checkpatch 2>&1 | tee -a $(LOG)
@echo "[ OK ] Makefile: $@ target. See $(LOG) for the log."
include resources/packages/i945-thinkpads-install-utilities/Makefile.am
help:
@printf "Available commands:\n"
@printf "\t# Install required dependencies on PureOS 10 (byzantium).\n"
@printf "\tsudo make install-dependencies-pureos-trisquel\n\n" \
@printf "\tmake release # %s\n" \
"Build a GNU Boot release."
@printf "\tmake clean # %s\n" \
"Remove all the files being built in GNU Boot."
@printf "\tmake crossgcc-clean # %s\n" \
"Remove the builds of the crossgcc toolchain."
@printf "\tmake i945-thinkpads-install-utilities-help # %s\n" \
"Print i945-thinkpads-install-utilities targets help."