build: Check for mes-seed, tinycc-seed.

* configure: Check for guile-tools, mes-seed, tinycc-seed.  Bugfix:
  Add cwd to load path.
This commit is contained in:
Jan Nieuwenhuizen 2018-05-27 06:59:36 +02:00
parent 2be4cf1a59
commit 893c020ef4
No known key found for this signature in database
GPG key ID: F3C1A0D9C1D65273
2 changed files with 68 additions and 10 deletions

View file

@ -11,8 +11,17 @@ default: all
all: all:
./build.sh ./build.sh
cc:
build-aux/build-cc.sh
mlibc:
build-aux/build-mlibc.sh
mes:
build-aux/build-mes.sh
clean: clean:
true git clean -dfx
all-go: all-go:
build-aux/build-guile.sh build-aux/build-guile.sh
@ -30,12 +39,31 @@ install:
.config.make: ./configure .config.make: ./configure
seed: seed:
cd ../mes-seed && git reset --hard HEAD cd $(MES_SEED) && git reset --hard HEAD
MES=guile GUILE=guile SEED=1 build-aux/build-mes.sh MES=$(GUILE) GUILE=$(GUILE) SEED=1 build-aux/build-mes.sh
cd ../mes-seed && ./refresh.sh && cd ../mes cd $(MES_SEED) && MES_PREFIX=$(PWD) ./refresh.sh
MES=guile GUILE=guile SEED=1 build-aux/build-mes.sh MES=$(GUILE) GUILE=$(GUILE) SEED=1 build-aux/build-mes.sh
build-aux/build-mlibc.sh build-aux/build-mlibc.sh
cd ../tinycc-seed && ./refresh.sh && cd ../mes cd $(TINYCC_SEED) && MES_PREFIX=$(PWD) ./refresh.sh
define HELP_TOP
Usage: make [OPTION]... [TARGET]...
Targets:
all update everything
all-go update .go files
cc update src/mes.gcc-out
mlibc update src/mes.mlibc-out
mes update src/mes
check run unit tests
clean run git clean -dfx
clean-go clean .go files
install install in $(PREFIX)
seed update mes-seed in $(MES_SEED)
endef
export HELP_TOP
help:
@echo "$$HELP_TOP"
ifdef PREFIX ifdef PREFIX
export PREFIX export PREFIX
@ -53,6 +81,10 @@ ifdef CC32
export CC32 export CC32
endif endif
ifdef BLOOD_ELF
export BLOOD_ELF
endif
ifdef M1 ifdef M1
export M1 export M1
endif endif
@ -65,6 +97,10 @@ ifdef GUILE
export GUILE export GUILE
endif endif
ifdef GUILE_TOOLS
export GUILE_TOOLS
endif
ifdef GUILE_LOAD_PATH ifdef GUILE_LOAD_PATH
export GUILE_LOAD_PATH export GUILE_LOAD_PATH
endif endif
@ -93,4 +129,10 @@ ifdef MESCCFLAGS
export MESCCFLAGS export MESCCFLAGS
endif endif
ifdef MES_SEED
export MES_SEED
endif
ifdef TINYCC_SEED
export TINYCC_SEED
endif

24
configure vendored
View file

