Cleanup, more build options

This commit is contained in:
retropikzel 2025-10-01 21:55:38 +03:00
parent 8cbdf9193d
commit 79c8399857
3 changed files with 7 additions and 4 deletions

View File

@ -1,5 +1,5 @@
FROM debian:trixie-slim AS build
RUN apt-get update && apt-get install -y make gcc gcc chicken-bin git
RUN apt-get update && apt-get install -y make gcc chicken-bin git
RUN chicken-install r7rs
WORKDIR /build
@ -21,4 +21,4 @@ RUN make PREFIX=/opt/compile-r7rs install
FROM debian:trixie-slim
COPY --from=build /opt/compile-r7rs /opt/compile-r7rs
ENV PATH=/opt/compile-r7rs:${PATH}
ENV PATH=/opt/compile-r7rs/bin:${PATH}

View File

@ -21,4 +21,4 @@ RUN make PREFIX=/opt/compile-r7rs install
FROM alpine
COPY --from=build /opt/compile-r7rs /opt/compile-r7rs
ENV PATH=/opt/compile-r7rs:${PATH}
ENV PATH=/opt/compile-r7rs/bin:${PATH}

View File

@ -27,7 +27,10 @@
(define scheme (if (get-environment-variable "COMPILE_R7RS")
(string->symbol (get-environment-variable "COMPILE_R7RS"))
#f))
(when (not scheme) (error "Environment variable COMPILE_R7RS not set."))
(when (not scheme)
(display "Environment variable COMPILE_R7RS not set." (current-error-port))
(newline (current-error-port))
(exit 1))
(when (not (assoc scheme data)) (error "Unsupported implementation" scheme))
(define compilation-target (if (get-environment-variable "TARGET")
(get-environment-variable "TARGET")