2012-05-21 22:37:20 +00:00
|
|
|
# This file implements the GNOME Build API:
|
|
|
|
# http://people.gnome.org/~walters/docs/build-api.txt
|
|
|
|
|
|
|
|
FIRMWAREDIR = /lib/firmware
|
|
|
|
|
|
|
|
all:
|
|
|
|
|
2016-09-18 00:44:04 +00:00
|
|
|
check:
|
Makefile, copy-firmware: Use portable "command -v" to detect installed programs
The "which" utility is not guaranteed to be installed either, and if it
is, its behavior is not portable either. This means that when rdfind /
pre-commit are installed, the `which` check will report a fatal error
because the which tool did not exist and the shell returned a nonzero
status when attempting to fork+exec. If it did exist, it might not be an
implementation of `which` that returns nonzero when commands do not
exist.
Conversely, the "command -v" shell builtin is required to exist in all
POSIX 2008 compliant shells, and is thus guaranteed to work everywhere.
For some in-depth discussions on the topic, see:
- https://mywiki.wooledge.org/BashFAQ/081
- https://unix.stackexchange.com/questions/85249/why-not-use-which-what-to-use-then/85250#85250
Examples of open-source shells likely to be installed as /bin/sh on
Linux, which implement the 15-year-old standard: ash, bash, busybox,
dash, ksh, mksh and zsh.
A side benefit of using the POSIX portable option is that it requires
neither an external disk executable, nor (because unlike "which", the
exit code is reliable) a subshell fork. This therefore represents a mild
speedup.
Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
2023-11-26 17:01:51 +00:00
|
|
|
@if ! command -v pre-commit >/dev/null; then \
|
2023-08-15 17:52:13 +00:00
|
|
|
echo "Install pre-commit to check files"; \
|
|
|
|
exit 1; \
|
|
|
|
fi
|
|
|
|
@pre-commit run --all-files
|
2016-09-18 00:44:04 +00:00
|
|
|
|
2023-08-31 03:50:40 +00:00
|
|
|
dist:
|
|
|
|
@mkdir -p release dist
|
|
|
|
./copy-firmware.sh release
|
|
|
|
@TARGET=linux-firmware_`git describe`.tar.gz; \
|
|
|
|
cd release && tar -czf ../dist/$${TARGET} *; \
|
|
|
|
echo "Created dist/$${TARGET}"
|
|
|
|
@rm -rf release
|
|
|
|
|
2023-09-18 21:15:35 +00:00
|
|
|
deb:
|
|
|
|
./build_packages.py --deb
|
|
|
|
|
|
|
|
rpm:
|
|
|
|
./build_packages.py --rpm
|
|
|
|
|
make: separate installation and de-duplication targets
For better or worse some distributions cannot have the firmware
de-duplication happen automatically.
In addition, when it was introduced it changed the default behaviour
leaving people with no firmware in their systems.
Revert to the original behaviour: in the worst case, people will have a
few MB extra of duplicate firmware, yet their systems will continue to
work.
To make things stand out, we print a message at the end of install so
that everyone can opt-in as needed.
In addition, I've went ahead and opened tentative MR/PR with Alpine,
Arch, CentOS Stream, Debian, Gentoo, informing them of this change.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2024-10-15 17:56:03 +00:00
|
|
|
dedup:
|
2024-09-22 15:21:44 +00:00
|
|
|
./dedup-firmware.sh $(DESTDIR)$(FIRMWAREDIR)
|
2023-06-05 13:58:12 +00:00
|
|
|
|
make: separate installation and de-duplication targets
For better or worse some distributions cannot have the firmware
de-duplication happen automatically.
In addition, when it was introduced it changed the default behaviour
leaving people with no firmware in their systems.
Revert to the original behaviour: in the worst case, people will have a
few MB extra of duplicate firmware, yet their systems will continue to
work.
To make things stand out, we print a message at the end of install so
that everyone can opt-in as needed.
In addition, I've went ahead and opened tentative MR/PR with Alpine,
Arch, CentOS Stream, Debian, Gentoo, informing them of this change.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2024-10-15 17:56:03 +00:00
|
|
|
install:
|
2023-11-27 15:13:42 +00:00
|
|
|
install -d $(DESTDIR)$(FIRMWAREDIR)
|
2024-09-22 15:21:44 +00:00
|
|
|
./copy-firmware.sh $(DESTDIR)$(FIRMWAREDIR)
|
make: separate installation and de-duplication targets
For better or worse some distributions cannot have the firmware
de-duplication happen automatically.
In addition, when it was introduced it changed the default behaviour
leaving people with no firmware in their systems.
Revert to the original behaviour: in the worst case, people will have a
few MB extra of duplicate firmware, yet their systems will continue to
work.
To make things stand out, we print a message at the end of install so
that everyone can opt-in as needed.
In addition, I've went ahead and opened tentative MR/PR with Alpine,
Arch, CentOS Stream, Debian, Gentoo, informing them of this change.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2024-10-15 17:56:03 +00:00
|
|
|
@echo "Now run \"make dedup\" to de-duplicate any firmware files"
|
2023-11-27 15:13:42 +00:00
|
|
|
|
2023-06-05 13:58:12 +00:00
|
|
|
install-xz:
|
|
|
|
install -d $(DESTDIR)$(FIRMWAREDIR)
|
|
|
|
./copy-firmware.sh --xz $(DESTDIR)$(FIRMWAREDIR)
|
make: separate installation and de-duplication targets
For better or worse some distributions cannot have the firmware
de-duplication happen automatically.
In addition, when it was introduced it changed the default behaviour
leaving people with no firmware in their systems.
Revert to the original behaviour: in the worst case, people will have a
few MB extra of duplicate firmware, yet their systems will continue to
work.
To make things stand out, we print a message at the end of install so
that everyone can opt-in as needed.
In addition, I've went ahead and opened tentative MR/PR with Alpine,
Arch, CentOS Stream, Debian, Gentoo, informing them of this change.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2024-10-15 17:56:03 +00:00
|
|
|
@echo "Now run \"make dedup\" to de-duplicate any firmware files"
|
2023-06-05 13:58:12 +00:00
|
|
|
|
|
|
|
install-zst:
|
|
|
|
install -d $(DESTDIR)$(FIRMWAREDIR)
|
|
|
|
./copy-firmware.sh --zstd $(DESTDIR)$(FIRMWAREDIR)
|
make: separate installation and de-duplication targets
For better or worse some distributions cannot have the firmware
de-duplication happen automatically.
In addition, when it was introduced it changed the default behaviour
leaving people with no firmware in their systems.
Revert to the original behaviour: in the worst case, people will have a
few MB extra of duplicate firmware, yet their systems will continue to
work.
To make things stand out, we print a message at the end of install so
that everyone can opt-in as needed.
In addition, I've went ahead and opened tentative MR/PR with Alpine,
Arch, CentOS Stream, Debian, Gentoo, informing them of this change.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2024-10-15 17:56:03 +00:00
|
|
|
@echo "Now run \"make dedup\" to de-duplicate any firmware files"
|
2023-08-31 03:50:40 +00:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -rf release dist
|