summaryrefslogtreecommitdiff
path: root/make
diff options
context:
space:
mode:
authorAlex Xu (Hello71) <alex_y_xu@yahoo.ca>2020-12-19 17:05:25 -0500
committerAlex Xu (Hello71) <alex_y_xu@yahoo.ca>2020-12-19 17:05:25 -0500
commit39ce2ebbe3043ec6f61a5bfa735225308d790425 (patch)
treefd613bc58f9107e4ef05ee67ad3ec1367e82e41f /make
parentba57c102748a6424c467f49242bebe6f3e566887 (diff)
downloadminitramfs-39ce2ebbe3043ec6f61a5bfa735225308d790425.tar.xz
minitramfs-39ce2ebbe3043ec6f61a5bfa735225308d790425.zip
make: filter /dev/null, optimize output
$(DEPS) idea from kbuild fixdep
Diffstat (limited to 'make')
-rwxr-xr-xmake4
1 files changed, 2 insertions, 2 deletions
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 }
'
}