Browse code

fix 'make distcheck': add missing files to EXTRA_DIST, SOURCES update CLEANFILES .conf files and .cvd files are not removed during uninstall on purpose => whitelist them in distuninstallcheck

git-svn: trunk@4040

Török Edvin authored on 2008/07/31 22:13:48
Showing 10 changed files
... ...
@@ -24,3 +24,7 @@ bin_SCRIPTS=clamav-config
24 24
 
25 25
 pkgconfigdir = $(libdir)/pkgconfig
26 26
 pkgconfig_DATA = libclamav.pc
27
+
28
+# don't complain that configuration files and databases are not removed, this is intended
29
+distuninstallcheck_listfiles = find . -type f ! -name clamd.conf ! -name freshclam.conf ! -name daily.cvd ! -name main.cvd -print
30
+DISTCLEANFILES = target.h
... ...
@@ -118,7 +118,6 @@ am__remove_distdir = \
118 118
          && rm -fr $(distdir); }; }
119 119
 DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2
120 120
 GZIP_ENV = --best
121
-distuninstallcheck_listfiles = find . -type f -print
122 121
 distcleancheck_listfiles = find . -type f -print
123 122
 ACLOCAL = @ACLOCAL@
124 123
 AMTAR = @AMTAR@
... ...
@@ -259,6 +258,10 @@ EXTRA_DIST = FAQ examples BUGS shared libclamav.pc.in UPGRADE COPYING.bzip2 COPY
259 259
 bin_SCRIPTS = clamav-config
260 260
 pkgconfigdir = $(libdir)/pkgconfig
261 261
 pkgconfig_DATA = libclamav.pc
262
+
263
+# don't complain that configuration files and databases are not removed, this is intended
264
+distuninstallcheck_listfiles = find . -type f ! -name clamd.conf ! -name freshclam.conf ! -name daily.cvd ! -name main.cvd -print
265
+DISTCLEANFILES = target.h
262 266
 all: clamav-config.h
263 267
 	$(MAKE) $(AM_MAKEFLAGS) all-recursive
264 268
 
... ...
@@ -687,6 +690,7 @@ clean-generic:
687 687
 
688 688
 distclean-generic:
689 689
 	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
690
+	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
690 691
 
691 692
 maintainer-clean-generic:
692 693
 	@echo "This command is intended for maintainers to use"
... ...
@@ -32,7 +32,7 @@ AC_CONFIG_MACRO_DIR([m4])
32 32
 AC_CREATE_TARGET_H([target.h])
33 33
 
34 34
 dnl -Wall and -Werror here are NOT CFLAGS, they refer to automake warnings
35
-AM_INIT_AUTOMAKE([-Wall -Werror foreign dist-bzip2 no-define])
35
+AM_INIT_AUTOMAKE([-Wall -Wportability -Wno-override -Werror foreign dist-bzip2 no-define])
36 36
 
37 37
 dnl we told automake to not define these, since we want to include
38 38
 dnl the date in the version
... ...
@@ -38,3 +38,4 @@ install-data-local:
38 38
 	    if test -f $(DESTDIR)$(DBINST)/daily.cvd; then chown ${CLAMAVUSER} $(DESTDIR)$(DBINST)/daily.cvd; fi;\
39 39
 	    if test -f $(DESTDIR)$(DBINST)/daily.cvd; then chgrp ${CLAMAVGROUP} $(DESTDIR)$(DBINST)/daily.cvd; fi;\
40 40
 	fi
41
+
... ...
@@ -169,6 +169,7 @@ libclamav_la_SOURCES = \
169 169
 	phish_domaincheck_db.h \
170 170
 	phish_whitelist.c \
171 171
 	phish_whitelist.h \
172
+	iana_cctld.h \
172 173
 	iana_tld.h \
173 174
 	regex_list.c \
174 175
 	regex_list.h \
... ...
@@ -411,6 +411,7 @@ libclamav_la_SOURCES = \
411 411
 	phish_domaincheck_db.h \
412 412
 	phish_whitelist.c \
413 413
 	phish_whitelist.h \
414
+	iana_cctld.h \
414 415
 	iana_tld.h \
415 416
 	regex_list.c \
416 417
 	regex_list.h \
... ...
@@ -26,14 +26,14 @@ check_clamscan.sh: $(top_builddir)/test/clam.exe
26 26
 $(top_builddir)/test/clam.exe:
27 27
 	(cd $(top_builddir)/test && $(MAKE))
28 28
 
29
-EXTRA_DIST=.split inputs/ test-clamd.conf test-freshclam.conf valgrind.supp
29
+CLEANFILES=lcov.out *.gcno *.gcda *.log /tmp/clamd-test.log $(FILES) test-stderr.log clamscan.log valgrind.log clamdscan.log
30
+EXTRA_DIST=.split input test-clamd.conf test-freshclam.conf valgrind.supp virusaction-test.sh
30 31
 if ENABLE_COVERAGE
31 32
 LCOV_OUTPUT = lcov.out
32 33
 LCOV_HTML = lcov_html
33 34
 LCOV_LCOV = @LCOV@
34 35
 LCOV_GCOV = @GCOV@
35 36
 LCOV_GENHTML = @GENHTML@
36
-CLEANFILES=lcov.out *.gcno *.gcda *.log /tmp/clamd-test.log $(FILES)
37 37
 lcov: $(LCOV_HTML)
38 38
 
39 39
 DIRECTORIES=--directory . --directory ../libclamav --directory ../clamd --directory ../freshclam --directory ../sigtool --directory ../clamscan --directory ../clamdscan
... ...
@@ -56,7 +56,6 @@ lcov-clean:
56 56
 	$(LCOV_LCOV) $(DIRECTORIES) --zerocounters
