Gauche > Archives > 2012/01/27

2012/01/27 04:19:03 UTCkirill
#
hi all!
#
is shire around?
#
shiro*
#
silly autocorrect...
2012/01/27 04:21:59 UTCshiro
#
yeah
#
I made quite a progress on out-of-srcdir build. Only one more test to make it work.
2012/01/27 04:26:12 UTCkirill
#
I see
#
so you don't specify --srcdir= ... in the configure line?
#
because I found that without srcdir it doesn't get very far
#
does your out-of-src build generate all files in the external dir, or does it still generate files in the src dir?
2012/01/27 04:27:53 UTCshiro
#
Currenly what I do is just run configure script (which is in srcdir) from build dir. No --srcdir option. And I made some changes in various scripts so that generated files always go to build dir.
2012/01/27 04:28:06 UTCkirill
#
right, that would be nice =)
#
so should I wait for you to finish this, then?
2012/01/27 04:29:02 UTCshiro
#
If you can, yes... if you don't mind a test failure in the script test (gauche-package), I might be able to commit it pretty soon.
2012/01/27 04:29:23 UTCkirill
#
I'm assuming it won't take long to fix this last test?
2012/01/27 04:30:21 UTCshiro
#
I don't think it takes long, but it's tricky. I'm sure I can fix it tonight (it's 6:30pm here).
2012/01/27 04:31:17 UTCkirill
#
I'll just wait... no need to make you push stuff before it's done
#
although a heads up
#
xlink has an infinite loop bug when dealing with absolute paths, I think
#
the make-directory* function in particular.
#
you probably had to fix this as part of the out-of-tree build work.
2012/01/27 04:33:38 UTCshiro
#
Hm, I didn't stumbled on it. But it's good to fix it as well. Could you just paste the patch here, or put it elsewhere (e.g. gist.github.com) and I'll try to merge it.
2012/01/27 04:34:48 UTCkirill
#
sec
2012/01/27 04:35:12 UTCshiro
#
My xlink has been modified to handle the cases both the actual file is either in srcdir or in builddir.
2012/01/27 04:35:23 UTCkirill
#
this should do it:
#
diff --git a/ext/xlink b/ext/xlink
index 9bd5541..283e038 100644
--- a/ext/xlink
+++ b/ext/xlink
@@ -91,7 +91,7 @@
 
 (define (make-directory* dir)
   (let1 up (sys-dirname dir)
-    (unless (equal? up ".")
+    (unless (member up '("/" "."))
       (make-directory* up)
       (unless (file-exists? dir)
         (sys-mkdir dir #o755)))))
2012/01/27 04:36:06 UTCshiro
#
Ah! I see. Thanks!
2012/01/27 04:36:31 UTCkirill
#
I'm personally a little bit confused as to why we recurse anyway... I imagine that once you reach a directory that exists, there's no need to continue recursion?
#
ah sorry, I was reading it backwards =)
#
but yeah, the fix still applies.
2012/01/27 04:38:11 UTCshiro
#
Yup. (sys-dirname "/") => "/" and recursion happens before existense check, so your fix is valid.
#
I'll be offline for a couple of hours. I'll shoot you email once I'm done.
2012/01/27 04:41:48 UTCkirill
#
thanks for your help
2012/01/27 13:20:42 UTCkoguro
#
なんかWiLiKiに書き込めないようなので、ちょっとこっちで。
#
--- a/lib/util/stream.scm
+++ b/lib/util/stream.scm
@@ -513,10 +513,10 @@
 
 (define (stream-count pred . strs)
   (let loop ((times 0) (s strs))
-    (if (any stream-null? strs)
+    (if (any stream-null? s)
       times
-      (loop (+ times (if (apply pred (map stream-car strs)) 1 0))
-            (map stream-cdr strs)))))
+      (loop (+ times (if (apply pred (map stream-car s)) 1 0))
+            (map stream-cdr s)))))
#
stream-countってこうですよね?
2012/01/27 13:32:10 UTCshiro
#
ありゃ、今のだと無限ループしちゃいますね。WiLiKiに書き込めないのは、多分そのページにspamリンクがまだ残ってるせいじゃないかな (リンク自体はblacklistしたので、そのリンクが含まれてると書き込めない)。後で一括して消すつもりだけど書き込む際に消していただいてもいいです。
#
多段ビルドしてるとout-of-source-tree buildさせるのが面倒だなあ。