2 # /**-------------------------------------------------------------------**
4 # **-------------------------------------------------------------------**
6 # **-------------------------------------------------------------------**
7 # ** First version: march 6th 2003 **
8 # **-------------------------------------------------------------------**/
10 # makefile for checking.
12 #/*****************************************************************************
13 # * CLooG : the Chunky Loop Generator (experimental) *
14 # *****************************************************************************
16 # * Copyright (C) 2003 Cedric Bastoul *
18 # * This is free software; you can redistribute it and/or modify it under the *
19 # * terms of the GNU General Public License as published by the Free Software *
20 # * Foundation; either version 2 of the License, or (at your option) any *
23 # * This software is distributed in the hope that it will be useful, but *
24 # * WITHOUT ANY WARRANTY; without even the implied warranty of *
25 # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General *
26 # * Public License for more details. *
28 # * You should have received a copy of the GNU General Public License along *
29 # * with software; if not, write to the Free Software Foundation, Inc., *
30 # * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
32 # * CLooG, the Chunky Loop Generator *
33 # * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr *
34 # * This file has been written with the help of the Bart Kienhuis's checking *
35 # * makefile for PipLib. *
37 # *****************************************************************************/
98 square
+triangle-1-1-2-3 \
108 .
/non_optimal
/nul_complex1 \
109 .
/non_optimal
/usvd_e_t \
110 .
/non_optimal
/youcef \
111 .
/reservoir
/cholesky2 \
112 .
/reservoir
/fusion1 \
113 .
/reservoir
/fusion2 \
114 .
/reservoir
/jacobi2 \
115 .
/reservoir
/jacobi3 \
116 .
/reservoir
/lim-lam1 \
117 .
/reservoir
/lim-lam2 \
118 .
/reservoir
/lim-lam3 \
119 .
/reservoir
/lim-lam4 \
120 .
/reservoir
/lim-lam5 \
121 .
/reservoir
/lim-lam6 \
122 .
/reservoir
/liu-zhuge1 \
123 .
/reservoir
/loechner3 \
124 .
/reservoir
/loechner4 \
125 .
/reservoir
/loechner5 \
126 .
/reservoir
/mg-interp2 \
127 .
/reservoir
/mg-interp \
128 .
/reservoir
/mg-psinv \
129 .
/reservoir
/mg-resid \
130 .
/reservoir
/mg-rprj3 \
131 .
/reservoir
/pingali1 \
132 .
/reservoir
/pingali2 \
133 .
/reservoir
/pingali3 \
134 .
/reservoir
/pingali4 \
135 .
/reservoir
/pingali5 \
136 .
/reservoir
/pingali6 \
138 .
/reservoir
/tang-xue1 \
144 CLOOGTEST_FORTRAN
= \
150 CLOOGTEST_STRIDED
= \
156 @echo
" /*-----------------------------------------------*"
157 @echo
" * Generate files *"
158 @echo
" *-----------------------------------------------*/"
159 for x in
$(CLOOGTEST_C
) ; do \
160 echo
"Generate $$x.c" ; \
161 cloog
$$x.cloog
-o
$$x.c
; \
163 for x in
$(CLOOGTEST_FORTRAN
) ; do \
164 echo
"Generate $$x.f" ; \
165 cloog
$$x.cloog
-o
$$x.f
; \
169 @echo
" /*-----------------------------------------------*"
170 @echo
" * Checking files by Valgrind *"
171 @echo
" *-----------------------------------------------*/"
172 for x in
$(CLOOGTEST_C
) ; do \
173 echo
"Valgrinding $$x.c" ; \
174 valgrind
$(ROOT
)/obj_
$(TARGET
)/cloog
$(EXEC_SUFFIX
) $$x.cloog
; \
176 for x in
$(CLOOGTEST_FORTRAN
) ; do \
177 echo
"Valgrinding $$x.f" ; \
178 valgrind
$(ROOT
)/obj_
$(TARGET
)/cloog
$(EXEC_SUFFIX
) $$x.cloog
; \
182 @echo
" /*-----------------------------------------------*"
183 @echo
" * Testing CLooG *"
184 @echo
" *-----------------------------------------------*/"
186 echo
"--- Testing C files..." ; \
187 for x in
$(CLOOGTEST_C
) ; do \
188 echo
"Verify file $$x" ; \
189 $(ROOT
)/obj_
$(TARGET
)/cloog
$(EXEC_SUFFIX
) $$x.cloog
> ttemp
; \
190 diff
-w
--ignore-matching-lines
='CLooG' ttemp
$$x.c
; \
192 if
[ "$$result" -eq
"1" ] ; then \
193 echo
"!!! Error: $$x is not the same" ; \
194 failedtest
=`expr $$failedtest + 1` ; \
196 echo
"$$x passed" ; \
199 echo
"--- Testing FORTRAN files..." ; \
200 for x in
$(CLOOGTEST_FORTRAN
) ; do \
201 echo
"Verify file $$x" ; \
202 $(ROOT
)/obj_
$(TARGET
)/cloog
$(EXEC_SUFFIX
) $$x.cloog
> ttemp
; \
203 diff
-w
--ignore-matching-lines
='CLooG' ttemp
$$x.f
; \
205 if
[ "$$result" -eq
"1" ] ; then \
206 echo
"!!! Error: $$x is not the same" ; \
207 failedtest
=`expr $$failedtest + 1` ; \
209 echo
"$$x passed" ; \
212 echo
"--- Testing STRIDED files..." ; \
213 for x in
$(CLOOGTEST_STRIDED
) ; do \
214 echo
"Verify file $$x" ; \
215 $(ROOT
)/obj_
$(TARGET
)/cloog
$(EXEC_SUFFIX
) $$x.cloog \
216 -strides
1 > ttemp
; \
217 diff
-w
--ignore-matching-lines
='CLooG' ttemp
$$x.c
; \
219 if
[ "$$result" -eq
"1" ] ; then \
220 echo
"!!! Error: $$x is not the same" ; \
221 failedtest
=`expr $$failedtest + 1` ; \
223 echo
"$$x passed" ; \
226 echo
"--- Testing SPECIAL OPTIONS files..." ; \
227 echo
"Verify file vasilache (-f 8 -l 9)" ; \
229 $(ROOT
)/obj_
$(TARGET
)/cloog
$(EXEC_SUFFIX
) $$x.cloog \
230 -f
8 -l
9 > ttemp
; \
231 diff
-w
--ignore-matching-lines
='CLooG' ttemp
$$x.c
; \
233 if
[ "$$result" -eq
"1" ] ; then \
234 echo
"!!! Error: $$x is not the same" ; \
235 failedtest
=`expr $$failedtest + 1` ; \
237 echo
"$$x passed" ; \
240 if
[ $$failedtest != 0 ] ; then \
241 echo
"$$failedtest tests failed" ; \
243 echo
"CLooG works correctly :-) !" ; \
246 # Include the shared compilation rules
247 include $(ROOT
)/makefile