Skip to content

Commit

Permalink
Removed -Wno-portability, added -Wall and -Werror, fixed errors that …
Browse files Browse the repository at this point in the history
…occured and included header files as dependencies to make them included in release when doing "make dist"
  • Loading branch information
bostjan committed Oct 14, 2014
1 parent f197e18 commit 632e869
Show file tree
Hide file tree
Showing 10 changed files with 371 additions and 55 deletions.
1 change: 1 addition & 0 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ EXTRA_LTLIBRARIES =
#CLEANFILES += $(EXTRA_LTLIBRARIES) $(EXTRA_PROGRAMS) $(check_PROGRAMS)
#DISTCLEANFILES += $(BUILT_SOURCES)
MAINTAINERCLEANFILES = Makefile.in
AM_CFLAGS = -Wall -Werror
AUTOMAKE_OPTIONS = foreign subdir-objects
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = src bin
Expand Down
2 changes: 2 additions & 0 deletions build/Makefile.am.common
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ CLEANFILES += *.o
#CLEANFILES += $(EXTRA_LTLIBRARIES) $(EXTRA_PROGRAMS) $(check_PROGRAMS)
#DISTCLEANFILES += $(BUILT_SOURCES)
MAINTAINERCLEANFILES += Makefile.in

AM_CFLAGS = -Wall -Werror
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ AC_CONFIG_HEADERS([config.h])

# We are using automake and libtool
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([1.11 gnu silent-rules subdir-objects -Wall -Wno-portability])
AM_INIT_AUTOMAKE([1.11 gnu silent-rules subdir-objects -Wall -Werror])
LT_INIT([disable-static])
#LT_INIT

Expand Down
12 changes: 11 additions & 1 deletion src/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
### Include common Makefile configuration
#
include $(top_srcdir)/build/Makefile.am.common



### First process all required subdirs
#
SUBDIRS = input
Expand All @@ -11,8 +17,12 @@ noinst_LTLIBRARIES = \

libsnoopy_no_execve_la_SOURCES = \
inputdatastorage.c \
inputdatastorage.h \
inputregistry.c \
log.c
inputregistry.h \
log.c \
log.h \
snoopy.h

libsnoopy_no_execve_la_LIBADD = \
input/libsnoopy_inputs_all.la
Expand Down
183 changes: 159 additions & 24 deletions src/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,12 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(top_srcdir)/build/Makefile.am.common
EXTRA_PROGRAMS =
TESTS =
check_PROGRAMS =
subdir = src
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
Expand Down Expand Up @@ -151,6 +155,8 @@ AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
distdir
ETAGS = etags
CTAGS = ctags
am__tty_colors = \
red=; grn=; lgn=; blu=; std=
DIST_SUBDIRS = $(SUBDIRS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
am__relativize = \
Expand Down Expand Up @@ -293,6 +299,18 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
BUILT_SOURCES =
CLEANFILES = *.o
DISTCLEANFILES =
EXTRA_DIST =
EXTRA_LTLIBRARIES =
#CLEANFILES += $(EXTRA_LTLIBRARIES) $(EXTRA_PROGRAMS) $(check_PROGRAMS)
#DISTCLEANFILES += $(BUILT_SOURCES)
MAINTAINERCLEANFILES = Makefile.in
AM_CFLAGS = -Wall -Werror

### Include common Makefile configuration
#

### First process all required subdirs
#
Expand All @@ -305,8 +323,12 @@ noinst_LTLIBRARIES = \

libsnoopy_no_execve_la_SOURCES = \
inputdatastorage.c \
inputdatastorage.h \
inputregistry.c \
log.c
inputregistry.h \
log.c \
log.h \
snoopy.h

libsnoopy_no_execve_la_LIBADD = \
input/libsnoopy_inputs_all.la
Expand All @@ -323,11 +345,12 @@ libsnoopy_la_SOURCES = \
libsnoopy_la_LIBADD = \
libsnoopy_no_execve.la

all: all-recursive
all: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) all-recursive

.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/build/Makefile.am.common $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
Expand All @@ -348,6 +371,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_srcdir)/build/Makefile.am.common:

