diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -1,6 +1,8 @@ MAKEFLAGS += -r CFLAGS += -Wall -Wextra -KERNVER ?= $(shell uname -r) +null := +space := $(null) $(null) +KERNVER ?= $(lastword $(subst /,$(space),$(wildcard /lib/modules/*/))) all: initramfs.img @@ -16,8 +18,8 @@ dropbear_ed25519_host_key: modules.dep.ver: FORCE if ! [ -f $@ ] || [ "$$(cat $@)" != "$(KERNVER)" ]; then echo $(KERNVER) > $@; fi -modules.dep: modules /lib/modules/$(KERNVER)/modules.dep modules.dep.ver - awk '!/^#/ { print $1 }' modules | xargs modinfo -F filename -k $(KERNVER) | sed -e 's:^/lib/modules/$(KERNVER)/:^:' | grep -f - /lib/modules/$(KERNVER)/modules.dep > $@ +modules.dep: modules modules.dep.ver /lib/modules/$(KERNVER)/modules.dep + awk '!/^#/ { print $$1 }' modules | xargs modinfo -F filename -k $(KERNVER) | sed -e 's:^/lib/modules/$(KERNVER)/:^:' | grep -f - /lib/modules/$(KERNVER)/modules.dep > $@ install: initramfs.img rm -f /boot/initramfs.img.old /boot/initramfs.img.new |