diff options
author | Alex Xu (Hello71) <alex_y_xu@yahoo.ca> | 2020-12-19 17:05:25 -0500 |
---|---|---|
committer | Alex Xu (Hello71) <alex_y_xu@yahoo.ca> | 2020-12-19 17:05:25 -0500 |
commit | 39ce2ebbe3043ec6f61a5bfa735225308d790425 (patch) | |
tree | fd613bc58f9107e4ef05ee67ad3ec1367e82e41f /make | |
parent | ba57c102748a6424c467f49242bebe6f3e566887 (diff) | |
download | minitramfs-39ce2ebbe3043ec6f61a5bfa735225308d790425.tar.xz minitramfs-39ce2ebbe3043ec6f61a5bfa735225308d790425.zip |
make: filter /dev/null, optimize output
$(DEPS) idea from kbuild fixdep
Diffstat (limited to 'make')
-rwxr-xr-x | make | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 } ' } |