$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
Expand Down Expand Up @@ -403,6 +427,15 @@ libsnoopy.la: $(libsnoopy_la_OBJECTS) $(libsnoopy_la_DEPENDENCIES) $(EXTRA_libsn
libsnoopy_no_execve.la: $(libsnoopy_no_execve_la_OBJECTS) $(libsnoopy_no_execve_la_DEPENDENCIES) $(EXTRA_libsnoopy_no_execve_la_DEPENDENCIES)
$(AM_V_CCLD)$(LINK) $(libsnoopy_no_execve_la_OBJECTS) $(libsnoopy_no_execve_la_LIBADD) $(LIBS)

clean-checkPROGRAMS:
@list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \
echo " rm -f" $$list; \
rm -f $$list || exit $$?; \
test -n "$(EXEEXT)" || exit 0; \
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
echo " rm -f" $$list; \
rm -f $$list

mostlyclean-compile:
-rm -f *.$(OBJEXT)

Expand Down Expand Up @@ -579,6 +612,99 @@ GTAGS:
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags

check-TESTS: $(TESTS)
@failed=0; all=0; xfail=0; xpass=0; skip=0; \
srcdir=$(srcdir); export srcdir; \
list=' $(TESTS) '; \
$(am__tty_colors); \
if test -n "$$list"; then \
for tst in $$list; do \
if test -f ./$$tst; then dir=./; \
elif test -f $$tst; then dir=; \
else dir="$(srcdir)/"; fi; \
if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
all=`expr $$all + 1`; \
case " $(XFAIL_TESTS) " in \
*[\ \ ]$$tst[\ \ ]*) \
xpass=`expr $$xpass + 1`; \
failed=`expr $$failed + 1`; \
col=$$red; res=XPASS; \
;; \
*) \
col=$$grn; res=PASS; \
;; \
esac; \
elif test $$? -ne 77; then \
all=`expr $$all + 1`; \
case " $(XFAIL_TESTS) " in \
*[\ \ ]$$tst[\ \ ]*) \
xfail=`expr $$xfail + 1`; \
col=$$lgn; res=XFAIL; \
;; \
*) \
failed=`expr $$failed + 1`; \
col=$$red; res=FAIL; \
;; \
esac; \
else \
skip=`expr $$skip + 1`; \
col=$$blu; res=SKIP; \
fi; \
echo "$${col}$$res$${std}: $$tst"; \
done; \
if test "$$all" -eq 1; then \
tests="test"; \
All=""; \
else \
tests="tests"; \
All="All "; \
fi; \
if test "$$failed" -eq 0; then \
if test "$$xfail" -eq 0; then \
banner="$$All$$all $$tests passed"; \
else \
if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \
banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \
fi; \
else \
if test "$$xpass" -eq 0; then \
banner="$$failed of $$all $$tests failed"; \
else \
if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \
banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \
fi; \
fi; \
dashes="$$banner"; \
skipped=""; \
if test "$$skip" -ne 0; then \
if test "$$skip" -eq 1; then \
skipped="($$skip test was not run)"; \
else \
skipped="($$skip tests were not run)"; \
fi; \
test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
dashes="$$skipped"; \
fi; \
report=""; \
if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
report="Please report to $(PACKAGE_BUGREPORT)"; \
test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
dashes="$$report"; \
fi; \
dashes=`echo "$$dashes" | sed s/./=/g`; \
if test "$$failed" -eq 0; then \
col="$$grn"; \
else \
col="$$red"; \
fi; \
echo "$${col}$$dashes$${std}"; \
echo "$${col}$$banner$${std}"; \
test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \
test -z "$$report" || echo "$${col}$$report$${std}"; \
echo "$${col}$$dashes$${std}"; \
test "$$failed" -eq 0; \
else :; fi

distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
Expand Down Expand Up @@ -635,14 +761,18 @@ distdir: $(DISTFILES)
fi; \
done
check-am: all-am
check: check-recursive
$(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
$(MAKE) $(AM_MAKEFLAGS) check-TESTS
check: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) check-recursive
all-am: Makefile $(LTLIBRARIES)
installdirs: installdirs-recursive
installdirs-am:
for dir in "$(DESTDIR)$(libdir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-recursive
install: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) install-recursive
install-exec: install-exec-recursive
install-data: install-data-recursive
uninstall: uninstall-recursive
Expand All @@ -664,18 +794,22 @@ install-strip:
mostlyclean-generic:

clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)

distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)

maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
clean: clean-recursive

clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
clean-noinstLTLIBRARIES mostlyclean-am
clean-am: clean-checkPROGRAMS clean-generic clean-libLTLIBRARIES \
clean-libtool clean-noinstLTLIBRARIES mostlyclean-am

distclean: distclean-recursive
-rm -rf ./$(DEPDIR)
Expand Down Expand Up @@ -743,24 +877,25 @@ ps-am:

uninstall-am: uninstall-libLTLIBRARIES

.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
install-am install-strip tags-recursive
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \
check-am ctags-recursive install install-am install-strip \
tags-recursive

.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
all all-am check check-am clean clean-generic \
clean-libLTLIBRARIES clean-libtool clean-noinstLTLIBRARIES \
ctags ctags-recursive distclean distclean-compile \
distclean-generic distclean-libtool distclean-tags distdir dvi \
dvi-am html html-am info info-am install install-am \
install-data install-data-am install-dvi install-dvi-am \
install-exec install-exec-am install-html install-html-am \
install-info install-info-am install-libLTLIBRARIES \
install-man install-pdf install-pdf-am install-ps \
install-ps-am install-strip installcheck installcheck-am \
installdirs installdirs-am maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags tags-recursive uninstall uninstall-am \
all all-am check check-TESTS check-am clean \
clean-checkPROGRAMS clean-generic clean-libLTLIBRARIES \
clean-libtool clean-noinstLTLIBRARIES ctags ctags-recursive \
distclean distclean-compile distclean-generic \
distclean-libtool distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-data \
install-data-am install-dvi install-dvi-am install-exec \
install-exec-am install-html install-html-am install-info \
install-info-am install-libLTLIBRARIES install-man install-pdf \
install-pdf-am install-ps install-ps-am install-strip \
installcheck installcheck-am installdirs installdirs-am \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
uninstall-libLTLIBRARIES


Expand Down
27 changes: 24 additions & 3 deletions src/input/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,20 +1,41 @@
AM_CFLAGS = -I$(top_srcdir)/src
### Include common Makefile configuration
#
include $(top_srcdir)/build/Makefile.am.common



### Include
#
AM_CFLAGS += -I$(top_srcdir)/src



### Create one library with all snoopy inputs collected in it
#
noinst_LTLIBRARIES = libsnoopy_inputs_all.la


### Inputs collection is made of the following files

### Input providers collection is made of the following files
#
# Please maintain alphabetical order, equal to what `ls` would do
#
libsnoopy_inputs_all_la_SOURCES = \
cmdline.c \
cmdline.h \
cwd.c \
cwd.h \
egid.c \
egid.h \
euid.c \
euid.h \
filename.c \
filename.h \
gid.c \
gid.h \
sid.c \
sid.h \
tty.c \
uid.c
tty.h \
uid.c \
uid.h
Loading

0 comments on commit 632e869

Please sign in to comment.