Makefile: refine support for building an installer from a site

original commit: 1260dd6b2ecdb90789c8e347f94249be8acbe564
This commit is contained in:
Matthew Flatt 2014-03-10 16:57:16 -06:00
parent 45d71521fd
commit 9b579f598d
2 changed files with 7 additions and 4 deletions

View File

@ -30,11 +30,13 @@
[("--mac-pkg") "Create a \".pkg\" installer on Mac OS X" [("--mac-pkg") "Create a \".pkg\" installer on Mac OS X"
(set! mac-pkg? #t)] (set! mac-pkg? #t)]
[("--upload") url "Upload installer" [("--upload") url "Upload installer"
(set! upload-to url)] (unless (string=? url "")
(set! upload-to url))]
[("--desc") desc "Description to accompany upload" [("--desc") desc "Description to accompany upload"
(set! upload-desc desc)] (set! upload-desc desc)]
[("--readme") readme "URL for README.txt to include" [("--readme") readme "URL for README.txt to include"
(set! download-readme readme)] (unless (string=? readme "")
(set! download-readme readme))]
#:args #:args
(human-name base-name dir-name dist-suffix sign-identity) (human-name base-name dir-name dist-suffix sign-identity)
(values human-name (values human-name
@ -81,7 +83,7 @@
(printf "Upload ~a to ~a\n" installer-file upload-to) (printf "Upload ~a to ~a\n" installer-file upload-to)
(define i (define i
(put-pure-port (put-pure-port
(string->url (format "~aupload/~a" (string->url (format "~a~a"
upload-to upload-to
(path->string (file-name-from-path installer-file)))) (path->string (file-name-from-path installer-file))))
(file->bytes installer-file) (file->bytes installer-file)

View File

@ -338,7 +338,8 @@
(q "--source --no-setup") (q "--source --no-setup")
(q "")) (q ""))
" MAC_PKG_MODE=" (if mac-pkg? "--mac-pkg" (q "")) " MAC_PKG_MODE=" (if mac-pkg? "--mac-pkg" (q ""))
" README=" (q (file-name-from-path readme)))) " UPLOAD=http://" server ":" server-port "/upload/"
" README=http://" server ":" server-port "/" (q (file-name-from-path readme))))
(define (unix-build c platform host port user server server-port repo clean? pull? readme) (define (unix-build c platform host port user server server-port repo clean? pull? readme)
(define dir (get-path-opt c '#:dir "build/plt" #:localhost (current-directory))) (define dir (get-path-opt c '#:dir "build/plt" #:localhost (current-directory)))