]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
feat: extend Makefile indent target
authorHarald Hoyer <harald@redhat.com>
Thu, 25 Feb 2021 09:52:53 +0000 (10:52 +0100)
committerHarald Hoyer <harald@hoyer.xyz>
Sat, 13 Mar 2021 19:10:43 +0000 (20:10 +0100)
- extend the C indent file pattern
- add shfmt, if installed

Makefile

index c7859ff4770481dbd9911cc8840cb38b6251a6b9..8b2a64ebf821208a5f28e7bf7d9c5e5ec006880b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -91,9 +91,8 @@ dracut-util: util/util
        cp -a $< $@
 
 indent:
-       indent -i8 -nut -br -linux -l120 install/dracut-install.c
-       indent -i8 -nut -br -linux -l120 skipcpio/skipcpio.c
-       indent -i8 -nut -br -linux -l120 util/util.c
+       indent -i8 -nut -br -linux -l120 $(wildcard *.[ch] */*.[ch])
+       if type -P shfmt >/dev/null; then shfmt -w -s .; fi
 
 doc: $(manpages) dracut.html