2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 14:25:15 +00:00

Add cppcheck target to run cppcheck on all source files.

This commit is contained in:
Todd C. Miller
2014-01-13 09:50:39 -07:00
parent bf7a513890
commit 78355e618f
11 changed files with 71 additions and 12 deletions

View File

@@ -55,6 +55,9 @@ PIE_LDFLAGS = @PIE_LDFLAGS@
SSP_CFLAGS = @SSP_CFLAGS@
SSP_LDFLAGS = @SSP_LDFLAGS@
# cppcheck options, usually set in the top-level Makefile
CPPCHECK_OPTS = -q --force --enable=warning,performance,portability --suppress=constStatement --error-exitcode=1 --inline-suppr -U__cplusplus -UQUAD_MAX -UQUAD_MIN -UUQUAD_MAX -U_POSIX_HOST_NAME_MAX -U_POSIX_PATH_MAX
# Where to install things...
prefix = @prefix@
exec_prefix = @exec_prefix@
@@ -126,6 +129,9 @@ install-plugin: install-dirs group_file.la
uninstall:
-rm -f $(DESTDIR)$(plugindir)/group_file.so
cppcheck:
cppcheck $(CPPCHECK_OPTS) -I$(incdir) -I$(top_builddir) -I$(top_srcdir) $(srcdir)/*.c
check:
clean:

View File

@@ -54,6 +54,9 @@ PIE_LDFLAGS = @PIE_LDFLAGS@
SSP_CFLAGS = @SSP_CFLAGS@
SSP_LDFLAGS = @SSP_LDFLAGS@
# cppcheck options, usually set in the top-level Makefile
CPPCHECK_OPTS = -q --force --enable=warning,performance,portability --suppress=constStatement --error-exitcode=1 --inline-suppr -U__cplusplus -UQUAD_MAX -UQUAD_MIN -UUQUAD_MAX -U_POSIX_HOST_NAME_MAX -U_POSIX_PATH_MAX
# Where to install things...
prefix = @prefix@
exec_prefix = @exec_prefix@
@@ -125,6 +128,9 @@ install-plugin: install-dirs sample_plugin.la
uninstall:
-rm -f $(DESTDIR)$(plugindir)/sample_plugin.so
cppcheck:
cppcheck $(CPPCHECK_OPTS) -I$(incdir) -I$(top_builddir) -I$(top_srcdir) $(srcdir)/*.c
check:
clean:

View File

@@ -70,6 +70,9 @@ PIE_LDFLAGS = @PIE_LDFLAGS@
SSP_CFLAGS = @SSP_CFLAGS@
SSP_LDFLAGS = @SSP_LDFLAGS@
# cppcheck options, usually set in the top-level Makefile
CPPCHECK_OPTS = -q --force --enable=warning,performance,portability --suppress=constStatement --error-exitcode=1 --inline-suppr -U__cplusplus -UQUAD_MAX -UQUAD_MIN -UUQUAD_MAX -U_POSIX_HOST_NAME_MAX -U_POSIX_PATH_MAX
# Where to install things...
prefix = @prefix@
exec_prefix = @exec_prefix@
@@ -318,6 +321,9 @@ uninstall:
-cmp $(DESTDIR)$(sudoersdir)/sudoers $(srcdir)/sudoers >/dev/null && \
rm -f $(DESTDIR)$(sudoersdir)/sudoers
cppcheck:
cppcheck $(CPPCHECK_OPTS) -I$(incdir) -I$(top_builddir) -I$(devdir) -I$(srcdir) -I$(top_srcdir) $(srcdir)/*.c $(srcdir)/auth/*.c
check: $(TEST_PROGS) visudo testsudoers
@if test X"$(cross_compiling)" != X"yes"; then \
rval=0; \

View File

@@ -55,6 +55,9 @@ PIE_LDFLAGS = @PIE_LDFLAGS@
SSP_CFLAGS = @SSP_CFLAGS@
SSP_LDFLAGS = @SSP_LDFLAGS@
# cppcheck options, usually set in the top-level Makefile
CPPCHECK_OPTS = -q --force --enable=warning,performance,portability --suppress=constStatement --error-exitcode=1 --inline-suppr -U__cplusplus -UQUAD_MAX -UQUAD_MIN -UUQUAD_MAX -U_POSIX_HOST_NAME_MAX -U_POSIX_PATH_MAX
# Where to install things...
prefix = @prefix@
exec_prefix = @exec_prefix@
@@ -126,6 +129,9 @@ install-plugin: install-dirs system_group.la
uninstall:
-rm -f $(DESTDIR)$(plugindir)/system_group.so
cppcheck:
cppcheck $(CPPCHECK_OPTS) -I$(incdir) -I$(top_builddir) -I$(top_srcdir) $(srcdir)/*.c
check:
clean: