2016-10-15 22:34:23 +00:00
|
|
|
#! /bin/sh
|
|
|
|
# -*- scheme -*-
|
|
|
|
unset LANG LC_ALL
|
|
|
|
echo -n "checking for guile..."
|
2018-05-20 22:06:39 +00:00
|
|
|
GUILE=$(command -v ${GUILE-guile})
|
|
|
|
GUIX=$(command -v ${GUIX-guix})
|
2018-05-06 06:46:32 +00:00
|
|
|
export GUILE GUIX
|
2016-10-15 22:34:23 +00:00
|
|
|
if [ -x "$GUILE" ]; then
|
|
|
|
echo " $GUILE"
|
2018-05-06 06:46:32 +00:00
|
|
|
elif [ -x "$GUIX" ]; then
|
2016-10-15 22:34:23 +00:00
|
|
|
cat <<EOF
|
2018-05-06 06:46:32 +00:00
|
|
|
not found
|
|
|
|
Missing dependencies, run
|
|
|
|
|
|
|
|
guix environment -l guix.scm
|
|
|
|
EOF
|
|
|
|
exit 1
|
|
|
|
else
|
|
|
|
cat <<EOF
|
|
|
|
not found
|
2016-10-15 22:34:23 +00:00
|
|
|
Missing dependencies, run
|
|
|
|
|
2018-07-09 07:57:15 +00:00
|
|
|
sudo apt-get install guile-2.2-dev
|
2016-10-15 22:34:23 +00:00
|
|
|
EOF
|
|
|
|
exit 1
|
|
|
|
fi
|
2018-05-27 04:59:36 +00:00
|
|
|
exec ${GUILE-guile} -L . --no-auto-compile -e '(configure)' -s "$0" ${1+"$@"}
|
2016-10-15 22:34:23 +00:00
|
|
|
!#
|
|
|
|
|
|
|
|
;;; Mes --- Maxwell Equations of Software
|
2017-11-21 18:22:26 +00:00
|
|
|
;;; Copyright © 2016,2017,2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
2016-10-15 22:34:23 +00:00
|
|
|
;;;
|
|
|
|
;;; configure: This file is part of Mes.
|
|
|
|
;;;
|
|
|
|
;;; Mes is free software; you can redistribute it and/or modify it
|
|
|
|
;;; under the terms of the GNU General Public License as published by
|
|
|
|
;;; the Free Software Foundation; either version 3 of the License, or (at
|
|
|
|
;;; your option) any later version.
|
|
|
|
;;;
|
|
|
|
;;; Mes is distributed in the hope that it will be useful, but
|
|
|
|
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
;;; GNU General Public License for more details.
|
|
|
|
;;;
|
|
|
|
;;; You should have received a copy of the GNU General Public License
|
|
|
|
;;; along with Mes. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
(define-module (configure)
|
2018-05-06 06:46:32 +00:00
|
|
|
#:use-module (srfi srfi-26)
|
2016-10-15 22:34:23 +00:00
|
|
|
#:use-module (ice-9 and-let-star)
|
|
|
|
#:use-module (ice-9 curried-definitions)
|
|
|
|
#:use-module (ice-9 getopt-long)
|
|
|
|
#:use-module (ice-9 match)
|
|
|
|
#:use-module (ice-9 optargs)
|
|
|
|
#:use-module (ice-9 popen)
|
2018-05-20 22:06:39 +00:00
|
|
|
#:use-module (ice-9 rdelim)
|
|
|
|
#:export (main))
|
2016-10-15 22:34:23 +00:00
|
|
|
|
|
|
|
(define *shell* "sh")
|
|
|
|
(define PACKAGE "mes")
|
2018-07-09 14:44:06 +00:00
|
|
|
(define VERSION "0.16.1")
|
2016-10-15 22:34:23 +00:00
|
|
|
(define GUILE (or (getenv "guile") "guile"))
|
2018-07-09 08:46:28 +00:00
|
|
|
(define GUILE_EFFECTIVE_VERSION (effective-version))
|
|
|
|
|
|
|
|
(define prefix "/usr/local")
|
|
|
|
(define infodir "${prefix}/share/info")
|
|
|
|
(define mandir "${prefix}/share/man")
|
|
|
|
(define sysconfdir "${prefix}/etc")
|
2016-10-15 22:34:23 +00:00
|
|
|
|
|
|
|
;;; Utility
|
|
|
|
(define (logf port string . rest)
|
|
|
|
(apply format (cons* port string rest))
|
|
|
|
(force-output port)
|
|
|
|
#t)
|
|
|
|
|
|
|
|
(define (stderr string . rest)
|
|
|
|
(apply logf (cons* (current-error-port) string rest)))
|
|
|
|
|
|
|
|
(define (stdout string . rest)
|
|
|
|
(apply logf (cons* (current-output-port) string rest)))
|
|
|
|
|
2017-04-12 19:27:59 +00:00
|
|
|
(define *verbose?* #f)
|
|
|
|
|
|
|
|
(define (verbose string . rest)
|
|
|
|
(if *verbose?* (apply stderr (cons string rest))))
|
|
|
|
|
|
|
|
(define (gulp-pipe command)
|
|
|
|
(let* ((port (open-pipe* OPEN_READ *shell* "-c" command))
|
|
|
|
(output (read-string port))
|
|
|
|
(status (close-pipe port)))
|
|
|
|
(verbose "command[~a]: ~s => ~a\n" status command output)
|
|
|
|
(if (not (zero? status)) "" (string-trim-right output #\newline))))
|
|
|
|
|
2016-10-15 22:34:23 +00:00
|
|
|
(define* ((->string #:optional (infix "")) h . t)
|
|
|
|
(let ((o (if (pair? t) (cons h t) h)))
|
|
|
|
(match o
|
|
|
|
((? char?) (make-string 1 o))
|
|
|
|
((? number?) (number->string o))
|
|
|
|
((? string?) o)
|
|
|
|
((? symbol?) (symbol->string o))
|
|
|
|
((h ... t) (string-join (map (->string) o) ((->string) infix)))
|
|
|
|
(_ ""))))
|
|
|
|
|
|
|
|
(define (tuple< a b)
|
|
|
|
(cond
|
|
|
|
((and (null? a) (null? b)) #t)
|
|
|
|
((null? a) (not (null? b)))
|
|
|
|
((null? b) #f)
|
|
|
|
((and (not (< (car a) (car b)))
|
|
|
|
(not (< (car b) (car a))))
|
|
|
|
(tuple< (cdr a) (cdr b)))
|
|
|
|
(else (< (car a) (car b)))))
|
|
|
|
|
|
|
|
(define (tuple<= a b)
|
|
|
|
(or (equal? a b) (tuple< a b)))
|
|
|
|
|
|
|
|
;;; Configure
|
|
|
|
(define (version->string version)
|
|
|
|
((->string '.) version))
|
|
|
|
|
|
|
|
(define (string->version string)
|
|
|
|
(and-let* ((version (string-tokenize string
|
|
|
|
(char-set-adjoin char-set:digit #\.)))
|
|
|
|
((pair? version))
|
2017-04-02 16:50:07 +00:00
|
|
|
(version (sort version (lambda (a b) (> (string-length a) (string-length b)))))
|
2016-10-15 22:34:23 +00:00
|
|
|
(version (car version))
|
|
|
|
(version (string-tokenize version
|
|
|
|
(char-set-complement (char-set #\.)))))
|
|
|
|
(map string->number version)))
|
|
|
|
|
2018-05-20 22:06:39 +00:00
|
|
|
(define* (PATH-search-path name #:key (default name) warn?)
|
|
|
|
(or (search-path (string-split (getenv "PATH") #\:) name)
|
|
|
|
(and (and warn? (format (current-error-port) "warning: not found: ~a\n" name))
|
|
|
|
default)))
|
|
|
|
|
2017-06-19 10:01:19 +00:00
|
|
|
(define optional '())
|
2016-10-15 22:34:23 +00:00
|
|
|
(define required '())
|
2017-05-07 08:04:32 +00:00
|
|
|
(define* (check-version name expected
|
|
|
|
#:key
|
2017-06-19 10:01:19 +00:00
|
|
|
optional?
|
2016-10-15 22:34:23 +00:00
|
|
|
(deb #f)
|
|
|
|
(version-option '--version)
|
2017-05-07 08:04:32 +00:00
|
|
|
(compare tuple<=)
|
|
|
|
(command name))
|
2018-05-20 22:06:39 +00:00
|
|
|
(stderr "checking for ~a~a..." (basename name)
|
2016-10-15 22:34:23 +00:00
|
|
|
(if (null? expected) ""
|
|
|
|
(format #f " [~a]" (version->string expected))))
|
2017-04-12 19:27:59 +00:00
|
|
|
(let* ((output (gulp-pipe (format #f "~a ~a 2>&1" command version-option)))
|
|
|
|
(actual (string->version output))
|
2018-05-20 22:06:39 +00:00
|
|
|
(pass? (and actual (compare expected actual)))
|
|
|
|
;(pass? (PATH-search-path command))
|
|
|
|
)
|
2016-10-15 22:34:23 +00:00
|
|
|
(stderr "~a ~a\n" (if pass? (if (pair? actual) "" " yes")
|
|
|
|
(if actual " no, found" "")) (version->string actual))
|
2017-04-12 19:27:59 +00:00
|
|
|
(or pass?
|
2017-06-19 10:01:19 +00:00
|
|
|
(if (not (pair? name)) (begin (if optional? (set! optional (cons (or deb name) optional))
|
|
|
|
(set! required (cons (or deb name) required)))
|
|
|
|
pass?)
|
2017-05-07 08:04:32 +00:00
|
|
|
(check-version (cdr name) expected deb version-option compare)))))
|
2016-10-15 22:34:23 +00:00
|
|
|
|
|
|
|
(define* (check-pkg-config package expected #:optional (deb #f))
|
|
|
|
(check-version (format #f "pkg-config --modversion ~a" package) expected deb))
|
|
|
|
|
2017-05-14 07:03:06 +00:00
|
|
|
(define (check-compile-header-c header)
|
|
|
|
(and (= 0 (system (format #f "echo '#include ~s' | gcc -E - > /dev/null 2>&1" header)))
|
|
|
|
'yes))
|
|
|
|
|
2016-10-15 22:34:23 +00:00
|
|
|
(define (check-compile-header-c++ header)
|
2017-05-14 07:03:06 +00:00
|
|
|
(and (= 0 (system (format #f "echo '#include ~s' | gcc --language=c++ --std=c++11 -E - > /dev/null 2>&1" header)))
|
2016-10-15 22:34:23 +00:00
|
|
|
'yes))
|
|
|
|
|
2017-05-14 07:03:06 +00:00
|
|
|
(define* (check-header-c header deb #:optional (check check-compile-header-c))
|
2016-10-15 22:34:23 +00:00
|
|
|
(stderr "checking for ~a..." header)
|
|
|
|
(let ((result (check header)))
|
|
|
|
(stderr " ~a\n" (if result result "no"))
|
|
|
|
(if (not result)
|
|
|
|
(set! required (cons deb required)))))
|
|
|
|
|
2017-05-14 07:03:06 +00:00
|
|
|
(define* (check-header-c++ header deb #:optional (check check-compile-header-c++))
|
|
|
|
(check-header-c header deb check))
|
|
|
|
|
2016-10-15 22:34:23 +00:00
|
|
|
(define guix?
|
2017-05-14 07:03:06 +00:00
|
|
|
(and (zero? (system "guix --version 1>/dev/null 2>/dev/null")) 1))
|
2016-10-15 22:34:23 +00:00
|
|
|
;;;
|
|
|
|
|
|
|
|
(define (parse-opts args)
|
|
|
|
(let* ((option-spec
|
|
|
|
'((build (value #t))
|
2017-04-12 19:27:59 +00:00
|
|
|
(host (value #t))
|
2016-10-15 22:34:23 +00:00
|
|
|
(help (single-char #\h))
|
|
|
|
(prefix (value #t))
|
|
|
|
(sysconfdir (value #t))
|
2017-04-12 19:27:59 +00:00
|
|
|
(verbose (single-char #\v))
|
2017-05-14 07:03:06 +00:00
|
|
|
(with-courage)
|
2018-07-09 08:46:28 +00:00
|
|
|
(infodir (value #t))
|
|
|
|
(mandir (value #t))
|
|
|
|
(disable-silent-rules)
|
|
|
|
|
|
|
|
(enable-fast-install) ; Ignored for Guix
|
|
|
|
(includedir (value #t)) ; Ignored for Debian
|
|
|
|
(mandir (value #t)) ; Ignored for Debian
|
|
|
|
(localstatedir (value #t)) ; Ignored for Debian
|
|
|
|
(libdir (value #t)) ; Ignored for Debian
|
|
|
|
(libexecdir (value #t)) ; Ignored for Debian
|
|
|
|
(runstatedir (value #t)) ; Ignored for Debian
|
|
|
|
(disable-maintainer-mode) ; Ignored for Debian
|
|
|
|
(disable-dependency-tracking) ; Ignored for Debian
|
|
|
|
)))
|
|
|
|
|
2018-06-12 05:05:33 +00:00
|
|
|
(getopt-long args option-spec)))
|
2018-05-06 06:46:32 +00:00
|
|
|
|
|
|
|
(define* (print-help #:optional (port (current-output-port)))
|
|
|
|
(format port "\
|
|
|
|
`configure' configures ~a ~a to adapt to many kinds of systems.
|
|
|
|
|
|
|
|
Usage: ./configure [OPTION]... [VAR=VALUE]
|
|
|
|
|
|
|
|
To assign environment variables (e.g., CC, CFLAGS...), specify them as
|
|
|
|
VAR=VALUE. See below for descriptions of some of the useful variables.
|
|
|
|
|
|
|
|
Defaults for the options are specified in brackets.
|
|
|
|
|
|
|
|
Options:
|
2016-10-15 22:34:23 +00:00
|
|
|
-h, --help display this help
|
2017-04-12 19:27:59 +00:00
|
|
|
--build=BUILD configure for building on BUILD [guessed]
|
2018-07-09 08:46:28 +00:00
|
|
|
--disable-silent-rules
|
|
|
|
verbose build output [BUILD_DEBUG=1]
|
2017-04-12 19:27:59 +00:00
|
|
|
--host=HOST cross-compile to build programs to run on HOST [BUILD]
|
|
|
|
-v, --verbose be verbose
|
2017-05-14 07:03:06 +00:00
|
|
|
--with-courage assert being courageous to configure for unsupported platform
|
2018-05-06 06:46:32 +00:00
|
|
|
|
|
|
|
Installation directories:
|
2018-07-09 08:46:28 +00:00
|
|
|
--prefix=DIR install in prefix DIR [~a]
|
|
|
|
--infodir=DIR info documentation [PREFIX/share/info]
|
|
|
|
--mandir=DIR man pages [PREFIX/share/man]
|
|
|
|
|
|
|
|
Ignored for Guix:
|
|
|
|
--enable-fast-install
|
|
|
|
|
|
|
|
Ignored for Debian:
|
|
|
|
--disable-dependency-tracking
|
|
|
|
--disable-maintainer-mode
|
|
|
|
--includedir=DIR
|
|
|
|
--libdir=DIR
|
|
|
|
--libexecdir=DIR
|
|
|
|
--localstatedir=DIR
|
|
|
|
--mandir=DIR
|
|
|
|
--runstatedir=DIR
|
2018-05-06 06:46:32 +00:00
|
|
|
|
|
|
|
Some influential environment variables:
|
2018-06-16 04:37:20 +00:00
|
|
|
CC C compiler command
|
|
|
|
CFLAGS C compiler flags
|
|
|
|
CC32 x86 C compiler command
|
2018-07-09 09:49:49 +00:00
|
|
|
CC32_CFLAGS x86 C compiler flags
|
2018-06-16 04:37:20 +00:00
|
|
|
GUILE guile command
|
|
|
|
GUILE_TOOLS guile-tools command
|
2018-07-09 09:49:49 +00:00
|
|
|
MES_CFLAGS MesCC flags
|
2018-06-16 04:37:20 +00:00
|
|
|
MES_SEED location of mes-seed
|
|
|
|
MESCC_TOOLS_SEED location of mescc-tools-seed
|
2018-06-24 07:28:23 +00:00
|
|
|
TCC tcc C compiler command
|
2018-06-16 04:37:20 +00:00
|
|
|
TINYCC_SEED location of tinycc-seed
|
2018-07-09 08:46:28 +00:00
|
|
|
" PACKAGE VERSION (getenv "prefix")))
|
2016-10-15 22:34:23 +00:00
|
|
|
|
|
|
|
(define (main args)
|
2018-05-06 06:46:32 +00:00
|
|
|
(let* ((CC (or (getenv "CC") "gcc"))
|
|
|
|
(BUILD_TRIPLET %host-type)
|
|
|
|
(ARCH (car (string-split BUILD_TRIPLET #\-)))
|
|
|
|
(options (parse-opts args))
|
2016-10-15 22:34:23 +00:00
|
|
|
(build-triplet (option-ref options 'build BUILD_TRIPLET))
|
2017-04-12 19:27:59 +00:00
|
|
|
(host-triplet (option-ref options 'host BUILD_TRIPLET))
|
2018-07-09 08:46:28 +00:00
|
|
|
(prefix (option-ref options 'prefix prefix))
|
|
|
|
(infodir (option-ref options 'infodir infodir))
|
|
|
|
(sysconfdir (option-ref options 'sysconfdir sysconfdir))
|
2017-05-14 07:03:06 +00:00
|
|
|
(verbose? (option-ref options 'verbose #f))
|
2017-07-02 14:25:14 +00:00
|
|
|
(with-courage? (option-ref options 'with-courage #f))
|
2018-07-09 08:46:28 +00:00
|
|
|
(disable-silent-rules? (option-ref options 'disable-silent-rules #f))
|
2018-05-06 06:46:32 +00:00
|
|
|
(make? #f)
|
|
|
|
(vars (filter (cut string-index <> #\=) (option-ref options '() '())))
|
|
|
|
(help? (option-ref options 'help #f)))
|
|
|
|
(for-each (lambda (v) (apply setenv (string-split v #\=))) vars)
|
|
|
|
(let ((CC32 (or (getenv "CC32")
|
|
|
|
(if (member ARCH '("i686" "arm")) (string-append BUILD_TRIPLET "-" CC)
|
|
|
|
"i686-unknown-linux-gnu-gcc")))
|
2018-06-28 21:10:14 +00:00
|
|
|
(HELP2MAN (or (getenv "HELP2MAN") "help2man"))
|
2018-06-24 07:28:23 +00:00
|
|
|
(TCC (or (getenv "TCC") "tcc"))
|
2018-06-27 11:42:47 +00:00
|
|
|
(MAKEINFO (or (getenv "MAKEINFO") "makeinfo"))
|
2018-05-27 04:59:36 +00:00
|
|
|
(GUILE_TOOLS (or (getenv "GUILE_TOOLS") "guile-tools"))
|
|
|
|
(BLOOD_ELF (or (getenv "BLOOD_ELF") "blood-elf"))
|
2018-05-06 06:46:32 +00:00
|
|
|
(HEX2 (or (getenv "HEX2") "hex2"))
|
|
|
|
(M1 (or (getenv "M1") "M1"))
|
|
|
|
(CFLAGS (getenv "CFLAGS"))
|
2018-07-09 09:49:49 +00:00
|
|
|
(CC32_CFLAGS (getenv "CC32_CFLAGS"))
|
2018-05-06 06:46:32 +00:00
|
|
|
(HEX2FLAGS (getenv "HEX2FLAGS"))
|
|
|
|
(M1FLAGS (getenv "M1FLAGS"))
|
2018-07-09 09:49:49 +00:00
|
|
|
(MES_CFLAGS (getenv "MES_CFLAGS"))
|
2018-05-27 04:59:36 +00:00
|
|
|
(MES_SEED (or (getenv "MES_SEED") "../mes-seed"))
|
2018-06-16 04:37:20 +00:00
|
|
|
(MESCC_TOOLS_SEED (or (getenv "MESCC_TOOLS_SEED") "../mescc-tools-seed"))
|
2018-05-27 04:59:36 +00:00
|
|
|
(TINYCC_SEED (or (getenv "TINYCC_SEED") "../tinycc-seed")))
|
2018-05-06 06:46:32 +00:00
|
|
|
(when help?
|
|
|
|
(print-help)
|
|
|
|
(exit 0))
|
|
|
|
(set! *verbose?* verbose?)
|
2018-05-20 22:06:39 +00:00
|
|
|
(check-version "guile" '(2 0))
|
2018-05-27 04:59:36 +00:00
|
|
|
(check-version "guile-tools" '(2 0))
|
2018-07-09 14:44:06 +00:00
|
|
|
(check-version "mes-seed" '(0 16 1) #:optional? #t #:command (string-append MES_SEED "/refresh.sh"))
|
2018-06-25 17:27:19 +00:00
|
|
|
(check-version "tinycc-seed" '(0 16) #:optional? #t #:command (string-append TINYCC_SEED "/refresh.sh"))
|
2018-05-27 04:59:36 +00:00
|
|
|
(check-version BLOOD_ELF '(0 1))
|
|
|
|
(check-version HEX2 '(0 3))
|
|
|
|
(check-version M1 '(0 3))
|
2018-05-20 22:06:39 +00:00
|
|
|
(check-version "nyacc" '(0 80 41) #:command (string-append GUILE " -c '(use-modules (nyacc lalr)) (display *nyacc-version*)'"))
|
2018-05-06 06:46:32 +00:00
|
|
|
|
2018-05-20 22:06:39 +00:00
|
|
|
(check-version "bash" '(4 0))
|
2018-07-09 07:57:15 +00:00
|
|
|
(when (and (check-version "git" '(2 0) #:optional? #t)
|
|
|
|
(not (file-exists? ".git")))
|
|
|
|
;; Debian wants to run `make clean' from a tarball
|
|
|
|
(and (zero? (system* "git" "init"))
|
|
|
|
(zero? (system* "git" "add" "."))
|
|
|
|
(zero? (system* "git" "commit" "-m" "Import mes"))))
|
2018-05-06 06:46:32 +00:00
|
|
|
(when (and (not (member ARCH '("i686" "x86_64"))) (not with-courage?))
|
|
|
|
(stderr "platform not supported: ~a, try --with-courage\n" ARCH)
|
|
|
|
(exit 1))
|
|
|
|
(if (not (check-version CC '(4 8) #:optional? #t))
|
|
|
|
(set! CC #f))
|
|
|
|
(when CC
|
|
|
|
(check-header-c "stdio.h" "libc-dev")
|
|
|
|
(check-header-c "limits.h" "linux-headers"))
|
|
|
|
(if (not (check-version CC32 '(4 8) #:optional? #t))
|
|
|
|
(set! CC32 #f))
|
2018-06-24 07:28:23 +00:00
|
|
|
(if (not (check-version TCC '(0 9 26) #:optional? #t #:version-option "-v"))
|
|
|
|
(set! TCC #f))
|
2018-05-20 22:06:39 +00:00
|
|
|
(set! make? (check-version "make" '(4 0) #:optional? #t))
|
|
|
|
(check-version "perl" '(5))
|
2018-06-27 11:42:47 +00:00
|
|
|
(if (not (check-version "makeinfo" '(6) #:optional? #t))
|
|
|
|
(set! MAKEINFO #f))
|
2018-06-28 21:10:14 +00:00
|
|
|
(if (not (check-version "help2man" '(1 47) #:optional? #t))
|
|
|
|
(set! HELP2MAN #f))
|
2018-05-06 06:46:32 +00:00
|
|
|
|
|
|
|
(when (pair? required)
|
|
|
|
(stderr "\nMissing dependencies [~a], run\n\n" ((->string ", ") required))
|
|
|
|
(if guix?
|
|
|
|
(stderr " guix environment -l guix.scm\n")
|
|
|
|
(stderr " sudo apt-get install ~a\n" ((->string " ") required)))
|
|
|
|
(exit 1))
|
|
|
|
(with-output-to-file ".config.make"
|
|
|
|
(lambda ()
|
|
|
|
(stdout "build:=~a\n" build-triplet)
|
|
|
|
(stdout "host:=~a\n" host-triplet)
|
|
|
|
(stdout "srcdir:=.\n")
|
2018-07-09 08:46:28 +00:00
|
|
|
(stdout "prefix:=~a\n" (gulp-pipe (string-append "echo " prefix)))
|
|
|
|
(stdout "infodir:=~a\n" infodir)
|
|
|
|
(stdout "mandir:=~a\n" mandir)
|
|
|
|
(stdout "sysconfdir:=~a\n" sysconfdir)
|
|
|
|
|
2018-05-06 06:46:32 +00:00
|
|
|
(stdout "ARCH:=~a\n" ARCH)
|
|
|
|
(stdout "CC:=~a\n" (or CC ""))
|
|
|
|
(stdout "CC32:=~a\n" (or CC32 ""))
|
2018-06-28 21:10:14 +00:00
|
|
|
(stdout "HELP2MAN:=~a\n" (or HELP2MAN ""))
|
2018-07-21 09:19:55 +00:00
|
|
|
(stdout "MAKEINFO:=~a\n" (or MAKEINFO ""))
|
2018-06-24 07:28:23 +00:00
|
|
|
(stdout "TCC:=~a\n" (or TCC ""))
|
2018-05-27 04:59:36 +00:00
|
|
|
(stdout "BLOOD_ELF:=~a\n" (or BLOOD_ELF ""))
|
|
|
|
(stdout "MES_SEED:=~a\n" (or MES_SEED ""))
|
2018-06-16 04:37:20 +00:00
|
|
|
(stdout "MESCC_TOOLS_SEED:=~a\n" (or MESCC_TOOLS_SEED ""))
|
2018-05-27 04:59:36 +00:00
|
|
|
(stdout "TINYCC_SEED:=~a\n" (or TINYCC_SEED ""))
|
2018-05-06 06:46:32 +00:00
|
|
|
(stdout "HEX2:=~a\n" (or HEX2 ""))
|
|
|
|
(stdout "M1:=~a\n" (or M1 ""))
|
|
|
|
(stdout "GUILE:=~a\n" GUILE)
|
2018-05-27 04:59:36 +00:00
|
|
|
(stdout "GUILE_TOOLS:=~a\n" GUILE_TOOLS)
|
2018-05-06 06:46:32 +00:00
|
|
|
(stdout "GUILE_FOR_BUILD:=~a\n" GUILE)
|
|
|
|
(stdout "GUILE_EFFECTIVE_VERSION:=~a\n" GUILE_EFFECTIVE_VERSION)
|
|
|
|
(stdout "GUIX_P:=~a\n" (if guix? guix? ""))
|
|
|
|
(stdout "HEX2:=~a\n" (or HEX2 ""))
|
|
|
|
(stdout "PACKAGE:=~a\n" PACKAGE)
|
|
|
|
(stdout "VERSION:=~a\n" VERSION)
|
2018-07-09 08:46:28 +00:00
|
|
|
(when disable-silent-rules?
|
|
|
|
(stdout "BUILD_DEBUG:=1\n"))
|
2018-05-06 06:46:32 +00:00
|
|
|
(when CFLAGS (stdout "CFLAGS:=~a\n" CFLAGS))
|
2018-07-09 09:49:49 +00:00
|
|
|
(when CC32_CFLAGS (stdout "CC32_CFLAGS:=~a\n" CC32_CFLAGS))
|
2018-05-06 06:46:32 +00:00
|
|
|
(when HEX2FLAGS (stdout "HEX2FLAGS:=~a\n" HEX2FLAGS))
|
|
|
|
(when M1FLAGS (stdout "M1FLAGS:=~a\n" M1FLAGS))
|
2018-07-09 09:49:49 +00:00
|
|
|
(when MES_CFLAGS (stdout "MES_CFLAGS:=~a\n" MES_CFLAGS))))
|
2018-05-06 06:46:32 +00:00
|
|
|
(format (current-output-port)
|
|
|
|
"\nRun:
|
2017-07-02 14:25:14 +00:00
|
|
|
~a to build mes
|
|
|
|
~a help for help on other targets\n"
|
2018-05-06 06:46:32 +00:00
|
|
|
(if make? "make" "./build.sh")
|
|
|
|
(if make? "make" "./build.sh")))))
|