[libvirt] [PATCH 2/2] build: enforce preprocessor indentation

Eric Blake eblake at redhat.com
Tue Mar 9 17:02:57 UTC 2010


* cfg.mk (sc_preprocessor_indentation): New syntax-check rule.
---

This has no mercy if cppi is not installed.  Should I rework
it to give a nicer warning in that case, especially since
cppi is not in FC12?

 cfg.mk |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/cfg.mk b/cfg.mk
index 680c312..fd1a14f 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -251,6 +251,13 @@ sc_prohibit_trailing_blank_lines:
 	rm -f $@-t;							\
 	test $$found = 0

+# Enforce recommended preprocessor indentation style.
+sc_preprocessor_indentation:
+	@$(VC_LIST_EXCEPT) | grep '\.[ch]$$'				\
+	  | xargs cppi -a -c						\
+	  || { echo '$(ME): incorrect preprocessor indentation' 1>&2;	\
+		exit 1; }
+
 # We don't use this feature of maint.mk.
 prev_version_file = /dev/null

-- 
1.6.6.1




More information about the libvir-list mailing list