File: Makefile.am

package info (click to toggle)
squid 7.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 33,388 kB
  • sloc: cpp: 184,632; ansic: 12,437; sh: 5,688; makefile: 5,245; perl: 2,560; sql: 326; python: 240; awk: 141; sed: 1
file content (160 lines) | stat: -rw-r--r-- 4,380 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
## Copyright (C) 1996-2026 The Squid Software Foundation and contributors
##
## Squid software is distributed under GPLv2+ license and includes
## contributions from numerous individuals and organizations.
## Please see the COPYING and CONTRIBUTORS files for details.
##

include $(top_srcdir)/src/Common.am

## we need our local files too (but avoid -I. at all costs)
AM_CPPFLAGS += -I$(srcdir)

EXTRA_DIST = \
	$(srcdir)/squidconf/* \
	test-functionality.sh \
	test-sources.sh \
	test-squid-conf.sh \
	testHeader.cc.in

## Sort by dependencies - test lowest layers first
TESTS += \
	syntheticoperators \
	VirtualDeleteOperator \
	splay\
	mem_node_test\
	mem_hdr_test

## Sort by alpha - any build failures are significant.
check_PROGRAMS += \
		mem_node_test\
		mem_hdr_test \
		splay \
		syntheticoperators \
		VirtualDeleteOperator

#do not include stub_libmem.cc here, as it would override libmem.la in
# several tests whose purpose is testing libmem itself.
STUBS = \
	stub_cbdata.cc \
	stub_MemBuf.cc \
	stub_SBuf.cc \
	stub_tools.cc \
	stub_fatal.cc \
	stub_libtime.cc \
	STUB.h
DEBUG_SOURCE = test_tools.cc $(STUBS)
CLEANFILES += $(STUBS) stub_libmem.cc

stub_cbdata.cc: $(top_srcdir)/src/tests/stub_cbdata.cc
	cp $(top_srcdir)/src/tests/stub_cbdata.cc $@

stub_MemBuf.cc: $(top_srcdir)/src/tests/stub_MemBuf.cc
	cp $(top_srcdir)/src/tests/stub_MemBuf.cc $@

stub_SBuf.cc: $(top_srcdir)/src/tests/stub_SBuf.cc
	cp $(top_srcdir)/src/tests/stub_SBuf.cc $@

stub_tools.cc: $(top_srcdir)/src/tests/stub_tools.cc
	cp $(top_srcdir)/src/tests/stub_tools.cc $@

stub_fatal.cc: $(top_srcdir)/src/tests/stub_fatal.cc
	cp $(top_srcdir)/src/tests/stub_fatal.cc $@

stub_libmem.cc: $(top_srcdir)/src/tests/stub_libmem.cc STUB.h
	cp $(top_srcdir)/src/tests/stub_libmem.cc $@

stub_libtime.cc: $(top_srcdir)/src/tests/stub_libtime.cc STUB.h
	cp $(top_srcdir)/src/tests/stub_libtime.cc $@

STUB.h: $(top_srcdir)/src/tests/STUB.h
	cp $(top_srcdir)/src/tests/STUB.h $@

mem_node_test_SOURCES = \
	$(DEBUG_SOURCE) \
	mem_node_test.cc
mem_node_test_LDADD = \
	$(top_builddir)/src/mem_node.o \
	$(top_builddir)/src/mem/libmem.la \
	$(top_builddir)/src/debug/libdebug.la \
	$(top_builddir)/src/comm/libminimal.la \
	$(top_builddir)/src/base/libbase.la \
	$(top_builddir)/lib/libmiscutil.la \
	$(COMPAT_LIB) \
	$(XTRA_LIBS)

mem_hdr_test_SOURCES = \
	$(DEBUG_SOURCE) \
	mem_hdr_test.cc
mem_hdr_test_LDADD = \
	$(top_builddir)/src/stmem.o \
	$(top_builddir)/src/mem_node.o \
	$(top_builddir)/src/mem/libmem.la \
	$(top_builddir)/src/debug/libdebug.la \
	$(top_builddir)/src/comm/libminimal.la \
	$(top_builddir)/src/base/libbase.la \
	$(top_builddir)/lib/libmiscutil.la \
	$(COMPAT_LIB) \
	$(XTRA_LIBS)

splay_SOURCES = \
	$(DEBUG_SOURCE) \
	splay.cc \
	stub_libmem.cc
splay_LDADD = \
	$(top_builddir)/lib/libmiscutil.la \
	$(COMPAT_LIB) \
	$(XTRA_LIBS)

syntheticoperators_SOURCES = \
	$(DEBUG_SOURCE) \
	stub_libmem.cc \
	syntheticoperators.cc
syntheticoperators_LDADD = \
	$(COMPAT_LIB) \
	$(XTRA_LIBS)

VirtualDeleteOperator_SOURCES = \
	$(DEBUG_SOURCE) \
	VirtualDeleteOperator.cc \
	stub_libmem.cc
VirtualDeleteOperator_LDADD = \
	$(COMPAT_LIB) \
	$(XTRA_LIBS)

installcheck-local: squid-conf-tests

squid-conf-tests: $(srcdir)/test-squid-conf.sh $(top_builddir)/src/squid.conf.default $(srcdir)/squidconf/*
	@instructionFiles="$(srcdir)/squidconf/*.conf.instructions"; \
	for instructionFile in $$instructionFiles; do \
		cfgBasename=`basename $$instructionFile .instructions`; \
		cfg=$(srcdir)/squidconf/$$cfgBasename; \
		if ! test -f $$cfg; then \
			echo "FAIL: $$instructionFile has no matching $$cfg"; \
			exit 1; \
		fi; \
	done; \
	failed=0; \
	cfglist="$(top_builddir)/src/squid.conf.default $(srcdir)/squidconf/*.conf"; \
	rm -f $@ || $(TRUE); \
	for cfg in $$cfglist ; do \
		$(srcdir)/test-squid-conf.sh $(top_builddir) $(sbindir) $$cfg || \
			{ echo "FAIL: squid.conf test: $$cfg" | \
				sed s%$(top_builddir)/src/%% | \
				sed s%$(srcdir)/squidconf/%% ; \
				failed=1; break; \
			}; \
		if test "$$failed" -eq 0; then \
			echo "PASS: squid.conf test: $$cfg" | \
				sed s%$(top_builddir)/src/%% | \
				sed s%$(srcdir)/squidconf/%% ; \
		else break; fi; \
	done; \
	if test "$$failed" -eq 0; then cp $(TRUE) $@ ; else exit 1; fi

CLEANFILES += \
	squid-conf-tests \
	squid-expected-messages \
	squid-stderr.log \
	squid-stderr.log.next \
	squid-stderr.log.unmatched