57 57
 else
58 58
 
59
-CLEANFILES=/tmp/clamd-test.log $(FILES)
60 59
 lcov:
61 60
 	@echo "Coverage information gathering is not enabled in this build"
62 61
 	@echo "Use ./configure --enable-coverage to enable it"
... ...
@@ -226,14 +226,13 @@ scripts = check_clamd.sh check_freshclam.sh check_sigtool.sh check_clamscan.sh v
226 226
 check_clamav_SOURCES = check_clamav.c check_jsnorm.c check_str.c check_regex.c checks.h $(top_builddir)/libclamav/clamav.h check_disasm.c
227 227
 check_clamav_CFLAGS = @CHECK_CFLAGS@ -DSRCDIR=\"$(abs_srcdir)\"
228 228
 check_clamav_LDADD = $(top_builddir)/libclamav/libclamav.la @THREAD_LIBS@ @CHECK_LIBS@
229
-EXTRA_DIST = .split inputs/ test-clamd.conf test-freshclam.conf valgrind.supp
229
+CLEANFILES = lcov.out *.gcno *.gcda *.log /tmp/clamd-test.log $(FILES) test-stderr.log clamscan.log valgrind.log clamdscan.log
230
+EXTRA_DIST = .split input test-clamd.conf test-freshclam.conf valgrind.supp virusaction-test.sh
230 231
 @ENABLE_COVERAGE_TRUE@LCOV_OUTPUT = lcov.out
231 232
 @ENABLE_COVERAGE_TRUE@LCOV_HTML = lcov_html
232 233
 @ENABLE_COVERAGE_TRUE@LCOV_LCOV = @LCOV@
233 234
 @ENABLE_COVERAGE_TRUE@LCOV_GCOV = @GCOV@
234 235
 @ENABLE_COVERAGE_TRUE@LCOV_GENHTML = @GENHTML@
235
-@ENABLE_COVERAGE_FALSE@CLEANFILES = /tmp/clamd-test.log $(FILES)
236
-@ENABLE_COVERAGE_TRUE@CLEANFILES = lcov.out *.gcno *.gcda *.log /tmp/clamd-test.log $(FILES)
237 236
 @ENABLE_COVERAGE_TRUE@DIRECTORIES = --directory . --directory ../libclamav --directory ../clamd --directory ../freshclam --directory ../sigtool --directory ../clamscan --directory ../clamdscan
238 237
 all: all-am
239 238
 
... ...
@@ -722,6 +721,7 @@ $(top_builddir)/test/clam.exe:
722 722
 @ENABLE_COVERAGE_TRUE@lcov-clean:
723 723
 @ENABLE_COVERAGE_TRUE@	-$(RM) -r $(LCOV_HTML) $(LCOV_OUTPUT)
724 724
 @ENABLE_COVERAGE_TRUE@	$(LCOV_LCOV) $(DIRECTORIES) --zerocounters
725
+
725 726
 @ENABLE_COVERAGE_FALSE@lcov:
726 727
 @ENABLE_COVERAGE_FALSE@	@echo "Coverage information gathering is not enabled in this build"
727 728
 @ENABLE_COVERAGE_FALSE@	@echo "Use ./configure --enable-coverage to enable it"
... ...
@@ -37,7 +37,7 @@ if test "$NFILES" -ne "$NINFECTED"; then
37 37
 fi
38 38
 
39 39
 # Test VirusEvent feature
40
-cp $srcdir/test-clamd.conf test-clamd-viraction.conf
40
+cat <$srcdir/test-clamd.conf >test-clamd-viraction.conf
41 41
 echo "VirusEvent `pwd`/$srcdir/virusaction-test.sh `pwd` \"Virus found: %v\"" >>test-clamd-viraction.conf
42 42
 rm -f test-clamd.log
43 43
 run_clamd_test test-clamd-viraction.conf ../test/clam.exe
... ...
@@ -48,7 +48,7 @@ if ! grep "Virus found: ClamAV-Test-File.UNOFFICIAL" test-clamd.log >/dev/null 2
48 48
 fi
49 49
 
50 50
 # Test HeuristicScanPrecedence feature
51
-cp $srcdir/test-clamd.conf test-clamd-heur-pred.conf
51
+cat <$srcdir/test-clamd.conf >test-clamd-heur-pred.conf
52 52
 run_clamd_test test-clamd-heur-pred.conf clam-phish-exe
53 53
 if ! grep "ClamAV-Test-File" clamdscan.log >/dev/null 2>/dev/null; then
54 54
 	echo "HeuristicScanPrecedence off test failed!" >&2;
... ...
@@ -1,4 +1,8 @@
1 1
 #!/bin/sh
2
+die() {
3
+	rm -rf test-db
4
+	exit $1;
5
+}
2 6
 mkdir test-db
3 7
 cat <<EOF >test-db/test.hdb
4 8
 aa15bcf478d165efd2065190eb473bcb:544:ClamAV-Test-File
... ...
@@ -8,13 +12,13 @@ rm -f clamscan.log
8 8
 if test $? != 1; then
9 9
 	echo "Error running clamscan: $?" >&2;
10 10
 	grep OK clamscan.log >&2;
11
-	exit 1;
11
+	die 1;
12 12
 fi
13 13
 NFILES=`ls -1 ../test/clam* | wc -l`
14 14
 NINFECTED=`grep "Infected files" clamscan.log | cut -f2 -d:`
15 15
 if test "$NFILES" -ne "$NINFECTED"; then
16 16
 	echo "clamscan did not detect all testfiles correctly!" >&2;
17 17
 	grep OK clamscan.log >&2;
18
-	exit 2;
18
+	die 2;
19 19
 fi
20
-exit 0;
20
+die 0;