Header is now added to master interfaces.

This commit is contained in:
Anthony Carrico 2003-01-29 16:58:34 +00:00
parent f7a25bd47a
commit a6505ef990
3 changed files with 24 additions and 14 deletions

View File

@ -21,16 +21,16 @@ s48 : $(s48-targets)
scsh : $(scsh-targets)
s48-interfaces.scm : $(s48-interfaces)
cat $(s48-interfaces) > s48-interfaces.scm
cat build/header.scm $(s48-interfaces) > s48-interfaces.scm
s48-packages.scm : $(s48-packages)
build/xpackages.scm s48-packages.scm $(s48-packages)
build/xpackages.scm s48-packages.scm build/header.scm $(s48-packages)
interfaces.scm : $(s48-interfaces) $(scsh-interfaces)
cat $(s48-interfaces) $(scsh-interfaces) > interfaces.scm
cat build/header.scm $(s48-interfaces) $(scsh-interfaces) > interfaces.scm
packages.scm : $(s48-packages) $(scsh-packages)
build/xpackages.scm packages.scm $(s48-packages) $(scsh-packages)
build/xpackages.scm packages.scm build/header.scm $(s48-packages) $(scsh-packages)
.PHONY : clean
clean :

3
build/header.scm Normal file
View File

@ -0,0 +1,3 @@
;;; This file was automatically generated by the sunterlib
;;; makefile, so do not edit it.

View File

@ -30,10 +30,17 @@ exec scsh -o filenames -o pp -s "$0" "$@"
;;; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
;;; THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
(define header-message
";; This file was automatically generated by the sunterlib
;; makefile, so do not edit it.
")
(define copy-header
(lambda (header)
(with-current-input-port
(open-input-file header)
(let loop ()
(let ((ch (read-char)))
(if (eof-object? ch)
(values)
(begin
(write-char ch)
(loop))))))))
(define process-source
(lambda (source)
@ -81,14 +88,14 @@ exec scsh -o filenames -o pp -s "$0" "$@"
(error "unexpected form in packages" source form))))))))
(define xpackages
;; Copy each source file to the target file, adding the source
;; directory to each package's file-specs.
(lambda (target sources)
;; Copy the header and each source file to the target file, adding
;; the source directory to each package's file-specs.
(lambda (target header sources)
(with-current-output-port
(open-output-file target)
(display header-message)
(newline)
(copy-header header)
(for-each process-source sources))))
(xpackages (car command-line-arguments)
(cdr command-line-arguments))
(cadr command-line-arguments)
(cddr command-line-arguments))