Quellcode durchsuchen

Add a top level "make lint"


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1684 fd59a12c-fef9-0310-b244-a6a79926bd2f
Angus Salkeld vor 17 Jahren
Ursprung
Commit
bb57c27e56
7 geänderte Dateien mit 23 neuen und 0 gelöschten Zeilen
  1. 7 0
      Makefile
  2. 1 0
      Makefile.inc
  3. 3 0
      exec/Makefile
  4. 3 0
      lcr/Makefile
  5. 3 0
      lib/Makefile
  6. 3 0
      services/Makefile
  7. 3 0
      tools/Makefile

+ 7 - 0
Makefile

@@ -115,6 +115,13 @@ clean:
 	(cd $(builddir)test; echo ==== `pwd` ===; $(call sub_make,test,clean));
 	rm -rf $(builddir)doc/api
 
+lint:
+	(cd $(builddir)exec; echo ==== `pwd` ===; $(call sub_make,exec,lint));
+	(cd $(builddir)services; echo ==== `pwd` ===; $(call sub_make,services,lint));
+	(cd $(builddir)lcr; echo ==== `pwd` ===; $(call sub_make,lcr,lint));
+	(cd $(builddir)lib; echo ==== `pwd` ===; $(call sub_make,lib,lint));
+	(cd $(builddir)tools; echo ==== `pwd` ===; $(call sub_make,tools,lint));
+
 COROSYNC_LIBS	= evs cpg cfg coroutil confdb
 
 COROSYNC_HEADERS	= cpg.h cfg.h evs.h ipc_gen.h mar_gen.h swab.h \

+ 1 - 0
Makefile.inc

@@ -46,6 +46,7 @@ endif
 CFLAGS =
 LDFLAGS =
 DYFLAGS =
+LINT_FLAGS = -weak +posixlib +ignoresigns -fcnuse -badflag -D__gnuc_va_list=va_list -D__attribute\(x\)= 
 
 override CFLAGS += -DLCRSODIR='"$(LCRSODIR)"'
 

+ 3 - 0
exec/Makefile

@@ -137,6 +137,9 @@ liblogsys.so.2.0.0: $(LIBLOGSYS_OBJS)
 
 endif
 
+lint:
+	-splint $(LINT_FLAGS) $(CFLAGS) *.c
+
 clean:
 	rm -f corosync $(OBJS) *.o *.lcrso libtotem_pg.so* libtotem_pg.a gmon.out 
 	rm -f *.da *.bb *.bbg liblogsys.so* liblogsys.a

+ 3 - 0
lcr/Makefile

@@ -84,3 +84,6 @@ clean:
 	rm -f test libtest.so* *.o uic liblcr.so* liblcr.a *.lcrso *.da *.ba *.bb *.bbg \
 	test_static
 
+lint:
+	-splint $(LINT_FLAGS) $(CFLAGS) *.c
+

+ 3 - 0
lib/Makefile

@@ -121,6 +121,9 @@ clean:
 		libquorum.so* libquorum.a \
 		libconfdb.a libconfdb.a \ *.da *.bb *.bbg
  
+lint:
+	-splint $(LINT_FLAGS) $(CFLAGS) *.c
+
 # -fPIC rules required for all libraries
 %.o: %.c
 	$(CC) $(CFLAGS) $(CPPFLAGS) -fPIC -c -o $@ $<

+ 3 - 0
services/Makefile

@@ -96,6 +96,9 @@ endif
 clean:
 	rm -f *.o *.lcrso 
 
+lint:
+	-splint $(LINT_FLAGS) $(CFLAGS) *.c
+
 depend:
 	makedepend -Y -- $(CFLAGS) $(CPPFLAGS) $(EXEC_SRC) $(TOTEM_SRC) $(LOGSYS_SRC) $(LCR_SRC) > /dev/null 2>&1
 

+ 3 - 0
tools/Makefile

@@ -66,6 +66,9 @@ corosync-pload: corosync-pload.o
 clean:
 	rm -f *.o $(BINARIES)
 
+lint:
+	-splint $(LINT_FLAGS) $(CFLAGS) *.c
+
 %.o: %.c
 	$(CC) $(CFLAGS) $(CPPFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<