From 0b82d376fa6b991a971236e7e988c7ffc3c41a98 Mon Sep 17 00:00:00 2001 From: retropikzel Date: Fri, 7 Nov 2025 14:41:03 +0200 Subject: [PATCH] Making the manual page --- compile-scheme.scm | 4 ++++ doc/compile-scheme.1 | 18 ++++++++++++++---- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/compile-scheme.scm b/compile-scheme.scm index 6b31452..59d0283 100644 --- a/compile-scheme.scm +++ b/compile-scheme.scm @@ -9,6 +9,10 @@ (libs library-util) (srfi 170)) +(when (member "--help" (command-line)) + (newline) + (exit 0)) + (when (or (member "--list-r6rs" (command-line)) (member "--list-r6rs-schemes" (command-line))) (for-each (lambda (scheme) (display scheme) (display " ")) r6rs-schemes) diff --git a/doc/compile-scheme.1 b/doc/compile-scheme.1 index cad7d6e..fdd2b39 100644 --- a/doc/compile-scheme.1 +++ b/doc/compile-scheme.1 @@ -2,7 +2,12 @@ .SH NAME compile-scheme \- Compiling Scheme programs to executables .SH SYNOPSIS -\fBcompile-scheme\fR { [\fB-A\fR \fIpath\fR] [\fB-I\fR \fIpath\fR] [\fB-o\fR \fIpath\fR] [\fB-t\fR \fItarget\fR] \fIinput-file\fR{\fI.scm\fR | \fI.sps\fR} | \fIlong-option\fR } +.P +\fBcompile-scheme\fR [\fB-A\fR \fIpath\fR] [\fB-I\fR \fIpath\fR] [\fB-o\fR \fIpath\fR] [\fB-t\fR \fItarget\fR] \fIinput-file.sps\fR +.P +\fBcompile-scheme\fR [\fB-A\fR \fIpath\fR] [\fB-I\fR \fIpath\fR] [\fB-o\fR \fIpath\fR] [\fB-t\fR \fItarget\fR] \fIinput-file.scm\fR +.P +\fBcompile-scheme\fR \fIlong-option\fR .SH DESCRIPTION .P \fBcompile-scheme\fR is a tool to compile R6RS and R7RS Scheme programs. @@ -81,6 +86,11 @@ Not all implementations support adding to beginning or end of load path so -I an .IP Only supports one input-file. .SH EXAMPLES - - - +.P +Compile single R6RS file with all dependencies in the same folder. +.IP +COMPILE_SCHEME= compile-scheme main.sps +.P +Compile single R7RS file with all dependencies in the same folder. +.IP +COMPILE_SCHEME= compile-scheme main.scm