Skip to content

Commit d8a454a

Browse files
haraldhdanimo
authored andcommitted
fix: honor KVERSION environment in the Makefile
1 parent b12f818 commit d8a454a

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

Makefile

+15-13
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ endif
1111

1212
-include Makefile.inc
1313

14+
KVERSION ?= $(shell uname -r)
15+
1416
prefix ?= /usr
1517
libdir ?= ${prefix}/lib
1618
datadir ?= ${prefix}/share
@@ -256,30 +258,30 @@ check: all syncheck rpm
256258
@$(MAKE) -C test check
257259

258260
testimage: all
259-
./dracut.sh -N -l -a debug -f test-$(shell uname -r).img $(shell uname -r)
260-
@echo wrote test-$(shell uname -r).img
261+
./dracut.sh -N -l -a debug -f test-$(KVERSION).img $(KVERSION)
262+
@echo wrote test-$(KVERSION).img
261263

262264
debugtestimage: all
263-
./dracut.sh --debug -l -a debug -f test-$(shell uname -r).img $(shell uname -r)
264-
@echo wrote test-$(shell uname -r).img
265+
./dracut.sh --debug -l -a debug -f test-$(KVERSION).img $(KVERSION)
266+
@echo wrote test-$(KVERSION).img
265267

266268
testimages: all
267-
./dracut.sh -l -a debug --kernel-only -f test-kernel-$(shell uname -r).img $(shell uname -r)
268-
@echo wrote test-$(shell uname -r).img
269-
./dracut.sh -l -a debug --no-kernel -f test-dracut.img $(shell uname -r)
269+
./dracut.sh -l -a debug --kernel-only -f test-kernel-$(KVERSION).img $(KVERSION)
270+
@echo wrote test-$(KVERSION).img
271+
./dracut.sh -l -a debug --no-kernel -f test-dracut.img $(KVERSION)
270272
@echo wrote test-dracut.img
271273

272274
debughostimage: all
273-
./dracut.sh --debug -H -l -f test-$(shell uname -r).img $(shell uname -r)
274-
@echo wrote test-$(shell uname -r).img
275+
./dracut.sh --debug -H -l -f test-$(KVERSION).img $(KVERSION)
276+
@echo wrote test-$(KVERSION).img
275277

276278
hostimage: all
277-
./dracut.sh -H -l -f test-$(shell uname -r).img $(shell uname -r)
278-
@echo wrote test-$(shell uname -r).img
279+
./dracut.sh -H -l -f test-$(KVERSION).img $(KVERSION)
280+
@echo wrote test-$(KVERSION).img
279281

280282
efi: all
281-
./dracut.sh --uefi -H -l -f linux-$(shell uname -r).efi $(shell uname -r)
282-
@echo wrote linux-$(shell uname -r).efi
283+
./dracut.sh --uefi -H -l -f linux-$(KVERSION).efi $(KVERSION)
284+
@echo wrote linux-$(KVERSION).efi
283285

284286
AUTHORS:
285287
git shortlog --numbered --summary -e |while read a rest || [ -n "$$rest" ]; do echo $$rest;done > AUTHORS

0 commit comments

Comments
 (0)