File: upstream-autotoolization-harden.patch

package info (click to toggle)
blitz%2B%2B 1%3A1.0.1%2Bds-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 8,016 kB
  • sloc: cpp: 56,889; python: 1,939; fortran: 1,510; f90: 852; makefile: 828; sh: 309
file content (188 lines) | stat: -rw-r--r-- 6,292 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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
Description: upstream source: autotilization: hardenning
 Attempt to harden the upstream autotools scripts.
Origin: vendor, Debian
Forwarded: https://github.com/blitzpp/blitz/pull/35
Author: Jerome Benoit <calculus@rezozer.net>
Last-Update: 2018-06-08

--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -86,7 +86,7 @@
 
 # Install also the images into the directory containing the html files
 install-html-local:
-	$(INSTALL_DATA) *.gif *.jpg blitz.html
+	$(INSTALL_DATA) $(srcdir)/*.gif $(srcdir)/*.jpg blitz.html
 
 endif
 
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -5,14 +5,17 @@
 EXTRA_DIST = stencil4.f profile.cpp tiny2.cpp tiny3.cpp
 
 AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) $(BOOST_CPPFLAGS)
-LDADD = -L$(top_builddir)/lib -lblitz 
+LDADD = $(top_builddir)/lib/libblitz.la
 
-EXTRA_PROGRAMS = arrayx cartesian cast complex-test convolve \
+check_PROGRAMS = arrayx cartesian cast complex-test convolve \
 deriv fixed io iter matmult nested numinquire outer \
 polymorph prettyprint rand2 random reduce simple \
 slicing stencil2 storage tiny \
-useret where whitt 
-# cfd curldiv diff erf indirect pauli pick qcd rangexpr stencil3 stencil stencilet transform 
+useret where whitt
+# cfd curldiv diff erf indirect pauli pick qcd rangexpr stencil3 stencil stencilet transform
+
+TESTS = $(check_PROGRAMS)
+#TESTS_ENVIRONMENT =
 
 arrayx_SOURCES = array.cpp
 cartesian_SOURCES = cartesian.cpp
@@ -57,18 +60,9 @@
 where_SOURCES = where.cpp
 whitt_SOURCES = whitt.cpp
 
-#compile: $(EXTRA_PROGRAMS)
-
-check-examples: $(EXTRA_PROGRAMS)
-	@echo Running examples...
-	@for prog in $(EXTRA_PROGRAMS) ; do \
-		echo $$prog && (./$$prog > /dev/null 2>&1) || exit 1; \
-	done
-	@echo All tests passed.
+check-examples: check
 
 #all:
 
 clean-local:
-	-rm -rf *.ii *.ti cxx_repository Template.dir ii_files ti_files $(EXTRA_PROGRAMS)
-
-
+	-rm -rf *.ii *.ti cxx_repository Template.dir ii_files ti_files
--- a/doc/stencils/Makefile.am
+++ b/doc/stencils/Makefile.am
@@ -5,7 +5,7 @@
 EXTRA_DIST = dump-stencil.cpp
 
 AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir)
-LDADD = -L$(top_builddir)/lib -lblitz
+LDADD = $(top_builddir)/lib/libblitz.la
 COMPILE = $(CXX) $(DEFS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
 
 LTCXXCOMPILE = $(LIBTOOL) --mode=link $(CXX) $(DEFS) \
--- a/testsuite/Makefile.am
+++ b/testsuite/Makefile.am
@@ -4,14 +4,14 @@
 
 # Blitz++ test suite makefile
 
-EXTRA_DIST = testsuite.h
-
 AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) $(BOOST_CPPFLAGS)
 AM_CXXFLAGS = @CXX_DEBUG_FLAGS@ -DBZ_DEBUG
 AM_LDFLAGS = $(BOOST_LDFLAGS)
-LDADD = -L$(top_builddir)/lib -lblitz $(BOOST_SERIALIZATION_LIB)
+LDADD = $(top_builddir)/lib/libblitz.la $(BOOST_SERIALIZATION_LIB)
+
+check_HEADERS = testsuite.h
 
-EXTRA_PROGRAMS = 64bit Adnene-Ben-Abdallah-1 Adnene-Ben-Abdallah-2     \
+check_PROGRAMS = 64bit Adnene-Ben-Abdallah-1 Adnene-Ben-Abdallah-2     \
 alignment arrayresize arrayinitialize bitwise chris-jeffery-1 chris-jeffery-2  \
 chris-jeffery-3 complex-test constarray contiguous copy ctors	       \
 derrick-bass-1 derrick-bass-3 exprctor expression-slicing extract free \
@@ -27,6 +27,9 @@
 transpose troyer-genilloud tvinitialize Ulisses-Mello-1 weakref	       \
 wei-ku-1 where zeek-1 cast serialize update
 
+TESTS = $(check_PROGRAMS)
+#TESTS_ENVIRONMENT = $(VALGRIND)
+
 # 64bit test is special because it takes forever to run without optimization
 64bit_SOURCES = 64bit.cpp
 64bit_CXXFLAGS = @CXX_OPTIMIZE_FLAGS@ -DBZ_DEBUG
@@ -110,26 +113,7 @@
 where_SOURCES = where.cpp
 zeek_1_SOURCES = zeek-1.cpp
 
-check-testsuite:  $(EXTRA_PROGRAMS)
-	@echo Running test suite...
-	@fail=0; for prog in $(EXTRA_PROGRAMS) ; do \
-		if (./$$prog > /dev/null 2>&1); then \
-			echo $$prog... passed; \
-		else \
-			echo TEST FAILED: $$prog; fail=1; fi; \
-	done; \
-	if [[ $$fail -eq 1 ]]; then echo There were failing tests; else echo All tests passed; fi
-
-if HAVE_VALGRIND
-valgrind-testsuite:  $(EXTRA_PROGRAMS)
-	@echo Running test suite through valgrind...
-	@for prog in $(EXTRA_PROGRAMS) ; do \
-		echo -en "$$prog\t" && (valgrind --log-file-exactly=$$prog.val ./$$prog > /dev/null 2>&1 ;\
-                grep "ERROR SUMMARY" $$prog.val) || exit 1; \
-	done
-	@echo All tests run.
-endif
+check-testsuite: check
 
 clean-local:
-	-rm -rf *.ii *.ti cxx_repository Template.dir ii_files ti_files $(EXTRA_PROGRAMS)
-
+	-rm -rf *.ii *.ti cxx_repository Template.dir ii_files ti_files
--- a/benchmarks/Makefile.am
+++ b/benchmarks/Makefile.am
@@ -7,7 +7,7 @@
 ctime2.cpp ctime2v.cpp ctime3.cpp ctime3v.cpp ctime4.cpp ctime4v.cpp \
 ctime5.cpp ctime5c.cpp ctime5v.cpp daxpy2.cpp daxpyf90-2.f90 dot.cpp \
 dot2.cpp echof2-back.f echotune.cpp echotune.m echotunef.f frek.m    \
-hao-he-mark.cpp kepler.cpp loop1-bug.cpp loop4.cpp loop4f.f	     \
+hao-he-mark.cpp kepler.cpp loop1-bug.cpp loop4.cpp loop4f.f   	     \
 loop4f90.f90 loopstruct.cpp looptest.cpp makelogo.cpp makeloops.cpp  \
 qcd.txt quinlan.cpp stenciln.cpp tiny3.cpp iter.cpp
 
@@ -16,7 +16,7 @@
 AM_CXXFLAGS = @CXX_OPTIMIZE_FLAGS@ @CXXFFLAGS@ @CXXFCFLAG@
 AM_FFLAGS = @F77_OPTIMIZE_FLAGS@
 AM_FCFLAGS = $(FCFLAGS_f90) @FC_OPTIMIZE_FLAGS@
-LDADD = -L$(top_builddir)/lib -lblitz @BLASLIB@ @FCLIBS@ @FLIBS@
+LDADD = $(top_builddir)/lib/libblitz.la @BLASLIB@ @FCLIBS@ @FLIBS@
 
 
 ############################################################################
@@ -37,7 +37,7 @@
 
 EXTRA_PROGRAMS = $(BENCHMARKS)
 
-#compile: $(EXTRA_PROGRAMS) 
+#compile: $(EXTRA_PROGRAMS)
 
 run:	$(OTHER_BENCH)
 	@for benchmark in $(OTHER_BENCH) ; do \
@@ -61,6 +61,8 @@
 
 check-benchmarks: run run-loops ctime
 
+check: check-benchmarks
+
 ############################################################################
 
 haney_SOURCES = haney.cpp haneyf.f
@@ -86,7 +88,7 @@
 stencil_SOURCES = stencil.cpp stencilf.f stencilf2.f
 acoustic_SOURCES = acoustic.cpp acousticf.f acousticf2.f
 acou3d_SOURCES = acou3db1.cpp acou3db2.cpp acou3db3.cpp acou3db4.cpp \
-acou3d.cpp acou3df.f acou3df2.f 
+acou3d.cpp acou3df.f acou3df2.f
 
 endif
 
@@ -205,5 +207,5 @@
 
 clean-local:
 	-rm -rf *.ii *.ti *.int.c *.s work.pc* cxx_repository Template.dir ii_files ti_files core.[0-9]* \
-		$(BENCHMARKS) $(COMPILE_TIME_BENCHMARKS) 
+		$(BENCHMARKS) $(COMPILE_TIME_BENCHMARKS)