Skip to content
Browse files

restructured makefile; fixed cross-building issue; tests build only w…

…hen -test is given; bumped version to 0.3
  • Loading branch information...
1 parent 0b34e99 commit 40611823ee4f1739003292a0c70397a0668885b3 @bunny351 bunny351 committed Apr 30, 2013
View
4 cncb.scm
@@ -1,9 +1,9 @@
;;;; concurrent native callbacks
-(use typed-records matchable srfi-69 srfi-1 posix bind data-structures
+(use srfi-69 srfi-1 posix data-structures
srfi-18 extras lolevel miscmacros)
-(import foreign)
+(import typed-records matchable bind foreign)
(import-for-syntax chicken matchable)
View
1 concurrent-native-callbacks.release-info
@@ -2,3 +2,4 @@
(uri targz "https://github.com/chicken-mobile/{egg-name}/tarball/{egg-release}")
(release "0.1")
(release "0.2")
+(release "0.3")
View
2 concurrent-native-callbacks.setup
@@ -8,4 +8,4 @@
"concurrent-native-callbacks.import.so"
"concurrent-native-callbacks-compile-time.so"
"concurrent-native-callbacks-compile-time.import.so")
- '((version 0.2)))
+ '((version 0.3)))
View
45 makefile.scm
@@ -8,63 +8,34 @@
"cncb-module.scm"
"twiddle.c"
"concurrent-native-callbacks-compile-time.import.so")
- (run (csc -sJ -O3 cncb-module.scm
+ (compile -sJ -O3 cncb-module.scm
;-C -g -k ;XXX
-C -Wno-unused-result
- -o concurrent-native-callbacks.so)) )
+ -o concurrent-native-callbacks.so))
("concurrent-native-callbacks.import.so"
("concurrent-native-callbacks.so")
- (run (csc -s -O3 -d0 concurrent-native-callbacks.import.scm)))
+ (compile -s -O3 -d0 concurrent-native-callbacks.import.scm))
("concurrent-native-callbacks-compile-time.so"
("cncb-compile-time.scm"
"cncb-compile-time-module.scm")
- (run (csc -sJ -O3 cncb-compile-time-module.scm
- -o concurrent-native-callbacks-compile-time.so)))
+ (compile -sJ -O3 cncb-compile-time-module.scm
+ -o concurrent-native-callbacks-compile-time.so))
("concurrent-native-callbacks-compile-time.import.so"
("concurrent-native-callbacks-compile-time.so")
- (run (csc -s -O3 -d0
+ (compile -s -O3 -d0
concurrent-native-callbacks-compile-time.import.scm)))
- ("test1"
- ("simple-test.c"
- "cncb-simple-test.scm"
- "concurrent-native-callbacks.import.so")
- (run (csc ;-k -C -g
- simple-test.c -o test1
- -C -Wno-unused-result
- cncb-simple-test.scm -e
- -L$HOME/lib -lchicken -lpthread)))
- ("test2" ("hammering.c"
- "cncb-simple-test.scm"
- "concurrent-native-callbacks.import.so")
- (run (csc ;-k -C -g
- hammering.c -o test2
- -C -Wno-unused-result
- cncb-simple-test.scm -e
- -L$HOME/lib -lchicken -lpthread)))
- ("test3" ("hammering.c"
- "cncb-simple-test.scm"
- "concurrent-native-callbacks.import.so")
- (run (csc ;-k -C -g
- hammering.c -o test3
- -C -Wno-unused-result
- -feature main-dispatcher
- cncb-simple-test.scm -e
- -L$HOME/lib -lchicken -lpthread))))
args))
(for-each
(match-lambda
("clean"
- (run (rm -f *.so *.import.* test1 test2 a.out *.o)))
+ (run (rm -f *.so *.import.* a.out *.o)))
("all"
(build
'("concurrent-native-callbacks.so"
"concurrent-native-callbacks.import.so"
"concurrent-native-callbacks-compile-time.so"
- "concurrent-native-callbacks-compile-time.import.so"
- "test1"
- "test2"
- "test3")))
+ "concurrent-native-callbacks-compile-time.import.so")))
(arg (build (list arg))))
(let ((args (command-line-arguments)))
(if (null? args)
View
14 cncb-simple-test.scm → tests/cncb-simple-test.scm
@@ -15,13 +15,7 @@
(print* "_")
(thread-sleep! 0.25))))
-(cond-expand
- (main-dispatcher
- (print "dispatching from primordial thread...")
- (dispatch))
- (else
- (print "started")
- (thread-sleep! 1000000)
- (print "timeout") ) )
-
-(return-to-host) ; should not execute
+(print "dispatching...")
+(dispatch)
+(print "done")
+(return-to-host)
View
0 hammering.c → tests/hammering.c
File renamed without changes.
View
24 tests/run.scm
@@ -1,5 +1,21 @@
-(use shell)
+(use shell make)
-(run (../test1))
-(run (../test2 10 10))
-(run (../test3 10 10))
+(make (("test1"
+ ("simple-test.c"
+ "cncb-simple-test.scm")
+ (run (csc ;-k -C -g
+ simple-test.c -o test1
+ -C -Wno-unused-result
+ cncb-simple-test.scm -e
+ -lpthread)))
+ ("test2" ("hammering.c"
+ "cncb-simple-test.scm")
+ (run (csc ;-k -C -g
+ hammering.c -o test2
+ -C -Wno-unused-result
+ cncb-simple-test.scm -e
+ -lpthread))))
+ '("test1" "test2" "test3"))
+
+(run (./test1))
+(run (./test2 10 10))
View
0 simple-test.c → tests/simple-test.c
File renamed without changes.

0 comments on commit 4061182

Please sign in to comment.
Something went wrong with that request. Please try again.