[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-hackers] chicken-install bug: does not copy all folders when cr

From: Kristian Lein-Mathisen
Subject: [Chicken-hackers] chicken-install bug: does not copy all folders when cross-compiling
Date: Thu, 15 Oct 2015 13:33:59 +0200

Hi dear chickeners!

We have a really nice macro[1] that runs "git describe --tags" and produces string-output of our current version at compile-time. This method is (when not cross-compiling) very robust because it doesn't use any temporary files to store the current version etc. We like this method a lot, but it doesn't work when cross compiling, because of this:

installing for target ...
cp -r egg-dir/* /tmp/temp-123

Copying * doesn't include .git and thus our `git describe`-running macro doesn't work. I really don't know how to properly solve this!

- Adding cp -r egg-dir/.* won't work since it will include ../ 
- We could use `cp -rT egg-dir/ /tmp/temp-123` will work for me but probably not portable:

diff --git a/chicken-install.scm b/chicken-install.scm
index 2df88c8..586bed4 100644
--- a/chicken-install.scm
+++ b/chicken-install.scm
@@ -612,8 +612,8 @@
                 (print "copying sources for target installation")
                  "~a ~a ~a"
-                 (if *windows-shell* "xcopy" "cp -r")
-                 (make-pathname eggdir "*")
+                 (if *windows-shell* "xcopy" "cp -rT")
+                 eggdir
               (let ((setup
                      (lambda (dir)

Any ideas on how we might be able to solve this properly?


[1] simple macro for getting git version, won't work on target
         (lambda (x e t)
           (import posix)
            (with-input-from-pipe "git describe --tags --always"

reply via email to

[Prev in Thread] Current Thread [Next in Thread]