Debian Codegraph @

src/testpattern/Makefile.am

raw
1 ## Copyright (C) 2000 Roger Leigh
2 ##
3 ## This program is free software; you can redistribute it and/or modify
4 ## it under the terms of the GNU General Public License as published by
5 ## the Free Software Foundation; either version 2, or (at your option)
6 ## any later version.
7 ##
8 ## This program is distributed in the hope that it will be useful,
9 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
10 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 ## GNU General Public License for more details.
12 ##
13 ## You should have received a copy of the GNU General Public License
14 ## along with this program. If not, see <https://www.gnu.org/licenses/>.
15
16 ## Process this file with automake to produce Makefile.in.
17
18 @SET_MAKE@
19
20 include $(top_srcdir)/scripts/global.mk
21
22
23 ## Variables
24
25 pkgdatadir = $(datadir)/$(PACKAGE)/samples
26
27 ## Programs
28
29 AM_LFLAGS = -i
30 AM_YFLAGS = -d
31
32 testpattern_SOURCES = testpattern.c testpatterny.y testpatternl.l testpattern.h
33 testpattern_LDADD = $(GUTENPRINT_LIBS) $(LIBM)
34
35 testpatternl.o: testpatterny.o
36 testpattern.o: testpatterny.o
37
38 printers_LDADD = $(GUTENPRINT_LIBS)
39 printer_options_LDADD = $(GUTENPRINT_LIBS)
40
41
42 ## Data
43
44 if INSTALL_SAMPLES
45 pkgdata_DATA = testpattern.sample extended.sample
46 endif
47
48 if BUILD_TESTPATTERN
49
50 AM_TESTS_ENVIRONMENT=STP_MODULE_PATH=$(top_builddir)/src/main/.libs:$(top_builddir)/src/main STP_DATA_PATH=$(top_srcdir)/src/xml
51 run-testpattern-2.test: run-testpattern-2
52
53 TESTS = run-testpattern-1.test run-testpattern-2.test
54 run-testpattern-2.log: run-testpattern-1.log
55
56 bin_PROGRAMS = testpattern
57 noinst_PROGRAMS = printers printer_options
58 noinst_SCRIPTS = run-testpattern-2 compare-checksums compress-checksums \
59 run-testpattern-2.test run-testpattern-1.test
60 CSUM_DEPS=testpattern run-testpattern-2 compress-checksums Checksums \
61 run-testpattern-2.test
62
63 # This suffix is *not* static during development!
64 CSUM_SUFFIX=`@PKGROOT@/scripts/gversion pkg`
65 CSUM_RELEASE_SUFFIX=@GUTENPRINT_VERSION@
66 CSUM_FILE=Checksums/sums.gutenprint-$(SPREFIX)$(CSUM_SUFFIX)
67 CSUM_RELEASE_FILE=Checksums/sums.gutenprint-$(CSUM_RELEASE_SUFFIX)
68
69 .PHONY: checksums checksums-release
70
71 CHECKSUM_ENV=STP_TEST_PROFILE=checksums STP_DATA_PATH='@PKGROOT@/src/xml'
72
73 Checksums:
74 $(MKDIR_P) Checksums
75
76 checksums: $(CSUM_DEPS)
77 $(CHECKSUM_ENV) ./run-testpattern-2.test 4>&1 | ./compress-checksums | $(COMPRESS) > "$(CSUM_FILE)@CSUF@"
78
79 checksums-fast: $(CSUM_DEPS)
80 $(CHECKSUM_ENV) ./run-testpattern-2.test -s 4>&1 | ./compress-checksums | $(COMPRESS) > "$(CSUM_FILE)@CSUF@"
81
82 checksums-release: $(CSUM_DEPS)
83 if [ -n "$$STP_TEST_LOG_PREFIX" ] ; then \
84 $(CHECKSUM_ENV) ./run-testpattern-2.test 4>&1 | ./compress-checksums | $(COMPRESS) | tee "$${STP_TEST_LOG_PREFIX}checksums_$$$$@CSUF@" > "$(CSUM_RELEASE_FILE)@CSUF@" ; \
85 else \
86 $(CHECKSUM_ENV) ./run-testpattern-2.test 4>&1 | ./compress-checksums | $(COMPRESS) > "$(CSUM_RELEASE_FILE)@CSUF@" ; \
87 fi
88 endif
89
90 ## Clean
91
92 MAINTAINERCLEANFILES = Makefile.in testpatternl.c testpatterny.c testpatterny.h
93
94 EXTRA_DIST = \
95 testpatterny.h \
96 $(pkgdata_DATA) \
97 compare-checksums.in \
98 compress-checksums.in