@ -24,7 +24,7 @@ Missing dependencies, run
EOF EOF
exit 1 exit 1
fi fi
exec ${GUILE-guile} --no-auto-compile -e '(configure)' -s "$0" ${1+"$@"} exec ${GUILE-guile} -L . --no-auto-compile -e '(configure)' -s "$0" ${1+"$@"}
!# !#
;;; Mes --- Maxwell Equations of Software ;;; Mes --- Maxwell Equations of Software
@ -220,6 +220,10 @@ Some influential environment variables:
CFLAGS C compiler flags CFLAGS C compiler flags
CC32 x86 C compiler command CC32 x86 C compiler command
C32FLAGS x86 C compiler flags C32FLAGS x86 C compiler flags
GUILE guile command
GUILE_TOOLS guile-tools command
MES_SEED location of mes-seed
TINYCC_SEED location of tinycc-seed
" PACKAGE VERSION (getenv "PREFIX"))) " PACKAGE VERSION (getenv "PREFIX")))
(define (main args) (define (main args)
@ -240,20 +244,28 @@ Some influential environment variables:
(let ((CC32 (or (getenv "CC32") (let ((CC32 (or (getenv "CC32")
(if (member ARCH '("i686" "arm")) (string-append BUILD_TRIPLET "-" CC) (if (member ARCH '("i686" "arm")) (string-append BUILD_TRIPLET "-" CC)
"i686-unknown-linux-gnu-gcc"))) "i686-unknown-linux-gnu-gcc")))
(GUILE_TOOLS (or (getenv "GUILE_TOOLS") "guile-tools"))
(BLOOD_ELF (or (getenv "BLOOD_ELF") "blood-elf"))
(HEX2 (or (getenv "HEX2") "hex2")) (HEX2 (or (getenv "HEX2") "hex2"))
(M1 (or (getenv "M1") "M1")) (M1 (or (getenv "M1") "M1"))
(CFLAGS (getenv "CFLAGS")) (CFLAGS (getenv "CFLAGS"))
(C32FLAGS (getenv "C32FLAGS")) (C32FLAGS (getenv "C32FLAGS"))
(HEX2FLAGS (getenv "HEX2FLAGS")) (HEX2FLAGS (getenv "HEX2FLAGS"))
(M1FLAGS (getenv "M1FLAGS")) (M1FLAGS (getenv "M1FLAGS"))
(MESCCFLAGS (getenv "MESCCFLAGS"))) (MESCCFLAGS (getenv "MESCCFLAGS"))
(MES_SEED (or (getenv "MES_SEED") "../mes-seed"))
(TINYCC_SEED (or (getenv "TINYCC_SEED") "../tinycc-seed")))
(when help? (when help?
(print-help) (print-help)
(exit 0)) (exit 0))
(set! *verbose?* verbose?) (set! *verbose?* verbose?)
(check-version "guile" '(2 0)) (check-version "guile" '(2 0))
(check-version HEX2 '(0 1)) (check-version "guile-tools" '(2 0))
(check-version M1 '(0 2)) (check-version "mes-seed" '(0 14) #:optional? #t #:command (string-append MES_SEED "/refresh.sh"))
(check-version "tinycc-seed" '(0 14) #:optional? #t #:command (string-append TINYCC_SEED "/refresh.sh"))
(check-version BLOOD_ELF '(0 1))
(check-version HEX2 '(0 3))
(check-version M1 '(0 3))
(check-version "nyacc" '(0 80 41) #:command (string-append GUILE " -c '(use-modules (nyacc lalr)) (display *nyacc-version*)'")) (check-version "nyacc" '(0 80 41) #:command (string-append GUILE " -c '(use-modules (nyacc lalr)) (display *nyacc-version*)'"))
(check-version "bash" '(4 0)) (check-version "bash" '(4 0))
@ -284,9 +296,13 @@ Some influential environment variables:
(stdout "ARCH:=~a\n" ARCH) (stdout "ARCH:=~a\n" ARCH)
(stdout "CC:=~a\n" (or CC "")) (stdout "CC:=~a\n" (or CC ""))
(stdout "CC32:=~a\n" (or CC32 "")) (stdout "CC32:=~a\n" (or CC32 ""))
(stdout "BLOOD_ELF:=~a\n" (or BLOOD_ELF ""))
(stdout "MES_SEED:=~a\n" (or MES_SEED ""))
(stdout "TINYCC_SEED:=~a\n" (or TINYCC_SEED ""))
(stdout "HEX2:=~a\n" (or HEX2 "")) (stdout "HEX2:=~a\n" (or HEX2 ""))
(stdout "M1:=~a\n" (or M1 "")) (stdout "M1:=~a\n" (or M1 ""))
(stdout "GUILE:=~a\n" GUILE) (stdout "GUILE:=~a\n" GUILE)
(stdout "GUILE_TOOLS:=~a\n" GUILE_TOOLS)
(stdout "GUILE_FOR_BUILD:=~a\n" GUILE) (stdout "GUILE_FOR_BUILD:=~a\n" GUILE)
(stdout "GUILE_EFFECTIVE_VERSION:=~a\n" GUILE_EFFECTIVE_VERSION) (stdout "GUILE_EFFECTIVE_VERSION:=~a\n" GUILE_EFFECTIVE_VERSION)
(stdout "GUIX_P:=~a\n" (if guix? guix? "")) (stdout "GUIX_P:=~a\n" (if guix? guix? ""))