diff options
author | Jim Meyering <meyering@redhat.com> | 2011-02-20 23:02:43 +0100 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2011-02-22 14:51:31 +0100 |
commit | 86fd2114ac3940e03a02e99658c8df88aed8a235 (patch) | |
tree | 988f6343a71b4ef30052c959109289c9d6ae8a75 /Makefile | |
parent | f1eb357fab17482b2d19f12fc731673acead4922 (diff) | |
download | gnulib-86fd2114ac3940e03a02e99658c8df88aed8a235.tar.gz |
maint: adjust cpp indentation to reflect nesting depth
I.e., in a block of code that begins with an unnested "#if",
put one space between the "#" in column 1 and following token.
For example,
-#include <sys/vfs.h>
+# include <sys/vfs.h>
Do this only in .c files that are part of a module I maintain.
* lib/linkat.c: Filter through cppi.
* lib/nanosleep.c: Likewise.
* lib/openat.c: Likewise.
* lib/openat-die.c: Likewise.
* lib/dup3.c: Likewise.
* lib/fchownat.c: Likewise.
* lib/flock.c: Likewise.
* lib/fsync.c: Likewise.
* lib/fts.c: Likewise.
* lib/getpass.c: Likewise.
* lib/gettimeofday.c: Likewise.
* lib/userspec.c: Likewise.
* Makefile (sc_cpp_indent_check): New rule, to check this.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -45,6 +45,15 @@ sc_pragma_columns: exit 1; } || :; \ else :; fi +# Verify that certain (for now, only Jim Meyering's) lib/**.c files +# are consistently cpp indented. +sc_cpp_indent_check: + ./gnulib-tool --extract-filelist $$(cd modules; grep -ilr meyering .) \ + | sort -u \ + | grep 'lib/.*\.c$$' \ + | grep -v '/getloadavg\.c$$' \ + | xargs cppi -c + # Regenerate some files that are stored in the repository. regen: MODULES.html |