build: Have configure create a git archive.

* configure: Create git archive if necessary.
This commit is contained in:
Jan Nieuwenhuizen 2018-07-09 09:57:15 +02:00
parent ec7d9f5d57
commit c997abcae8
No known key found for this signature in database
GPG Key ID: F3C1A0D9C1D65273
2 changed files with 10 additions and 2 deletions

8
configure vendored
View File

@ -20,7 +20,7 @@ cat <<EOF
not found
Missing dependencies, run
sudo apt-get install guile-2.2
sudo apt-get install guile-2.2-dev
EOF
exit 1
fi
@ -309,6 +309,12 @@ Some influential environment variables:
(check-version "nyacc" '(0 80 41) #:command (string-append GUILE " -c '(use-modules (nyacc lalr)) (display *nyacc-version*)'"))
(check-version "bash" '(4 0))
(when (and (check-version "git" '(2 0) #:optional? #t)
(not (file-exists? ".git")))
;; Debian wants to run `make clean' from a tarball
(and (zero? (system* "git" "init"))
(zero? (system* "git" "add" "."))
(zero? (system* "git" "commit" "-m" "Import mes"))))
(when (and (not (member ARCH '("i686" "x86_64"))) (not with-courage?))
(stderr "platform not supported: ~a, try --with-courage\n" ARCH)
(exit 1))

View File

@ -53,6 +53,7 @@
(gnu packages man)
(gnu packages mes)
(gnu packages package-management)
(gnu packages version-control)
(gnu packages perl)
(gnu packages texinfo)
((guix build utils) #:select (with-directory-excursion))
@ -147,7 +148,8 @@ hex2 linker.")
`(("mescc-tools" ,mescc-tools)
("nyacc" ,nyacc-for-mes)))
(native-inputs
`(("guile" ,guile-2.2)
`(("git" ,git)
("guile" ,guile-2.2)
,@(if (string-prefix? "x86_64-linux" (or (%current-target-system)
(%current-system)))
;; Use cross-compiler rather than #:system "i686-linux" to get