Avoid kernel rebuild on directory timestamp change
Hi—
In mk/kernel.mk, a long list of wildcards is given as dependencies for libkernel:
build/libkernel.a: kernel/Cargo.lock kernel/Cargo.toml kernel/src/* kernel/src/*/* kernel/src/*/*/* kernel/src/*/*/*/* build/initfs.tag
The only problem I encountered is that, when expanded, they will include the (sub-)directories themselves; this means that, for example, opening a file with Vim (without editing it) will trigger a rebuild of the kernel. (Because Vim opens a .swp file in the file's directory, thus altering its mtime.)
This should be easily fixable by wildcarding on *.rs
instead of *
, since there seem to be no other file extensions in the tree. I can send a PR if you'd like.
Thanks for considering.