From 39ce2ebbe3043ec6f61a5bfa735225308d790425 Mon Sep 17 00:00:00 2001 From: "Alex Xu (Hello71)" Date: Sat, 19 Dec 2020 17:05:25 -0500 Subject: make: filter /dev/null, optimize output $(DEPS) idea from kbuild fixdep --- make | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'make') diff --git a/make b/make index 09433f7..58d6152 100755 --- a/make +++ b/make @@ -35,8 +35,8 @@ gen_dir_ents() { gen_depfile() { awk -v f=/dev/fd/3 -v deps="cpio_list.txt make" ' { print } - $1 == "file" { deps=deps " " $3; print $3 ":" > f } - END { print "initramfs.img: " deps > f } + $1 == "file" && $3 != "/dev/null" { deps=deps " " $3 } + END { print "DEPS = " deps "\n$(DEPS):\ninitramfs.img: $(DEPS)" > f } ' } -- cgit v1.2.3-70-g09d2