1 # makefile for regression tests, Time-stamp: <2009-06-12 11:07:24 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@
23 C_PREPROC
= @C_PREPROC@
24 FLAGS_OBJ
= @FLAGS_OBJ@
25 FLAGS_DYN
= @FLAGS_DYN@
26 FLAGS_LIB
= @FLAGS_LIB@
27 FLAGS_EXE
= @FLAGS_EXE@
31 LIBRARY_DEFS
= @LIBRARY_DEFS@
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@
65 INCLUDES
= -I
$(srcdirpfx
)$(rootfromhere
)/include -I
$(srcdir)
69 RCFILES
= makefile.in \
70 debug.scm error.scm r4rstest.scm mix.scm mem.scm client.c server.scm server.h \
71 test1.ok test2.ok test3.ok test4.ok test5.ok test6.ok test7.ok \
72 test8.ok test9.ok test10.scm input
76 DISTFILES
= $(RCFILES
) $(GENDISTFILES
)
83 @if
[ ! -f debug.scm
]; then \
84 cp
$(srcdirpfx
)debug.scm .
; \
86 cp
$(srcdirpfx
)error.scm .
; \
88 cp
$(srcdirpfx
)r4rstest.scm .
; \
90 cp
$(srcdirpfx
)mix.scm .
; \
92 cp
$(srcdirpfx
)mem.scm .
; \
94 cp
$(srcdirpfx
)server.scm .
; \
98 check: all test1 test2 test3 test4 test5 test6 test7 test8 test9 test10
99 @echo
"============ ALL TESTS SUCCESSFUL"
100 rm -f mem.c mem_.c mem@obj@ mem.o1 mem_@obj@ mem@exe@ \
101 mix.c mix_.c mix@obj@ mix_@obj@ mix@exe@ \
102 server.c server_.c server@obj@ server_@obj@ client@obj@ \
103 client@exe@ so_locations
*.out tmp
*
106 @echo
"------------ TEST 1 (debugging support)"
107 @SETDLPATH@
$(rootfromhere
)/gsi
/gsi
-:~~bin
=$(srcdirpfx
)$(rootfromhere
)/bin
,~~lib
=$(srcdirpfx
)$(rootfromhere
)/lib
,~~
include=$(srcdirpfx
)$(rootfromhere
)/include -f debug.scm
> test1.out
108 diff
$(srcdirpfx
)test1.ok test1.out
&& rm -f test1.out
111 @echo
"------------ TEST 2 (error handling)"
112 @SETDLPATH@
$(rootfromhere
)/gsi
/gsi
-:h4000
,~~bin
=$(srcdirpfx
)$(rootfromhere
)/bin
,~~lib
=$(srcdirpfx
)$(rootfromhere
)/lib
,~~
include=$(srcdirpfx
)$(rootfromhere
)/include -f error.scm
< error.scm
> test2.out
113 diff
$(srcdirpfx
)test2.ok test2.out
&& rm -f test2.out
116 @echo
"------------ TEST 3 (interpreter and library functions)"
117 @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
118 diff
$(srcdirpfx
)test3.ok test3.out
&& rm -f test3.out tmp
*
121 @echo
"------------ TEST 4 (interpreter running an application)"
123 @SETDLPATH@
$(rootfromhere
)/gsi
/gsi
-:~~bin
=$(srcdirpfx
)$(rootfromhere
)/bin
,~~lib
=$(srcdirpfx
)$(rootfromhere
)/lib
,~~
include=$(srcdirpfx
)$(rootfromhere
)/include -f mix.scm
> test4.out
124 diff
$(srcdirpfx
)test4.ok test4.out
&& rm -f test4.out
127 @echo
"------------ TEST 5 (compiler generating C code)"
129 @SETDLPATH@
$(rootfromhere
)/gsc
/gsc
-:~~bin
=$(srcdirpfx
)$(rootfromhere
)/bin
,~~lib
=$(srcdirpfx
)$(rootfromhere
)/lib
,~~
include=$(srcdirpfx
)$(rootfromhere
)/include -f
-c mix.scm
130 diff
$(srcdirpfx
)test5.ok mix.c
133 @echo
"------------ TEST 6 (link and execute the code generated)"
134 rm -f mix_.c mix@obj@ mix_@obj@ mix@exe@
135 @SETDLPATH@
$(rootfromhere
)/gsc
/gsc
-:~~bin
=$(srcdirpfx
)$(rootfromhere
)/bin
,~~lib
=$(srcdirpfx
)$(rootfromhere
)/lib
,~~
include=$(srcdirpfx
)$(rootfromhere
)/include -f
-link mix.c
136 $(C_COMPILER
) $(INCLUDES
) $(FLAGS_OBJ
) -c mix.c
137 $(C_COMPILER
) $(INCLUDES
) $(FLAGS_OBJ
) -c mix_.c
138 $(MAKE
) link EXECUTABLE
="mix@exe@" \
139 LINK_LIBS
="$(rootfromhere)/lib/$(LIB_PREFIX)$(GAMBCLIB)$(LIB_EXTENSION)" \
140 EXECUTABLE_OBJECTS
="mix@obj@ mix_@obj@" \
141 EXECUTABLE_OBJECTS_PLUS
="+mix@obj@ +mix_@obj@" \
142 EXECUTABLE_OBJECTS_COMMA
="mix@obj@,mix_@obj@"
143 @SETDLPATH@ .
/mix@exe@
-:m4000
> test6.out
144 diff
$(srcdirpfx
)test6.ok test6.out
&& \
145 rm -f test6.out mix.c mix_.c mix@obj@ mix_@obj@ mix@exe@
148 @echo
"------------ TEST 7 (memory management and C-interface)"
149 rm -f mem.c mem_.c mem@obj@ mem_@obj@ mem@exe@
150 @SETDLPATH@
$(rootfromhere
)/gsc
/gsc
-:~~bin
=$(srcdirpfx
)$(rootfromhere
)/bin
,~~lib
=$(srcdirpfx
)$(rootfromhere
)/lib
,~~
include=$(srcdirpfx
)$(rootfromhere
)/include -f
-link mem.scm
151 $(C_COMPILER
) $(INCLUDES
) $(FLAGS_OBJ
) -c mem.c
152 $(C_COMPILER
) $(INCLUDES
) $(FLAGS_OBJ
) -c mem_.c
153 $(MAKE
) link EXECUTABLE
="mem@exe@" \
154 LINK_LIBS
="$(rootfromhere)/lib/$(LIB_PREFIX)$(GAMBCLIB)$(LIB_EXTENSION)" \
155 EXECUTABLE_OBJECTS
="mem@obj@ mem_@obj@" \
156 EXECUTABLE_OBJECTS_PLUS
="+mem@obj@ +mem_@obj@" \
157 EXECUTABLE_OBJECTS_COMMA
="mem@obj@,mem_@obj@"
158 @SETDLPATH@ .
/mem@exe@
-:h4000
> test7.out
159 diff
$(srcdirpfx
)test7.ok test7.out
&& \
160 rm -f test7.out mem.c mem_.c mem@obj@ mem_@obj@ mem@exe@
163 @echo
"------------ TEST 8 (use C-interface to implement a Scheme server)"
164 rm -f server.c server_.c server@obj@ server_@obj@ \
165 client@obj@ client@exe@
166 @SETDLPATH@
$(rootfromhere
)/gsc
/gsc
-:~~bin
=$(srcdirpfx
)$(rootfromhere
)/bin
,~~lib
=$(srcdirpfx
)$(rootfromhere
)/lib
,~~
include=$(srcdirpfx
)$(rootfromhere
)/include -f
-link server.scm
167 $(C_COMPILER
) $(INCLUDES
) $(FLAGS_OBJ
) -c client.c
168 $(C_COMPILER
) $(INCLUDES
) $(FLAGS_OBJ
) -D___LIBRARY
-c server.c
169 $(C_COMPILER
) $(INCLUDES
) $(FLAGS_OBJ
) -D___LIBRARY
-c server_.c
170 $(MAKE
) link EXECUTABLE
="client@exe@" \
171 LINK_LIBS
="$(rootfromhere)/lib/$(LIB_PREFIX)$(GAMBCLIB)$(LIB_EXTENSION)" \
172 EXECUTABLE_OBJECTS
="client@obj@ server@obj@ server_@obj@" \
173 EXECUTABLE_OBJECTS_PLUS
="+client@obj@ +server@obj@ +server_@obj@" \
174 EXECUTABLE_OBJECTS_COMMA
="client@obj@,server@obj@,server_@obj@"
175 @SETDLPATH@ .
/client@exe@
> test8.out
176 diff
-w
$(srcdirpfx
)test8.ok test8.out
&& \
177 rm -f test8.out server.c server_.c server@obj@ server_@obj@ \
178 client@obj@ client@exe@
181 @echo
"------------ TEST 9 (dynamic compilation and loading of a module)"
182 rm -f mem@obj@ mem.o
*
183 @SETDLPATH@
$(rootfromhere
)/gsc
/gsc
-:~~bin
=$(srcdirpfx
)$(rootfromhere
)/bin
,~~lib
=$(srcdirpfx
)$(rootfromhere
)/lib
,~~
include=$(srcdirpfx
)$(rootfromhere
)/include -f mem.scm
184 @SETDLPATH@
$(rootfromhere
)/gsi
/gsi
-:h4000
-f mem.o1
> test9.out
185 diff
$(srcdirpfx
)test9.ok test9.out
&& rm -f test9.out mem@obj@ mem.o1
188 @echo
"------------ TEST 10 (consistency of lib/gambit#.scm)"
189 rm -f mem@obj@ mem.o
*
190 @SETDLPATH@
$(rootfromhere
)/gsc
/gsc
-:~~bin
=$(srcdirpfx
)$(rootfromhere
)/bin
,~~lib
=$(srcdirpfx
)$(rootfromhere
)/lib
,~~
include=$(srcdirpfx
)$(rootfromhere
)/include -f
-i test10.scm
206 rm -f mem.c mem_.c mem@obj@ mem.o1 mem_@obj@ mem mem.exe \
207 mix.c mix_.c mix@obj@ mix_@obj@ mix mix.exe \
208 server.c server_.c server@obj@ server_@obj@ client@obj@ client \
209 client.exe gambit.h so_locations
*.out tmp
*
211 clean-pre
: mostlyclean-pre
213 clean-post
: mostlyclean-post
214 test ! -f debug.
rm ||
rm -f debug.
rm debug.scm
215 test ! -f error.
rm ||
rm -f error.
rm error.scm
216 test ! -f r4rstest.
rm ||
rm -f r4rstest.
rm r4rstest.scm
217 test ! -f mix.
rm ||
rm -f mix.
rm mix.scm
218 test ! -f mem.
rm ||
rm -f mem.
rm mem.scm
219 test ! -f server.
rm ||
rm -f server.
rm server.scm
220 rm -f
*.da
*.bb
*.bbg
*.gcov
*.gcno
*.gcda
222 distclean-pre
: clean-pre
224 distclean-post
: clean-post
226 bootclean-pre
: distclean-pre
228 bootclean-post
: distclean-post
230 realclean-pre
: bootclean-pre
232 realclean-post
: bootclean-post
240 dist-pre dist-devel-pre
:
241 mkdir
$(rootfromhere
)/$(PACKAGE_TARNAME
)/$(herefromroot
)
242 chmod
777 $(rootfromhere
)/$(PACKAGE_TARNAME
)/$(herefromroot
)
243 @echo
" Copying distribution files:"
244 @for file in
$(DISTFILES
); do \
245 echo
" $(herefromroot)/$$file"; \
246 ln
$(srcdirpfx
)$$file $(rootfromhere
)/$(PACKAGE_TARNAME
)/$(herefromroot
) 2> /dev
/null \
247 || cp
-p
$(srcdirpfx
)$$file $(rootfromhere
)/$(PACKAGE_TARNAME
)/$(herefromroot
); \
250 dist-post dist-devel-post
:
252 all-recursive install-recursive uninstall-recursive mostlyclean-recursive clean-recursive distclean-recursive bootclean-recursive realclean-recursive rc-setup-recursive dist-recursive dist-devel-recursive
:
253 @if
test -n
"$(SUBDIRS)"; then \
254 for subdir in
""$(SUBDIRS
); do \
255 target
=`echo $@ | sed 's/-recursive//'`; \
256 echo making
$$target in
$$subdir; \
257 (cd
$$subdir && $(MAKE
) $$target) || exit
1; \
263 all-post
: all-recursive
265 all-recursive
: all-pre
267 install: install-post
269 install-post
: install-recursive
271 install-recursive
: install-pre
273 uninstall: uninstall-post
275 uninstall-post
: uninstall-recursive
277 uninstall-recursive
: uninstall-pre
279 mostlyclean: mostlyclean-post
281 mostlyclean-post
: mostlyclean-recursive
283 mostlyclean-recursive
: mostlyclean-pre
287 clean-post
: clean-recursive
289 clean-recursive
: clean-pre
291 distclean: distclean-post
293 distclean-post
: distclean-recursive
295 distclean-recursive
: distclean-pre
297 bootclean
: bootclean-post
299 bootclean-post
: bootclean-recursive
301 bootclean-recursive
: bootclean-pre
303 realclean: realclean-post
305 realclean-post
: realclean-recursive
307 realclean-recursive
: realclean-pre
309 rc-setup
: rc-setup-post
311 rc-setup-post
: rc-setup-recursive
313 rc-setup-recursive
: rc-setup-pre
317 dist-post
: dist-recursive
319 dist-recursive
: dist-pre
321 dist-devel
: dist-devel-post
323 dist-devel-post
: dist-devel-recursive
325 dist-devel-recursive
: dist-devel-pre
327 makefile
: makefile.in
$(rootfromhere
)/config.status
328 cd
$(rootfromhere
) && CONFIG_FILES
=$(herefromroot
)/$@ CONFIG_HEADERS
= .
/config.status
330 # Tell versions [3.59,3.63) of GNU make not to export all variables.
331 # Otherwise a system limit (for SysV at least) may be exceeded.