1 # makefile for regression tests, Time-stamp: <2009-08-05 00:19:04 feeley>
3 # Copyright (c) 1994-2009 by Marc Feeley, All Rights Reserved.
9 PACKAGE_SHORTNAME
= @PACKAGE_SHORTNAME@
10 PACKAGE_NAME
= @PACKAGE_NAME@
11 PACKAGE_VERSION
= @PACKAGE_VERSION@
12 PACKAGE_STRING
= @PACKAGE_STRING@
13 PACKAGE_BUGREPORT
= @PACKAGE_BUGREPORT@
14 PACKAGE_TARNAME
= @PACKAGE_TARNAME@
20 srcdirpfx
= @srcdirpfx@
22 C_COMPILER
= @C_COMPILER_MF@
23 C_PREPROC
= @C_PREPROC_MF@
24 FLAGS_OBJ
= @FLAGS_OBJ_MF@
25 FLAGS_DYN
= @FLAGS_DYN_MF@
26 FLAGS_LIB
= @FLAGS_LIB_MF@
27 FLAGS_EXE
= @FLAGS_EXE_MF@
31 GAMBCLIB_DEFS
= @GAMBCLIB_DEFS_MF@
32 LIB_PREFIX
= @LIB_PREFIX@
33 LIB_EXTENSION
= @LIB_EXTENSION@
35 GAMBCGSCLIB
= @GAMBCGSCLIB@
36 GAMBCGSILIB
= @GAMBCGSILIB@
38 INSTALL_DATA
= @INSTALL_DATA@
39 INSTALL_LIB
= @INSTALL_LIB@
40 INSTALL_PROGRAM
= @INSTALL_PROGRAM@
48 exec_prefix = @
exec_prefix@
49 includedir = @
includedir@
55 libexecdir
= @libexecdir@
56 datarootdir
= @datarootdir@
62 localedir
= @localedir@
67 RCFILES
= makefile.in \
68 debug.scm error.scm r4rstest.scm mix.scm mem.scm client.c server.scm server.h \
69 test1.ok test2.ok test3.ok test4.ok test5.ok test6.ok test7.ok \
70 test8.ok test9.ok test10.scm input
74 DISTFILES
= $(RCFILES
) $(GENDISTFILES
)
76 GAMBCDIR_INCLUDE
= $(srcdirpfx
)$(rootfromhere
)/include
77 GAMBCDIR_LIB
= $(srcdirpfx
)$(rootfromhere
)/lib
78 GAMBCDIR_LIB_GSI
= $(srcdirpfx
)$(rootfromhere
)/gsi
79 GAMBCDIR_LIB_GSC
= $(srcdirpfx
)$(rootfromhere
)/gsc
86 @if
[ ! -f debug.scm
]; then \
87 cp
$(srcdirpfx
)debug.scm .
; \
89 cp
$(srcdirpfx
)error.scm .
; \
91 cp
$(srcdirpfx
)r4rstest.scm .
; \
93 cp
$(srcdirpfx
)mix.scm .
; \
95 cp
$(srcdirpfx
)mem.scm .
; \
97 cp
$(srcdirpfx
)server.scm .
; \
101 check: all test1 test2 test3 test4 test5 test6 test7 test8 test9 test10
102 @echo
"============ ALL TESTS SUCCESSFUL"
103 rm -f mem.c mem_.c mem@obj@ mem.o1 mem_@obj@ mem@exe@ \
104 mix.c mix_.c mix@obj@ mix_@obj@ mix@exe@ \
105 server.c server_.c server@obj@ server_@obj@ client@obj@ \
106 client@exe@ so_locations
*.out tmp
*
109 @echo
"------------ TEST 1 (debugging support)"
110 @SETDLPATH@
$(rootfromhere
)/gsi
/gsi
-:~~bin
=$(srcdirpfx
)$(rootfromhere
)/bin
,~~lib
=$(srcdirpfx
)$(rootfromhere
)/lib
,~~
include=$(srcdirpfx
)$(rootfromhere
)/include -f debug.scm
> test1.out
111 diff
$(srcdirpfx
)test1.ok test1.out
&& rm -f test1.out
114 @echo
"------------ TEST 2 (error handling)"
115 @SETDLPATH@
$(rootfromhere
)/gsi
/gsi
-:h4000
,~~bin
=$(srcdirpfx
)$(rootfromhere
)/bin
,~~lib
=$(srcdirpfx
)$(rootfromhere
)/lib
,~~
include=$(srcdirpfx
)$(rootfromhere
)/include -f error.scm
< error.scm
> test2.out
116 diff
$(srcdirpfx
)test2.ok test2.out
&& rm -f test2.out
119 @echo
"------------ TEST 3 (interpreter and library functions)"
120 @SETDLPATH@
$(rootfromhere
)/gsi
/gsi
-:s
,~~bin
=$(srcdirpfx
)$(rootfromhere
)/bin
,~~lib
=$(srcdirpfx
)$(rootfromhere
)/lib
,~~
include=$(srcdirpfx
)$(rootfromhere
)/include -f
-e
'(begin (load "r4rstest.scm") (test-cont) (test-sc4) (test-delay) (exit))' > test3.out
121 diff
$(srcdirpfx
)test3.ok test3.out
&& rm -f test3.out tmp
*
124 @echo
"------------ TEST 4 (interpreter running an application)"
126 @SETDLPATH@
$(rootfromhere
)/gsi
/gsi
-:~~bin
=$(srcdirpfx
)$(rootfromhere
)/bin
,~~lib
=$(srcdirpfx
)$(rootfromhere
)/lib
,~~
include=$(srcdirpfx
)$(rootfromhere
)/include -f mix.scm
> test4.out
127 diff
$(srcdirpfx
)test4.ok test4.out
&& rm -f test4.out
130 @echo
"------------ TEST 5 (compiler generating C code)"
132 @SETDLPATH@
$(rootfromhere
)/gsc
/gsc
-:~~bin
=$(srcdirpfx
)$(rootfromhere
)/bin
,~~lib
=$(srcdirpfx
)$(rootfromhere
)/lib
,~~
include=$(srcdirpfx
)$(rootfromhere
)/include -f
-c mix.scm
133 diff
$(srcdirpfx
)test5.ok mix.c
136 @echo
"------------ TEST 6 (link and execute the code generated)"
137 rm -f mix_.c mix@obj@ mix_@obj@ mix@exe@
138 @SETDLPATH@
$(rootfromhere
)/gsc
/gsc
-:~~bin
=$(srcdirpfx
)$(rootfromhere
)/bin
,~~lib
=$(srcdirpfx
)$(rootfromhere
)/lib
,~~
include=$(srcdirpfx
)$(rootfromhere
)/include -f
-o mix@exe@
-exe mix.c
139 @SETDLPATH@ .
/mix@exe@
-:m4000
> test6.out
140 diff
$(srcdirpfx
)test6.ok test6.out
&& \
141 rm -f test6.out mix.c mix_.c mix@obj@ mix_@obj@ mix@exe@
144 @echo
"------------ TEST 7 (memory management and C-interface)"
145 rm -f mem.c mem_.c mem@obj@ mem_@obj@ mem@exe@
146 @SETDLPATH@
$(rootfromhere
)/gsc
/gsc
-:~~bin
=$(srcdirpfx
)$(rootfromhere
)/bin
,~~lib
=$(srcdirpfx
)$(rootfromhere
)/lib
,~~
include=$(srcdirpfx
)$(rootfromhere
)/include -f
-o mem@exe@
-exe mem.scm
147 @SETDLPATH@ .
/mem@exe@
-:h4000
> test7.out
148 diff
$(srcdirpfx
)test7.ok test7.out
&& \
149 rm -f test7.out mem.c mem_.c mem@obj@ mem_@obj@ mem@exe@
152 @echo
"------------ TEST 8 (use C-interface to implement a Scheme server)"
153 rm -f server.c server_.c server@obj@ server_@obj@ \
154 client@obj@ client@exe@
155 @SETDLPATH@
$(rootfromhere
)/gsc
/gsc
-:~~bin
=$(srcdirpfx
)$(rootfromhere
)/bin
,~~lib
=$(srcdirpfx
)$(rootfromhere
)/lib
,~~
include=$(srcdirpfx
)$(rootfromhere
)/include -f
-link server.scm
157 BUILD_OBJ_OUTPUT_FILENAME
="client@obj@" \
158 BUILD_OBJ_CC_OPTIONS
="" \
159 BUILD_OBJ_INPUT_FILENAMES
="client.c"
160 $(MAKE
) build_obj_library \
161 BUILD_OBJ_OUTPUT_FILENAME
="server@obj@" \
162 BUILD_OBJ_CC_OPTIONS
="" \
163 BUILD_OBJ_INPUT_FILENAMES
="server.c"
164 $(MAKE
) build_obj_library \
165 BUILD_OBJ_OUTPUT_FILENAME
="server_@obj@" \
166 BUILD_OBJ_CC_OPTIONS
="" \
167 BUILD_OBJ_INPUT_FILENAMES
="server_.c"
169 BUILD_EXE_OUTPUT_FILENAME
="client@exe@" \
170 BUILD_EXE_CC_OPTIONS
="" \
171 BUILD_EXE_LD_OPTIONS_PRELUDE
="" \
172 BUILD_EXE_INPUT_FILENAMES
="client@obj@ server@obj@ server_@obj@" \
173 BUILD_EXE_LD_OPTIONS
=""
174 @SETDLPATH@ .
/client@exe@
> test8.out
175 diff
-w
$(srcdirpfx
)test8.ok test8.out
&& \
176 rm -f test8.out server.c server_.c server@obj@ server_@obj@ \
177 client@obj@ client@exe@
180 @echo
"------------ TEST 9 (dynamic compilation and loading of a module)"
181 rm -f mem@obj@ mem.o
*
182 @SETDLPATH@
$(rootfromhere
)/gsc
/gsc
-:~~bin
=$(srcdirpfx
)$(rootfromhere
)/bin
,~~lib
=$(srcdirpfx
)$(rootfromhere
)/lib
,~~
include=$(srcdirpfx
)$(rootfromhere
)/include -f mem.scm
183 @SETDLPATH@
$(rootfromhere
)/gsi
/gsi
-:h4000
-f mem.o1
> test9.out
184 diff
$(srcdirpfx
)test9.ok test9.out
&& rm -f test9.out mem@obj@ mem.o1
187 @echo
"------------ TEST 10 (consistency of lib/gambit#.scm)"
188 rm -f mem@obj@ mem.o
*
189 @SETDLPATH@
$(rootfromhere
)/gsc
/gsc
-:~~bin
=$(srcdirpfx
)$(rootfromhere
)/bin
,~~lib
=$(srcdirpfx
)$(rootfromhere
)/lib
,~~
include=$(srcdirpfx
)$(rootfromhere
)/include -f
-i test10.scm
195 @BUILD_OBJ@
-D___LIBRARY
211 rm -f mem.c mem_.c mem@obj@ mem.o1 mem_@obj@ mem mem.exe \
212 mix.c mix_.c mix@obj@ mix_@obj@ mix mix.exe \
213 server.c server_.c server@obj@ server_@obj@ client@obj@ client \
214 client.exe gambit.h so_locations
*.out tmp
*
216 clean-pre
: mostlyclean-pre
218 clean-post
: mostlyclean-post
219 test ! -f debug.
rm ||
rm -f debug.
rm debug.scm
220 test ! -f error.
rm ||
rm -f error.
rm error.scm
221 test ! -f r4rstest.
rm ||
rm -f r4rstest.
rm r4rstest.scm
222 test ! -f mix.
rm ||
rm -f mix.
rm mix.scm
223 test ! -f mem.
rm ||
rm -f mem.
rm mem.scm
224 test ! -f server.
rm ||
rm -f server.
rm server.scm
225 rm -f
*.da
*.bb
*.bbg
*.gcov
*.gcno
*.gcda
227 distclean-pre
: clean-pre
229 distclean-post
: clean-post
231 bootclean-pre
: distclean-pre
233 bootclean-post
: distclean-post
235 realclean-pre
: bootclean-pre
237 realclean-post
: bootclean-post
245 dist-pre dist-devel-pre
:
246 mkdir
$(rootfromhere
)/$(PACKAGE_TARNAME
)/$(herefromroot
)
247 chmod
777 $(rootfromhere
)/$(PACKAGE_TARNAME
)/$(herefromroot
)
248 @echo
" Copying distribution files:"
249 @for file in
$(DISTFILES
); do \
250 echo
" $(herefromroot)/$$file"; \
251 ln
$(srcdirpfx
)$$file $(rootfromhere
)/$(PACKAGE_TARNAME
)/$(herefromroot
) 2> /dev
/null \
252 || cp
-p
$(srcdirpfx
)$$file $(rootfromhere
)/$(PACKAGE_TARNAME
)/$(herefromroot
); \
255 dist-post dist-devel-post
:
257 all-recursive install-recursive uninstall-recursive mostlyclean-recursive clean-recursive distclean-recursive bootclean-recursive realclean-recursive rc-setup-recursive dist-recursive dist-devel-recursive
:
258 @if
test -n
"$(SUBDIRS)"; then \
259 for subdir in
""$(SUBDIRS
); do \
260 target
=`echo $@ | sed 's/-recursive//'`; \
261 echo making
$$target in
$$subdir; \
262 (cd
$$subdir && $(MAKE
) $$target) || exit
1; \
268 all-post
: all-recursive
270 all-recursive
: all-pre
272 install: install-post
274 install-post
: install-recursive
276 install-recursive
: install-pre
278 uninstall: uninstall-post
280 uninstall-post
: uninstall-recursive
282 uninstall-recursive
: uninstall-pre
284 mostlyclean: mostlyclean-post
286 mostlyclean-post
: mostlyclean-recursive
288 mostlyclean-recursive
: mostlyclean-pre
292 clean-post
: clean-recursive
294 clean-recursive
: clean-pre
296 distclean: distclean-post
298 distclean-post
: distclean-recursive
300 distclean-recursive
: distclean-pre
302 bootclean
: bootclean-post
304 bootclean-post
: bootclean-recursive
306 bootclean-recursive
: bootclean-pre
308 realclean: realclean-post
310 realclean-post
: realclean-recursive
312 realclean-recursive
: realclean-pre
314 rc-setup
: rc-setup-post
316 rc-setup-post
: rc-setup-recursive
318 rc-setup-recursive
: rc-setup-pre
322 dist-post
: dist-recursive
324 dist-recursive
: dist-pre
326 dist-devel
: dist-devel-post
328 dist-devel-post
: dist-devel-recursive
330 dist-devel-recursive
: dist-devel-pre
332 makefile
: makefile.in
$(rootfromhere
)/config.status
333 cd
$(rootfromhere
) && CONFIG_FILES
=$(herefromroot
)/$@ CONFIG_HEADERS
= .
/config.status
335 # Tell versions [3.59,3.63) of GNU make not to export all variables.
336 # Otherwise a system limit (for SysV at least) may be exceeded.