Skip to content

Commit

Permalink
Added .externals, autoplanet.ss and build.ss.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dave Gurnell committed Jun 15, 2010
1 parent c3d18f4 commit 0fd4bab
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .externals
@@ -0,0 +1,12 @@
[.]
scm = svn

[planetdev/unlib]
path = planetdev/unlib
repository = git://github.com/untyped/unlib.git
scm = git

[planetdev/mirrors]
path = planetdev/mirrors
repository = git://github.com/untyped/mirrors.git
scm = git
12 changes: 12 additions & 0 deletions autoplanet.ss
@@ -0,0 +1,12 @@
#lang scheme

(require scheme/runtime-path
(planet untyped/autoplanet:1))

(define-runtime-path dev-path
"planetdev")

(remove-hard-links)

(install-local "owner" "unlib.plt" 3 99 (build-path dev-path "unlib"))
(install-local "owner" "mirrors.plt" 2 99 (build-path dev-path "mirrors"))
56 changes: 56 additions & 0 deletions build.ss
@@ -0,0 +1,56 @@
#!/usr/bin/env mzscheme -q
#lang scheme

(require scheme/runtime-path
scheme/system)

; Configuration ----------------------------------

; string
(define plt-version "4.2.1.5")

; path
(define-runtime-path planet-path "planet")

; Tasks ------------------------------------------

(define (env)
(putenv "PLTVERSION" plt-version)
(putenv "PLTPLANETDIR" (path->string planet-path)))

(define (autoplanet)
(env)
(system "mzscheme autoplanet.ss"))

(define (envvars)
(autoplanet)
(let ([path (make-temporary-file "mzscheme-envvars-~a.sh")])
(with-output-to-file path
(lambda ()
(printf #<<ENDSCRIPT
export PLTVERSION=~a
export PLTPLANETDIR="~a"

ENDSCRIPT
plt-version
(path->string planet-path)))
#:exists 'replace)
(display (path->string path))))

(define (compile)
(autoplanet)
(system "mzc -v main.ss"))

(define (test-compile)
(autoplanet)
(system "mzc -v run-tests.ss"))

(define (test)
(test-compile)
(system "mzscheme run-tests.ss"))

(match (vector-ref (current-command-line-arguments) 0)
["envvars" (envvars)]
["compile" (compile)]
["test-compile" (test-compile)]
["test" (test)])

0 comments on commit 0fd4bab

Please sign in to comment.