diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2017-02-20 00:05:25 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2017-02-20 00:05:25 -0800 |
commit | 3278b75942bdbe706f7a0fba87729bb1e935b68b (patch) | |
tree | dcad4048dfc0b38367047426b2b14501bf5ff257 /build | |
parent | db04688faa20f3576257c0fe41752ec435beab9a (diff) | |
download | scm-upstream/5d2.tar.gz scm-upstream/5d2.zip |
Import Upstream version 5d2upstream/5d2
Diffstat (limited to 'build')
-rwxr-xr-x | build | 72 |
1 files changed, 68 insertions, 4 deletions
@@ -1,10 +1,70 @@ #!/bin/sh :;exec scmlit -f $0 -e"(bi)" build $* -(require 'build) +(require (in-vicinity (program-vicinity) "build.scm")) (require 'getopt) (require 'getopt-parameters) +(define (make-features-txi) + (call-with-output-file "features.txi" + (lambda (port) + ((((build 'open-table) 'features #f) 'for-each-row) + (lambda (row) + (apply (lambda (name spec documentation) + (display "@item " port) (display name port) (newline port) + (display "@cindex " port) (display name port) (newline port) + (display documentation port) (newline port) (newline port)) + row)))))) + +(define (print-manifest port) + (display "@multitable @columnfractions .22 .78" port) (newline port) + ((((build 'open-table) 'manifest #f) 'for-each-row) + (lambda (row) + (apply (lambda (file format category documentation) + (display (string-append "@item @code{" file) port) + (display "}" port) (newline port) + (display (string-append "@tab " documentation) port) + (newline port)) + row))) + (display "@end multitable" port) (newline port)) + +(define (append-info-node path node afile) + (let ((cat (open-file afile "a"))) + (do ((n (+ -1 2) (+ -1 n))) + ((negative? n) (close-port cat)) + (newline cat))) + (system (string-append "info -f " path " -n '" node "' -o - >> " afile))) + +(define (make-readme) + (require 'posix) + (let ((pipe (open-output-pipe "makeinfo --no-headers -o README")) + (scm-info (read-version + (in-vicinity (implementation-vicinity) "patchlvl.h")))) + (if (not pipe) (slib:error 'make-readme 'couldn't 'open 'pipe)) + (display "\ +This directory contains the distribution of scm" pipe) + (display scm-info pipe) + (display ". Scm conforms to +Revised^5 Report on the Algorithmic Language Scheme and the IEEE P1178 +specification. SCM runs under Amiga, Atari-ST, MacOS, MS-DOS, OS/2, +NOS/VE, Unicos, VMS, Unix and similar systems. + +@center @url{http://swissnet.ai.mit.edu/~jaffer/SCM.html} + +@section Manifest +" + pipe) + (print-manifest pipe) + (close-port pipe) + (set! scm-info (string-append "scm" scm-info ".info")) + (append-info-node scm-info "SLIB" "README") + (append-info-node scm-info "Making SCM" "README") + (append-info-node scm-info "Editing Scheme Code" "README") + (append-info-node scm-info "Problems Compiling" "README") + (append-info-node scm-info "Problems Linking" "README") + (append-info-node scm-info "Problems Running" "README") + (append-info-node scm-info "Testing" "README"))) + (define (build-from-argv argv) (cond ((string? argv) (require 'read-command) @@ -22,8 +82,12 @@ (let* ((params (getopt->parameter-list argc argv options arities types aliases)) (fparams (fill-empty-parameters defaulters params))) - (cond ((not (list? params)) #f) - ((not (check-parameters checks fparams)) #f) + (cond ((not (list? params)) + (slib:warn 'build-from-argv 'not-parameters? fparams) + #f) + ((not (check-parameters checks fparams)) + (slib:warn 'build-from-argv 'check-parameters 'failed) + #f) ((not (check-arities (map arity->arity-spec arities) fparams)) (slib:error 'build-from-argv "arity error" fparams) #f) (else (comval fparams)))))))))) @@ -48,7 +112,7 @@ (display "build> ") (force-output))) -(define (bi) (build-from-argv *argv*)) +(define (bi) (if (build-from-argv *argv*) #t (exit #f))) (cond (*interactive* (display "type (b \"build <command-line>\") to build") (newline) |