Add mes and mescc-tools-extra
mescc-tools-extra contains two important tools: - cp - chmod mes first builds itself from a mes 0.21 seed as used by guix, and then builds a mes 0.22 and then mes 0.22 using that created mes 0.22. It does /not/ use bootstrap.sh as we don't have a proper shell at this point, it has been manually adapted for kaem.
This commit is contained in:
parent
2706e07556
commit
649d7b68dc
21
rootfs.sh
21
rootfs.sh
|
@ -11,9 +11,6 @@ sudo mount -t tmpfs -o size=8G tmpfs tmp
|
||||||
|
|
||||||
# base: mescc-tools-seed
|
# base: mescc-tools-seed
|
||||||
|
|
||||||
#debugging
|
|
||||||
cp busybox.static tmp/
|
|
||||||
|
|
||||||
# copy in all the mescc-tools-seed stuff
|
# copy in all the mescc-tools-seed stuff
|
||||||
cp -r mescc-tools-seed/x86/* tmp
|
cp -r mescc-tools-seed/x86/* tmp
|
||||||
cp -r mescc-tools-seed/{M2-Planet,mes-m2,mescc-tools} tmp/
|
cp -r mescc-tools-seed/{M2-Planet,mes-m2,mescc-tools} tmp/
|
||||||
|
@ -30,10 +27,15 @@ mkdir tmp/bin
|
||||||
# after mescc-tools-seed we get into our own little directory because
|
# after mescc-tools-seed we get into our own little directory because
|
||||||
# the mescc-tools-seed one is hella messy
|
# the mescc-tools-seed one is hella messy
|
||||||
mkdir tmp/after/bin -p
|
mkdir tmp/after/bin -p
|
||||||
|
mkdir tmp/after/{lib,include}
|
||||||
|
mkdir tmp/after/include/{mes,gnu,linux,sys,mach}
|
||||||
# put all the kaems for after in
|
# put all the kaems for after in
|
||||||
cp after.kaem tmp/
|
cp after.kaem tmp/
|
||||||
cp after.kaem.run tmp/after/kaem.run
|
cp after.kaem.run tmp/after/kaem.run
|
||||||
|
|
||||||
|
# mescc-tools-extra
|
||||||
|
cp -r mescc-tools-extra tmp/after/
|
||||||
|
|
||||||
# blynn-compiler
|
# blynn-compiler
|
||||||
pushd tmp/after
|
pushd tmp/after
|
||||||
git clone ../../blynn-compiler-oriansj blynn-compiler
|
git clone ../../blynn-compiler-oriansj blynn-compiler
|
||||||
|
@ -41,6 +43,13 @@ cp ../../blynn-compiler.kaem blynn-compiler/go.kaem
|
||||||
mkdir blynn-compiler/{bin,generated}
|
mkdir blynn-compiler/{bin,generated}
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
# mes
|
||||||
|
cp -r mes-0.22 tmp/after/
|
||||||
|
ln -s . tmp/after/mes-0.22/x86-mes
|
||||||
|
#cp -r nyacc-0.99.3 tmp/after/
|
||||||
|
cp -r mes-bins tmp/after/
|
||||||
|
cp mes.kaem tmp/after/
|
||||||
|
|
||||||
# General cleanup
|
# General cleanup
|
||||||
find tmp -name .git -exec rm -rf \;
|
find tmp -name .git -exec rm -rf \;
|
||||||
|
|
||||||
|
@ -55,7 +64,7 @@ qemu-system-x86_64 -enable-kvm \
|
||||||
-no-reboot \
|
-no-reboot \
|
||||||
-kernel ../../kernel -initrd initramfs.igz -append console=ttyS0,kernel.panic=2
|
-kernel ../../kernel -initrd initramfs.igz -append console=ttyS0,kernel.panic=2
|
||||||
|
|
||||||
# Cleanup
|
cd ../..
|
||||||
sudo umount tmp
|
|
||||||
|
|
||||||
popd
|
# Cleanup
|
||||||
|
sudo umount sysa/tmp
|
||||||
|
|
|
@ -18,15 +18,5 @@
|
||||||
|
|
||||||
cd after
|
cd after
|
||||||
|
|
||||||
# Prepare the directory
|
|
||||||
../catm bin/hex2 ../bin/hex2
|
|
||||||
../catm bin/M1 ../bin/M1
|
|
||||||
../catm bin/M2-Planet ../bin/M2-Planet
|
|
||||||
../catm bin/blood-elf ../bin/blood-elf
|
|
||||||
../catm bin/get_machine ../bin/get_machine
|
|
||||||
../catm bin/mes-m2 ../bin/mes-m2
|
|
||||||
../catm bin/kaem ../bin/kaem
|
|
||||||
../catm bin/catm ../catm
|
|
||||||
|
|
||||||
# Finally, reinvoke kaem in this directory
|
# Finally, reinvoke kaem in this directory
|
||||||
../bin/kaem --file kaem.run
|
../bin/kaem --file kaem.run
|
||||||
|
|
|
@ -16,10 +16,32 @@
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with live-bootstrap. If not, see <http://www.gnu.org/licenses/>.
|
# along with live-bootstrap. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
PATH=/bin
|
set -ex
|
||||||
|
|
||||||
# Part 2: blynn-compiler
|
PATH=/after/bin:/bin
|
||||||
|
|
||||||
|
# Part 2: cp and chown (mescc-tools-extra)
|
||||||
|
cd mescc-tools-extra
|
||||||
|
kaem --file go.kaem
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
# Part 3: Remove remaining dependencies on / (root of /after)
|
||||||
|
/after/bin/cp ../bin/hex2 bin/hex2
|
||||||
|
/after/bin/cp ../bin/M1 bin/M1
|
||||||
|
/after/bin/cp ../bin/M2-Planet bin/M2-Planet
|
||||||
|
/after/bin/cp ../bin/blood-elf bin/blood-elf
|
||||||
|
/after/bin/cp ../bin/get_machine bin/get_machine
|
||||||
|
/after/bin/cp ../bin/mes-m2 bin/mes-m2
|
||||||
|
/after/bin/cp ../bin/kaem bin/kaem
|
||||||
|
/after/bin/cp ../catm bin/catm
|
||||||
|
/after/bin/chmod 755 bin/hex2 bin/M1 bin/M2-Planet bin/blood-elf \
|
||||||
|
bin/get_machine bin/mes-m2 bin/kaem bin/catm
|
||||||
|
|
||||||
|
# Part 4: blynn-compiler
|
||||||
|
|
||||||
cd blynn-compiler
|
cd blynn-compiler
|
||||||
kaem --file go.kaem
|
kaem --file go.kaem
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
|
# Part 5: mes
|
||||||
|
kaem --file mes.kaem
|
||||||
|
|
Binary file not shown.
|
@ -0,0 +1,112 @@
|
||||||
|
;;; GNU Mes --- Maxwell Equations of Software
|
||||||
|
;;; Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
|
;;;
|
||||||
|
;;; This file is part of GNU Mes.
|
||||||
|
;;;
|
||||||
|
;;; GNU 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.
|
||||||
|
;;;
|
||||||
|
;;; GNU 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 GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
;; The GNU project defaults. These are also the GNU Emacs defaults.
|
||||||
|
;; Re-asserting theme here, however, as a courtesy for setups that use
|
||||||
|
;; a global override.
|
||||||
|
(
|
||||||
|
;; For writing GNU C code, see
|
||||||
|
;; https://www.gnu.org/prep/standards/html_node/Writing-C.html
|
||||||
|
(c-mode . ((c-file-style . "gnu")
|
||||||
|
(indent-tabs-mode . nil)))
|
||||||
|
|
||||||
|
(makefile-mode . ((indent-tabs-mode . t)))
|
||||||
|
(asm-mode . ((indent-tabs-mode . t)))
|
||||||
|
|
||||||
|
(nil . ((indent-tabs-mode . nil)
|
||||||
|
(fill-column . 72)))
|
||||||
|
|
||||||
|
(scheme-mode
|
||||||
|
.
|
||||||
|
((geiser-active-implementations . (guile))
|
||||||
|
(eval
|
||||||
|
.
|
||||||
|
(progn
|
||||||
|
(defun prefix-dir-locals-dir (elt)
|
||||||
|
(concat (locate-dominating-file buffer-file-name ".dir-locals.el") elt))
|
||||||
|
(mapcar
|
||||||
|
(lambda (dir) (add-to-list 'geiser-guile-load-path dir))
|
||||||
|
(mapcar
|
||||||
|
#'prefix-dir-locals-dir
|
||||||
|
'("scripts" "module")))))))
|
||||||
|
|
||||||
|
(texinfo-mode . ((indent-tabs-mode . nil)
|
||||||
|
(fill-column . 72)))
|
||||||
|
(nil .
|
||||||
|
((eval
|
||||||
|
.
|
||||||
|
(progn
|
||||||
|
(let ((top (locate-dominating-file default-directory ".dir-locals.el"))))
|
||||||
|
|
||||||
|
(defun guile--manual-look-up (id mod)
|
||||||
|
(message "guile--manual-look-up id=%s => %s mod=%s" id (symbol-name id) mod)
|
||||||
|
(let ((info-lookup-other-window-flag
|
||||||
|
geiser-guile-manual-lookup-other-window-p))
|
||||||
|
(info-lookup-symbol (symbol-name id) 'scheme-mode))
|
||||||
|
(when geiser-guile-manual-lookup-other-window-p
|
||||||
|
(switch-to-buffer-other-window "*info*"))
|
||||||
|
(search-forward (format "%s" id) nil t))
|
||||||
|
|
||||||
|
(add-hook 'before-save-hook 'delete-trailing-whitespace nil t)
|
||||||
|
|
||||||
|
(defun guix-switch-profile (&optional profile)
|
||||||
|
"reset Emacs' environment by snarfing PROFILE/etc/profile"
|
||||||
|
|
||||||
|
(defun matches-in-string (regexp string)
|
||||||
|
"return a list of matches of REGEXP in STRING."
|
||||||
|
(let ((matches))
|
||||||
|
(save-match-data
|
||||||
|
(string-match "^" "")
|
||||||
|
(while (string-match regexp string (match-end 0))
|
||||||
|
(push (or (match-string 1 string) (match-string 0 string)) matches)))
|
||||||
|
matches))
|
||||||
|
|
||||||
|
(interactive "fprofile: ")
|
||||||
|
(let* ((output (shell-command-to-string (concat "GUIX_PROFILE= /bin/sh -x " profile "/etc/profile")))
|
||||||
|
(exports (matches-in-string "^[+] export \\(.*\\)" output)))
|
||||||
|
(mapcar (lambda (line) (apply #'setenv (split-string line "="))) exports )))
|
||||||
|
|
||||||
|
(defun shell-args-to-string (&rest args)
|
||||||
|
(shell-command-to-string (mapconcat 'identity args " ")))
|
||||||
|
|
||||||
|
(defun as (string &optional arch)
|
||||||
|
(let* ((arch (or arch "--64"))
|
||||||
|
(asm (subst-char-in-string ?_ ?\s string))
|
||||||
|
(foo (message "asm:%S" asm))
|
||||||
|
(result (shell-args-to-string "as" arch (concat "<(echo '" asm "')")))
|
||||||
|
(disassembly (shell-args-to-string "objdump" "-d" "a.out"))
|
||||||
|
(foo (message "disassembly: %S" disassembly))
|
||||||
|
(match (string-match "^ 0:[\t]\\([^\t]*\\)" disassembly))
|
||||||
|
(code (match-string 1 disassembly))
|
||||||
|
(code (apply 'concat (split-string code " " t))))
|
||||||
|
(insert " ")
|
||||||
|
(insert code)))
|
||||||
|
|
||||||
|
(defun as-32 (point mark)
|
||||||
|
(interactive "r")
|
||||||
|
(let* ((string (buffer-substring point mark))
|
||||||
|
(code (as string "--32")))
|
||||||
|
(insert " ")
|
||||||
|
(insert code)))
|
||||||
|
|
||||||
|
(defun as-64 (point mark)
|
||||||
|
(interactive "r")
|
||||||
|
(let* ((string (buffer-substring point mark))
|
||||||
|
(code (as string "--64")))
|
||||||
|
(insert " ")
|
||||||
|
(insert code))))))))
|
|
@ -0,0 +1,117 @@
|
||||||
|
*-
|
||||||
|
*~
|
||||||
|
.#*
|
||||||
|
*.E
|
||||||
|
*.s
|
||||||
|
*.blood-elf
|
||||||
|
*.blood-elf-M1
|
||||||
|
*.blood-elf-hex2
|
||||||
|
*.gcc
|
||||||
|
*.gcc-o
|
||||||
|
*.gcc-out
|
||||||
|
*.gcc-stdout
|
||||||
|
*.go
|
||||||
|
*.guile
|
||||||
|
*.guile-log
|
||||||
|
*.log
|
||||||
|
*.trs
|
||||||
|
*.mes-gcc
|
||||||
|
*.mes-gcc-o
|
||||||
|
*.mes-gcc-out
|
||||||
|
*.mes-gcc-out
|
||||||
|
*.mes-gcc-stdout
|
||||||
|
*.mes-o
|
||||||
|
*.mes-out
|
||||||
|
*.mes-stdout
|
||||||
|
*.mes-tcc
|
||||||
|
*.mes-tcc-o
|
||||||
|
*.mes-tcc-out
|
||||||
|
*.mes-tcc-out
|
||||||
|
*.mes-tcc-stdout
|
||||||
|
*.mini-M1
|
||||||
|
*.mini-guile
|
||||||
|
*.mini-hex2
|
||||||
|
*.a
|
||||||
|
*.o
|
||||||
|
*.seed-out
|
||||||
|
|
||||||
|
/lib/tests/*/[0-9a][0-9a-z]-*
|
||||||
|
!/lib/tests/*/*.c
|
||||||
|
!/lib/tests/*/*.exit
|
||||||
|
!/lib/tests/*/*.stdout
|
||||||
|
|
||||||
|
/scaffold/argv
|
||||||
|
/scaffold/hello
|
||||||
|
/scaffold/main
|
||||||
|
/scaffold/micro-mes
|
||||||
|
/scaffold/tiny-mes
|
||||||
|
|
||||||
|
/scaffold/tests/[0-9a][0-9a-z]-*
|
||||||
|
/scaffold/tests/t.*
|
||||||
|
!/scaffold/tests/*.c
|
||||||
|
!/scaffold/tests/*.exit
|
||||||
|
!/scaffold/tests/*.stdout
|
||||||
|
|
||||||
|
/.config.make
|
||||||
|
/.store
|
||||||
|
/.tarball-version
|
||||||
|
|
||||||
|
/out
|
||||||
|
?
|
||||||
|
?.mes
|
||||||
|
\#*#
|
||||||
|
/doc/fosdem/fosdem.aux
|
||||||
|
/doc/fosdem/fosdem.log
|
||||||
|
/doc/fosdem/fosdem.nav
|
||||||
|
/doc/fosdem/fosdem.out
|
||||||
|
/doc/fosdem/fosdem.snm
|
||||||
|
/doc/fosdem/fosdem.tex
|
||||||
|
/doc/fosdem/fosdem.toc
|
||||||
|
/doc/fosdem/fosdem.*vrb
|
||||||
|
/doc/mes.1
|
||||||
|
/doc/mes.info
|
||||||
|
/doc/mes.pdf
|
||||||
|
/doc/mesar.1
|
||||||
|
/doc/mescc.1
|
||||||
|
/doc/version.texi
|
||||||
|
/mes.aux
|
||||||
|
/mes.cp
|
||||||
|
/mes.cps
|
||||||
|
/mes.fn
|
||||||
|
/mes.info
|
||||||
|
/mes.tmp
|
||||||
|
/mes.toc
|
||||||
|
/mes.vr
|
||||||
|
/mes.vrs
|
||||||
|
|
||||||
|
/config.status
|
||||||
|
/pre-inst-env
|
||||||
|
/bootstrap.sh
|
||||||
|
/build.sh
|
||||||
|
/check.sh
|
||||||
|
/install.sh
|
||||||
|
/uninstall.sh
|
||||||
|
/mes/module/mes/boot-0.scm
|
||||||
|
/scripts/mesar
|
||||||
|
/scripts/mescc.scm
|
||||||
|
/scripts/mescc
|
||||||
|
/doc/images/gcc-mesboot-graph.png
|
||||||
|
/GNUmakefile
|
||||||
|
/pre-inst-env
|
||||||
|
/doc/images/gcc-mesboot-graph.eps
|
||||||
|
/doc/images/gcc-mesboot-graph.pdf
|
||||||
|
/doc/web/
|
||||||
|
/config.sh
|
||||||
|
/include/mes/config.h
|
||||||
|
/gcc-lib
|
||||||
|
/mescc-lib
|
||||||
|
/bin
|
||||||
|
/0exit-42
|
||||||
|
/0hello-mes
|
||||||
|
/body-exit-42
|
||||||
|
/body-hello-mes
|
||||||
|
/exit-42
|
||||||
|
/hello-mes
|
||||||
|
core
|
||||||
|
/.config
|
||||||
|
a.out
|
|
@ -0,0 +1,88 @@
|
||||||
|
-*- org -*-
|
||||||
|
#+TITLE: GNU Mes Authors
|
||||||
|
|
||||||
|
Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
|
Main author
|
||||||
|
All files except the imported files listed below
|
||||||
|
|
||||||
|
Danny Milosavljevic <dannym@scratchpost.org>
|
||||||
|
ARM port
|
||||||
|
lib/mes/div.c
|
||||||
|
Additions and fixes throughout
|
||||||
|
|
||||||
|
Jeremiah Orians <jeremiah@pdp10.guru>
|
||||||
|
lib/stdio/fopen.c (first simple version of fopen)
|
||||||
|
scaffold/tests/98-fopen.c
|
||||||
|
|
||||||
|
Han-Wen Nienhuys <hanwen@xs4all.nl>
|
||||||
|
lib/string/memmem.c (_memmem, memmem)
|
||||||
|
|
||||||
|
Peter de Wachter
|
||||||
|
Small fixes and additions to
|
||||||
|
lib/x86-mes/x86.M1
|
||||||
|
lib/x86_64-mes/x86_64.M1
|
||||||
|
include/stdint.h
|
||||||
|
module/mescc/compile.mes
|
||||||
|
|
||||||
|
rain1
|
||||||
|
scaffold/tests/90-goto-var.c
|
||||||
|
scaffold/tests/91-goto-array.c
|
||||||
|
|
||||||
|
List of imported files
|
||||||
|
|
||||||
|
D A Gwyn
|
||||||
|
lib/alloca.c
|
||||||
|
|
||||||
|
Included verbatim from gnulib
|
||||||
|
build-aux/gitlog-to-changelog
|
||||||
|
|
||||||
|
Portable hygienic pattern matcher
|
||||||
|
mes/module/mes/match.scm
|
||||||
|
|
||||||
|
Portable LALR(1) parser generator
|
||||||
|
mes/module/mes/lalr.scm
|
||||||
|
|
||||||
|
Portable syntax-case from Chez Scheme; patches from Guile
|
||||||
|
mes/module/mes/psyntax.ss
|
||||||
|
mes/module/mes/psyntax.pp [generated]
|
||||||
|
|
||||||
|
Getopt-long from Guile
|
||||||
|
module/mes/getopt-long.scm
|
||||||
|
|
||||||
|
Optargs from Guile
|
||||||
|
mes/module/mes/optargs.scm
|
||||||
|
|
||||||
|
PEG from Guile
|
||||||
|
mes/module/mes/peg/
|
||||||
|
|
||||||
|
Pmatch from Guile
|
||||||
|
mes/module/mes/pmatch.scm
|
||||||
|
|
||||||
|
Pretty-print from Guile
|
||||||
|
mes/module/mes/pretty-print.scm
|
||||||
|
|
||||||
|
Srfi-1 bits from Guile
|
||||||
|
mes/module/srfi/srfi-1.scm
|
||||||
|
|
||||||
|
Srfi-16 from Guile
|
||||||
|
mes/module/srfi/srfi-16.scm
|
||||||
|
|
||||||
|
Srfi-26 from Guile
|
||||||
|
mes/module/srfi/srfi-26.scm
|
||||||
|
|
||||||
|
GNU FDL in texinfo from GNU
|
||||||
|
doc/fdl-1.3.texi
|
||||||
|
|
||||||
|
Hurd and Mach support from GNU C Library
|
||||||
|
include/gnu/hurd-types.h
|
||||||
|
include/mach/mach-init.h
|
||||||
|
lib/mach/msg.c
|
||||||
|
lib/mach/mach-init.c
|
||||||
|
lib/mach/*.S
|
||||||
|
|
||||||
|
* legalese
|
||||||
|
Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
|
|
||||||
|
Copying and distribution of this file, with or without modification,
|
||||||
|
are permitted in any medium without royalty provided the copyright
|
||||||
|
notice and this notice are preserved.
|
|
@ -0,0 +1,23 @@
|
||||||
|
|
||||||
|
GNU Mes is a Scheme interpreter and C compiler for bootstrapping the GNU
|
||||||
|
system.
|
||||||
|
|
||||||
|
GNU Mes was created to address the security concerns that arise from
|
||||||
|
bootstrapping an operating system using binary blobs, which is common
|
||||||
|
practice for all software distributions. Mes is a Scheme interpreter
|
||||||
|
written in a simple subset of C and a C compiler written in Scheme and
|
||||||
|
comes with a small, bootstrappable C library. The Mes bootstrap has
|
||||||
|
halved the size of opaque, uninspectable binaries that were needed to
|
||||||
|
bootstrap GNU Guix, a functional GNU/Linux distribution that focusses on
|
||||||
|
user freedom, reproducibility and security. That reduction was achieved
|
||||||
|
by replacing GNU Binutils, GNU GCC and the GNU C Library with Mes. The
|
||||||
|
final goal is to help create a full source bootstrap for UNIX-like
|
||||||
|
operating systems. After three years of volunteer work funding will
|
||||||
|
enable us to make another big step forward and reach an important new
|
||||||
|
milestone.
|
||||||
|
|
||||||
|
GNU Mes - https://gnu.org/software/mes
|
||||||
|
GNU Guix - https://gnu.org/software/guix
|
||||||
|
Bootstrappable Builds - https://bootstrappable.org
|
||||||
|
Reproducible Builds - https://reproducible-builds.org
|
||||||
|
Reduced Binary Seed bootstrap - https://guix.gnu.org/blog/2019/guix-reduces-bootstrap-seed-by-50/
|
|
@ -0,0 +1,164 @@
|
||||||
|
-*- org -*-
|
||||||
|
#+TITLE: bootstrappable.org project
|
||||||
|
|
||||||
|
Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
|
|
||||||
|
Copying and distribution of this file, with or without modification,
|
||||||
|
are permitted in any medium without royalty provided the copyright
|
||||||
|
notice and this notice are preserved.
|
||||||
|
|
||||||
|
* What?
|
||||||
|
** Full source bootstrapping for the GNU System
|
||||||
|
|
||||||
|
A package in GNU Guix is uniquely identified by the hash of its source
|
||||||
|
code, its dependencies, and its build recipe.
|
||||||
|
|
||||||
|
Every package can be built from source, except for the bootstrap
|
||||||
|
binaries.
|
||||||
|
|
||||||
|
*** From the GNU Guix manual
|
||||||
|
|
||||||
|
The distribution is fully “bootstrapped” and “self-contained”: each
|
||||||
|
package is built based solely on other packages in the distribution.
|
||||||
|
|
||||||
|
The root of this dependency graph is a small set of “bootstrap
|
||||||
|
binaries”, provided by the ‘(gnu packages bootstrap)’ module. For more
|
||||||
|
information on bootstrapping, *note Bootstrapping::.
|
||||||
|
|
||||||
|
**** Guix v1.0 bootstrap binary seed
|
||||||
|
|
||||||
|
$ du -schx $(readlink $(guix build bootstrap-tarballs)/*)
|
||||||
|
2.1M /gnu/store/9623n4bq6iq5c8cwwdq99qb7d0xj93ym-binutils-static-stripped-tarball-2.28.1/binutils-static-stripped-2.28.1-x86_64-linux.tar.xz
|
||||||
|
18M /gnu/store/437xwygmmwwpkddcyy1qvjcv4hak89pb-gcc-stripped-tarball-5.5.0/gcc-stripped-5.5.0-x86_64-linux.tar.xz
|
||||||
|
1.8M /gnu/store/55ccx18a0d1x5y6a575jf1yr0ywizvdg-glibc-stripped-tarball-2.26.105-g0890d5379c/glibc-stripped-2.26.105-g0890d5379c-x86_64-linux.tar.xz
|
||||||
|
5.7M /gnu/store/bqf0ajclbvnbm0a46819f30804y3ilx0-guile-static-stripped-tarball-2.2.3/guile-static-stripped-2.2.3-x86_64-linux.tar.xz
|
||||||
|
5.8M /gnu/store/j8yzjmh9sy4gbdfwjrhw46zca43aah6x-static-binaries-tarball-0/static-binaries-0-x86_64-linux.tar.xz
|
||||||
|
33M total
|
||||||
|
$ for i in $(readlink $(guix build bootstrap-tarballs)/*);\
|
||||||
|
do sudo tar xf $i; done
|
||||||
|
$ du -schx *
|
||||||
|
130M bin
|
||||||
|
13M include
|
||||||
|
54M lib
|
||||||
|
51M libexec
|
||||||
|
5.2M share
|
||||||
|
252M total
|
||||||
|
|
||||||
|
**** Guix Reduced Binary Seed bootstrap binary seed
|
||||||
|
|
||||||
|
$ du -schx $(readlink $(guix build bootstrap-tarballs)/*)
|
||||||
|
5.7M /gnu/store/9f8gi8raqfx9j3l9d00qrrc0jg3r1kyj-guile-static-stripped-tarball-2.2.6/guile-static-stripped-2.2.6-x86_64-linux.tar.xz
|
||||||
|
80K /gnu/store/b6rjl52hibhmvyw4dg8678pwryhla0h2-linux-libre-headers-stripped-tarball-4.19.56/linux-libre-headers-stripped-4.19.56-x86_64-linux.tar.xz
|
||||||
|
12K /gnu/store/d7zlxsjcnqilmvqwx7scija9x9bjw8cw-mescc-tools-static-stripped-tarball-0.5.2-0.bb062b0/mescc-tools-static-stripped-0.5.2-0.bb062b0-x86_64-linux.tar.xz
|
||||||
|
428K /gnu/store/n7zc4kpi8ny6jlfaikkzxlwhc5fvr1vr-mes-minimal-stripped-tarball-0.19/mes-minimal-stripped-0.19-x86_64-linux.tar.xz
|
||||||
|
6.0M /gnu/store/nv4djwlrljfqmynqr2cqvfwz0ydx7kxb-static-binaries-tarball-0/static-binaries-0-x86_64-linux.tar.xz
|
||||||
|
13M total
|
||||||
|
$ for i in $(readlink $(guix build bootstrap-tarballs)/*);\
|
||||||
|
do sudo tar xf $i; done
|
||||||
|
Password:
|
||||||
|
$ du -schx *
|
||||||
|
93M bin
|
||||||
|
700K include
|
||||||
|
38M lib
|
||||||
|
14M share
|
||||||
|
145M total
|
||||||
|
|
||||||
|
**** Guix Scheme-only bootstrap binary seed
|
||||||
|
|
||||||
|
$ du -schx $(readlink $(~/src/guix/wip-bootstrap/pre-inst-env guix build bootstrap-tarballs)/*)
|
||||||
|
5.7M /gnu/store/1mq2pcd2h7g54xpi2jrgj6ibbi4lgi3c-guile-static-stripped-tarball-2.2.6/guile-static-stripped-2.2.6-x86_64-linux.tar.xz
|
||||||
|
80K /gnu/store/bl1r2bpk6fam8r2gjvr5mvr48i3dm2hn-linux-libre-headers-stripped-tarball-4.19.56/linux-libre-headers-stripped-4.19.56-x86_64-linux.tar.xz
|
||||||
|
12K /gnu/store/w0dlz486dhb8aiq8pxm5akllz628fqin-mescc-tools-static-stripped-tarball-0.5.2-0.bb062b0/mescc-tools-static-stripped-0.5.2-0.bb062b0-x86_64-linux.tar.xz
|
||||||
|
428K /gnu/store/15j6l18q44ymlrh1cfp4s4hc9835xic5-mes-minimal-stripped-tarball-0.19/mes-minimal-stripped-0.19-x86_64-linux.tar.xz
|
||||||
|
6.2M total
|
||||||
|
$ for i in $(readlink $(~/src/guix/wip-bootstrap/pre-inst-env guix build bootstrap-tarballs)/*);\
|
||||||
|
do sudo tar xf $i; done
|
||||||
|
$ du -schx *
|
||||||
|
4.9M bin
|
||||||
|
700K include
|
||||||
|
38M lib
|
||||||
|
14M share
|
||||||
|
57M total
|
||||||
|
|
||||||
|
* Why?
|
||||||
|
** Reproducibility is essential to Software Freedom
|
||||||
|
|
||||||
|
Reproducible builds are a set of software development practices that
|
||||||
|
create a verifiable path from human readable source code to the binary
|
||||||
|
code used by computers.
|
||||||
|
|
||||||
|
*** What about the bootstrap binaries and the compilers?
|
||||||
|
|
||||||
|
We have the sources: they always lead to bitwise-same binary, but what
|
||||||
|
about the bootstrap binaries and compilers?
|
||||||
|
|
||||||
|
*** The current way out: Ignore the problem
|
||||||
|
|
||||||
|
``recipe for yogurt: add yogurt to milk''
|
||||||
|
|
||||||
|
*** New solution: Full source bootstrapping path
|
||||||
|
|
||||||
|
* How?
|
||||||
|
** Software: MesCC-tools, M2-Planet, GNU Mes and MesCC
|
||||||
|
** MesCC-tools
|
||||||
|
|
||||||
|
https://savannah.gnu.org/projects/mescc-tools
|
||||||
|
|
||||||
|
*** hex.0: ~500 byte well-documented, self-hosting hex assembler
|
||||||
|
|
||||||
|
This 500 byte program is written in ASCII hex. When converted
|
||||||
|
byte-for-byte from ASCCI to binary we have the only binary seed that
|
||||||
|
our full source bootstrap path needs.
|
||||||
|
|
||||||
|
We bless this simple and easily verifyable binary and consider it to
|
||||||
|
be source.
|
||||||
|
|
||||||
|
*** hex1: next level hex assembler written in hex.0
|
||||||
|
*** M0: a macro assembler written in hex.1
|
||||||
|
*** M1: a macro assembler written in M0
|
||||||
|
*** hex2: a hex2 linker written in M0
|
||||||
|
*** M2-Planet: a self-hosting M2 (C-with-structs) transpiler written in M1
|
||||||
|
*** GNU Mes: A Scheme interpreter written in C, with cpp transformed into M2
|
||||||
|
*** MesCC: A C compiler written in Scheme
|
||||||
|
*** tcc-boot: a patched version of TinyCC
|
||||||
|
|
||||||
|
** GNU Mes and MesCC
|
||||||
|
|
||||||
|
https://www.gnu.org/software/mes
|
||||||
|
|
||||||
|
*** mes.c: a Scheme interpreter in ~5,000LOC of simple C
|
||||||
|
*** mescc: a C compiler written in Scheme (uses Nyacc C99 parser in Scheme)
|
||||||
|
*** mes.M2: this Scheme interpreter in bootstrappable M2
|
||||||
|
|
||||||
|
** TinyCC
|
||||||
|
|
||||||
|
https://gitlab.com/janneke/tinycc
|
||||||
|
|
||||||
|
* TODO
|
||||||
|
** merge scheme-only bootstrap into Guix.
|
||||||
|
** reduced binary seed bootstrap into NixOS, Debian.
|
||||||
|
** remove or upstream patches from tcc-boot
|
||||||
|
** prepare src/mes.c for M2-Planet transpiler.
|
||||||
|
** ARM, the Hurd
|
||||||
|
** fix bootstrap-loops: (Nyacc?, mes.M2, psyntax.pp?)
|
||||||
|
** make GNU gcc (8.0?) bootstrappable again, remove [need for] tcc stage
|
||||||
|
* DONE
|
||||||
|
** reduced binary seed bootstrap into Guix.
|
||||||
|
** replace Guix bootstrap for x86_64.
|
||||||
|
** replace Guix bootstrap for x86.
|
||||||
|
** add full source gcc-4.7 package build.
|
||||||
|
** bootstrap gcc+glibc-built binutils-20.1, gcc-4.1.0.
|
||||||
|
** have tcc-boot compile gnutools triplet: binutils-2.14, gcc-2.95.3, glibc-2.2.5.
|
||||||
|
** have tcc-boot's mes-tcc compile a fully functional tcc
|
||||||
|
** hex.0, hex.1, M0
|
||||||
|
** M1, hex2_linker in simple C
|
||||||
|
** M2-Planet is now self-hosting, written in M2
|
||||||
|
** mes+mescc are mutual self-hosting
|
||||||
|
** patched tcc compiled with mes+mescc
|
||||||
|
** during development we run mescc on Guile (mes is ~30 times slower)
|
||||||
|
** tcc compiled with gcc is known to compile gcc
|
||||||
|
|
||||||
|
* Contact
|
||||||
|
** bug-mes@gnu.org
|
||||||
|
** #bootstrappable, #guix on freenode
|
||||||
|
** bootstrappable.org
|
|
@ -0,0 +1,674 @@
|
||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
Version 3, 29 June 2007
|
||||||
|
|
||||||
|
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
|
||||||
|
The GNU General Public License is a free, copyleft license for
|
||||||
|
software and other kinds of works.
|
||||||
|
|
||||||
|
The licenses for most software and other practical works are designed
|
||||||
|
to take away your freedom to share and change the works. By contrast,
|
||||||
|
the GNU General Public License is intended to guarantee your freedom to
|
||||||
|
share and change all versions of a program--to make sure it remains free
|
||||||
|
software for all its users. We, the Free Software Foundation, use the
|
||||||
|
GNU General Public License for most of our software; it applies also to
|
||||||
|
any other work released this way by its authors. You can apply it to
|
||||||
|
your programs, too.
|
||||||
|
|
||||||
|
When we speak of free software, we are referring to freedom, not
|
||||||
|
price. Our General Public Licenses are designed to make sure that you
|
||||||
|
have the freedom to distribute copies of free software (and charge for
|
||||||
|
them if you wish), that you receive source code or can get it if you
|
||||||
|
want it, that you can change the software or use pieces of it in new
|
||||||
|
free programs, and that you know you can do these things.
|
||||||
|
|
||||||
|
To protect your rights, we need to prevent others from denying you
|
||||||
|
these rights or asking you to surrender the rights. Therefore, you have
|
||||||
|
certain responsibilities if you distribute copies of the software, or if
|
||||||
|
you modify it: responsibilities to respect the freedom of others.
|
||||||
|
|
||||||
|
For example, if you distribute copies of such a program, whether
|
||||||
|
gratis or for a fee, you must pass on to the recipients the same
|
||||||
|
freedoms that you received. You must make sure that they, too, receive
|
||||||
|
or can get the source code. And you must show them these terms so they
|
||||||
|
know their rights.
|
||||||
|
|
||||||
|
Developers that use the GNU GPL protect your rights with two steps:
|
||||||
|
(1) assert copyright on the software, and (2) offer you this License
|
||||||
|
giving you legal permission to copy, distribute and/or modify it.
|
||||||
|
|
||||||
|
For the developers' and authors' protection, the GPL clearly explains
|
||||||
|
that there is no warranty for this free software. For both users' and
|
||||||
|
authors' sake, the GPL requires that modified versions be marked as
|
||||||
|
changed, so that their problems will not be attributed erroneously to
|
||||||
|
authors of previous versions.
|
||||||
|
|
||||||
|
Some devices are designed to deny users access to install or run
|
||||||
|
modified versions of the software inside them, although the manufacturer
|
||||||
|
can do so. This is fundamentally incompatible with the aim of
|
||||||
|
protecting users' freedom to change the software. The systematic
|
||||||
|
pattern of such abuse occurs in the area of products for individuals to
|
||||||
|
use, which is precisely where it is most unacceptable. Therefore, we
|
||||||
|
have designed this version of the GPL to prohibit the practice for those
|
||||||
|
products. If such problems arise substantially in other domains, we
|
||||||
|
stand ready to extend this provision to those domains in future versions
|
||||||
|
of the GPL, as needed to protect the freedom of users.
|
||||||
|
|
||||||
|
Finally, every program is threatened constantly by software patents.
|
||||||
|
States should not allow patents to restrict development and use of
|
||||||
|
software on general-purpose computers, but in those that do, we wish to
|
||||||
|
avoid the special danger that patents applied to a free program could
|
||||||
|
make it effectively proprietary. To prevent this, the GPL assures that
|
||||||
|
patents cannot be used to render the program non-free.
|
||||||
|
|
||||||
|
The precise terms and conditions for copying, distribution and
|
||||||
|
modification follow.
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
0. Definitions.
|
||||||
|
|
||||||
|
"This License" refers to version 3 of the GNU General Public License.
|
||||||
|
|
||||||
|
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||||
|
works, such as semiconductor masks.
|
||||||
|
|
||||||
|
"The Program" refers to any copyrightable work licensed under this
|
||||||
|
License. Each licensee is addressed as "you". "Licensees" and
|
||||||
|
"recipients" may be individuals or organizations.
|
||||||
|
|
||||||
|
To "modify" a work means to copy from or adapt all or part of the work
|
||||||
|
in a fashion requiring copyright permission, other than the making of an
|
||||||
|
exact copy. The resulting work is called a "modified version" of the
|
||||||
|
earlier work or a work "based on" the earlier work.
|
||||||
|
|
||||||
|
A "covered work" means either the unmodified Program or a work based
|
||||||
|
on the Program.
|
||||||
|
|
||||||
|
To "propagate" a work means to do anything with it that, without
|
||||||
|
permission, would make you directly or secondarily liable for
|
||||||
|
infringement under applicable copyright law, except executing it on a
|
||||||
|
computer or modifying a private copy. Propagation includes copying,
|
||||||
|
distribution (with or without modification), making available to the
|
||||||
|
public, and in some countries other activities as well.
|
||||||
|
|
||||||
|
To "convey" a work means any kind of propagation that enables other
|
||||||
|
parties to make or receive copies. Mere interaction with a user through
|
||||||
|
a computer network, with no transfer of a copy, is not conveying.
|
||||||
|
|
||||||
|
An interactive user interface displays "Appropriate Legal Notices"
|
||||||
|
to the extent that it includes a convenient and prominently visible
|
||||||
|
feature that (1) displays an appropriate copyright notice, and (2)
|
||||||
|
tells the user that there is no warranty for the work (except to the
|
||||||
|
extent that warranties are provided), that licensees may convey the
|
||||||
|
work under this License, and how to view a copy of this License. If
|
||||||
|
the interface presents a list of user commands or options, such as a
|
||||||
|
menu, a prominent item in the list meets this criterion.
|
||||||
|
|
||||||
|
1. Source Code.
|
||||||
|
|
||||||
|
The "source code" for a work means the preferred form of the work
|
||||||
|
for making modifications to it. "Object code" means any non-source
|
||||||
|
form of a work.
|
||||||
|
|
||||||
|
A "Standard Interface" means an interface that either is an official
|
||||||
|
standard defined by a recognized standards body, or, in the case of
|
||||||
|
interfaces specified for a particular programming language, one that
|
||||||
|
is widely used among developers working in that language.
|
||||||
|
|
||||||
|
The "System Libraries" of an executable work include anything, other
|
||||||
|
than the work as a whole, that (a) is included in the normal form of
|
||||||
|
packaging a Major Component, but which is not part of that Major
|
||||||
|
Component, and (b) serves only to enable use of the work with that
|
||||||
|
Major Component, or to implement a Standard Interface for which an
|
||||||
|
implementation is available to the public in source code form. A
|
||||||
|
"Major Component", in this context, means a major essential component
|
||||||
|
(kernel, window system, and so on) of the specific operating system
|
||||||
|
(if any) on which the executable work runs, or a compiler used to
|
||||||
|
produce the work, or an object code interpreter used to run it.
|
||||||
|
|
||||||
|
The "Corresponding Source" for a work in object code form means all
|
||||||
|
the source code needed to generate, install, and (for an executable
|
||||||
|
work) run the object code and to modify the work, including scripts to
|
||||||
|
control those activities. However, it does not include the work's
|
||||||
|
System Libraries, or general-purpose tools or generally available free
|
||||||
|
programs which are used unmodified in performing those activities but
|
||||||
|
which are not part of the work. For example, Corresponding Source
|
||||||
|
includes interface definition files associated with source files for
|
||||||
|
the work, and the source code for shared libraries and dynamically
|
||||||
|
linked subprograms that the work is specifically designed to require,
|
||||||
|
such as by intimate data communication or control flow between those
|
||||||
|
subprograms and other parts of the work.
|
||||||
|
|
||||||
|
The Corresponding Source need not include anything that users
|
||||||
|
can regenerate automatically from other parts of the Corresponding
|
||||||
|
Source.
|
||||||
|
|
||||||
|
The Corresponding Source for a work in source code form is that
|
||||||
|
same work.
|
||||||
|
|
||||||
|
2. Basic Permissions.
|
||||||
|
|
||||||
|
All rights granted under this License are granted for the term of
|
||||||
|
copyright on the Program, and are irrevocable provided the stated
|
||||||
|
conditions are met. This License explicitly affirms your unlimited
|
||||||
|
permission to run the unmodified Program. The output from running a
|
||||||
|
covered work is covered by this License only if the output, given its
|
||||||
|
content, constitutes a covered work. This License acknowledges your
|
||||||
|
rights of fair use or other equivalent, as provided by copyright law.
|
||||||
|
|
||||||
|
You may make, run and propagate covered works that you do not
|
||||||
|
convey, without conditions so long as your license otherwise remains
|
||||||
|
in force. You may convey covered works to others for the sole purpose
|
||||||
|
of having them make modifications exclusively for you, or provide you
|
||||||
|
with facilities for running those works, provided that you comply with
|
||||||
|
the terms of this License in conveying all material for which you do
|
||||||
|
not control copyright. Those thus making or running the covered works
|
||||||
|
for you must do so exclusively on your behalf, under your direction
|
||||||
|
and control, on terms that prohibit them from making any copies of
|
||||||
|
your copyrighted material outside their relationship with you.
|
||||||
|
|
||||||
|
Conveying under any other circumstances is permitted solely under
|
||||||
|
the conditions stated below. Sublicensing is not allowed; section 10
|
||||||
|
makes it unnecessary.
|
||||||
|
|
||||||
|
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||||
|
|
||||||
|
No covered work shall be deemed part of an effective technological
|
||||||
|
measure under any applicable law fulfilling obligations under article
|
||||||
|
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||||
|
similar laws prohibiting or restricting circumvention of such
|
||||||
|
measures.
|
||||||
|
|
||||||
|
When you convey a covered work, you waive any legal power to forbid
|
||||||
|
circumvention of technological measures to the extent such circumvention
|
||||||
|
is effected by exercising rights under this License with respect to
|
||||||
|
the covered work, and you disclaim any intention to limit operation or
|
||||||
|
modification of the work as a means of enforcing, against the work's
|
||||||
|
users, your or third parties' legal rights to forbid circumvention of
|
||||||
|
technological measures.
|
||||||
|
|
||||||
|
4. Conveying Verbatim Copies.
|
||||||
|
|
||||||
|
You may convey verbatim copies of the Program's source code as you
|
||||||
|
receive it, in any medium, provided that you conspicuously and
|
||||||
|
appropriately publish on each copy an appropriate copyright notice;
|
||||||
|
keep intact all notices stating that this License and any
|
||||||
|
non-permissive terms added in accord with section 7 apply to the code;
|
||||||
|
keep intact all notices of the absence of any warranty; and give all
|
||||||
|
recipients a copy of this License along with the Program.
|
||||||
|
|
||||||
|
You may charge any price or no price for each copy that you convey,
|
||||||
|
and you may offer support or warranty protection for a fee.
|
||||||
|
|
||||||
|
5. Conveying Modified Source Versions.
|
||||||
|
|
||||||
|
You may convey a work based on the Program, or the modifications to
|
||||||
|
produce it from the Program, in the form of source code under the
|
||||||
|
terms of section 4, provided that you also meet all of these conditions:
|
||||||
|
|
||||||
|
a) The work must carry prominent notices stating that you modified
|
||||||
|
it, and giving a relevant date.
|
||||||
|
|
||||||
|
b) The work must carry prominent notices stating that it is
|
||||||
|
released under this License and any conditions added under section
|
||||||
|
7. This requirement modifies the requirement in section 4 to
|
||||||
|
"keep intact all notices".
|
||||||
|
|
||||||
|
c) You must license the entire work, as a whole, under this
|
||||||
|
License to anyone who comes into possession of a copy. This
|
||||||
|
License will therefore apply, along with any applicable section 7
|
||||||
|
additional terms, to the whole of the work, and all its parts,
|
||||||
|
regardless of how they are packaged. This License gives no
|
||||||
|
permission to license the work in any other way, but it does not
|
||||||
|
invalidate such permission if you have separately received it.
|
||||||
|
|
||||||
|
d) If the work has interactive user interfaces, each must display
|
||||||
|
Appropriate Legal Notices; however, if the Program has interactive
|
||||||
|
interfaces that do not display Appropriate Legal Notices, your
|
||||||
|
work need not make them do so.
|
||||||
|
|
||||||
|
A compilation of a covered work with other separate and independent
|
||||||
|
works, which are not by their nature extensions of the covered work,
|
||||||
|
and which are not combined with it such as to form a larger program,
|
||||||
|
in or on a volume of a storage or distribution medium, is called an
|
||||||
|
"aggregate" if the compilation and its resulting copyright are not
|
||||||
|
used to limit the access or legal rights of the compilation's users
|
||||||
|
beyond what the individual works permit. Inclusion of a covered work
|
||||||
|
in an aggregate does not cause this License to apply to the other
|
||||||
|
parts of the aggregate.
|
||||||
|
|
||||||
|
6. Conveying Non-Source Forms.
|
||||||
|
|
||||||
|
You may convey a covered work in object code form under the terms
|
||||||
|
of sections 4 and 5, provided that you also convey the
|
||||||
|
machine-readable Corresponding Source under the terms of this License,
|
||||||
|
in one of these ways:
|
||||||
|
|
||||||
|
a) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by the
|
||||||
|
Corresponding Source fixed on a durable physical medium
|
||||||
|
customarily used for software interchange.
|
||||||
|
|
||||||
|
b) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by a
|
||||||
|
written offer, valid for at least three years and valid for as
|
||||||
|
long as you offer spare parts or customer support for that product
|
||||||
|
model, to give anyone who possesses the object code either (1) a
|
||||||
|
copy of the Corresponding Source for all the software in the
|
||||||
|
product that is covered by this License, on a durable physical
|
||||||
|
medium customarily used for software interchange, for a price no
|
||||||
|
more than your reasonable cost of physically performing this
|
||||||
|
conveying of source, or (2) access to copy the
|
||||||
|
Corresponding Source from a network server at no charge.
|
||||||
|
|
||||||
|
c) Convey individual copies of the object code with a copy of the
|
||||||
|
written offer to provide the Corresponding Source. This
|
||||||
|
alternative is allowed only occasionally and noncommercially, and
|
||||||
|
only if you received the object code with such an offer, in accord
|
||||||
|
with subsection 6b.
|
||||||
|
|
||||||
|
d) Convey the object code by offering access from a designated
|
||||||
|
place (gratis or for a charge), and offer equivalent access to the
|
||||||
|
Corresponding Source in the same way through the same place at no
|
||||||
|
further charge. You need not require recipients to copy the
|
||||||
|
Corresponding Source along with the object code. If the place to
|
||||||
|
copy the object code is a network server, the Corresponding Source
|
||||||
|
may be on a different server (operated by you or a third party)
|
||||||
|
that supports equivalent copying facilities, provided you maintain
|
||||||
|
clear directions next to the object code saying where to find the
|
||||||
|
Corresponding Source. Regardless of what server hosts the
|
||||||
|
Corresponding Source, you remain obligated to ensure that it is
|
||||||
|
available for as long as needed to satisfy these requirements.
|
||||||
|
|
||||||
|
e) Convey the object code using peer-to-peer transmission, provided
|
||||||
|
you inform other peers where the object code and Corresponding
|
||||||
|
Source of the work are being offered to the general public at no
|
||||||
|
charge under subsection 6d.
|
||||||
|
|
||||||
|
A separable portion of the object code, whose source code is excluded
|
||||||
|
from the Corresponding Source as a System Library, need not be
|
||||||
|
included in conveying the object code work.
|
||||||
|
|
||||||
|
A "User Product" is either (1) a "consumer product", which means any
|
||||||
|
tangible personal property which is normally used for personal, family,
|
||||||
|
or household purposes, or (2) anything designed or sold for incorporation
|
||||||
|
into a dwelling. In determining whether a product is a consumer product,
|
||||||
|
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||||
|
product received by a particular user, "normally used" refers to a
|
||||||
|
typical or common use of that class of product, regardless of the status
|
||||||
|
of the particular user or of the way in which the particular user
|
||||||
|
actually uses, or expects or is expected to use, the product. A product
|
||||||
|
is a consumer product regardless of whether the product has substantial
|
||||||
|
commercial, industrial or non-consumer uses, unless such uses represent
|
||||||
|
the only significant mode of use of the product.
|
||||||
|
|
||||||
|
"Installation Information" for a User Product means any methods,
|
||||||
|
procedures, authorization keys, or other information required to install
|
||||||
|
and execute modified versions of a covered work in that User Product from
|
||||||
|
a modified version of its Corresponding Source. The information must
|
||||||
|
suffice to ensure that the continued functioning of the modified object
|
||||||
|
code is in no case prevented or interfered with solely because
|
||||||
|
modification has been made.
|
||||||
|
|
||||||
|
If you convey an object code work under this section in, or with, or
|
||||||
|
specifically for use in, a User Product, and the conveying occurs as
|
||||||
|
part of a transaction in which the right of possession and use of the
|
||||||
|
User Product is transferred to the recipient in perpetuity or for a
|
||||||
|
fixed term (regardless of how the transaction is characterized), the
|
||||||
|
Corresponding Source conveyed under this section must be accompanied
|
||||||
|
by the Installation Information. But this requirement does not apply
|
||||||
|
if neither you nor any third party retains the ability to install
|
||||||
|
modified object code on the User Product (for example, the work has
|
||||||
|
been installed in ROM).
|
||||||
|
|
||||||
|
The requirement to provide Installation Information does not include a
|
||||||
|
requirement to continue to provide support service, warranty, or updates
|
||||||
|
for a work that has been modified or installed by the recipient, or for
|
||||||
|
the User Product in which it has been modified or installed. Access to a
|
||||||
|
network may be denied when the modification itself materially and
|
||||||
|
adversely affects the operation of the network or violates the rules and
|
||||||
|
protocols for communication across the network.
|
||||||
|
|
||||||
|
Corresponding Source conveyed, and Installation Information provided,
|
||||||
|
in accord with this section must be in a format that is publicly
|
||||||
|
documented (and with an implementation available to the public in
|
||||||
|
source code form), and must require no special password or key for
|
||||||
|
unpacking, reading or copying.
|
||||||
|
|
||||||
|
7. Additional Terms.
|
||||||
|
|
||||||
|
"Additional permissions" are terms that supplement the terms of this
|
||||||
|
License by making exceptions from one or more of its conditions.
|
||||||
|
Additional permissions that are applicable to the entire Program shall
|
||||||
|
be treated as though they were included in this License, to the extent
|
||||||
|
that they are valid under applicable law. If additional permissions
|
||||||
|
apply only to part of the Program, that part may be used separately
|
||||||
|
under those permissions, but the entire Program remains governed by
|
||||||
|
this License without regard to the additional permissions.
|
||||||
|
|
||||||
|
When you convey a copy of a covered work, you may at your option
|
||||||
|
remove any additional permissions from that copy, or from any part of
|
||||||
|
it. (Additional permissions may be written to require their own
|
||||||
|
removal in certain cases when you modify the work.) You may place
|
||||||
|
additional permissions on material, added by you to a covered work,
|
||||||
|
for which you have or can give appropriate copyright permission.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, for material you
|
||||||
|
add to a covered work, you may (if authorized by the copyright holders of
|
||||||
|
that material) supplement the terms of this License with terms:
|
||||||
|
|
||||||
|
a) Disclaiming warranty or limiting liability differently from the
|
||||||
|
terms of sections 15 and 16 of this License; or
|
||||||
|
|
||||||
|
b) Requiring preservation of specified reasonable legal notices or
|
||||||
|
author attributions in that material or in the Appropriate Legal
|
||||||
|
Notices displayed by works containing it; or
|
||||||
|
|
||||||
|
c) Prohibiting misrepresentation of the origin of that material, or
|
||||||
|
requiring that modified versions of such material be marked in
|
||||||
|
reasonable ways as different from the original version; or
|
||||||
|
|
||||||
|
d) Limiting the use for publicity purposes of names of licensors or
|
||||||
|
authors of the material; or
|
||||||
|
|
||||||
|
e) Declining to grant rights under trademark law for use of some
|
||||||
|
trade names, trademarks, or service marks; or
|
||||||
|
|
||||||
|
f) Requiring indemnification of licensors and authors of that
|
||||||
|
material by anyone who conveys the material (or modified versions of
|
||||||
|
it) with contractual assumptions of liability to the recipient, for
|
||||||
|
any liability that these contractual assumptions directly impose on
|
||||||
|
those licensors and authors.
|
||||||
|
|
||||||
|
All other non-permissive additional terms are considered "further
|
||||||
|
restrictions" within the meaning of section 10. If the Program as you
|
||||||
|
received it, or any part of it, contains a notice stating that it is
|
||||||
|
governed by this License along with a term that is a further
|
||||||
|
restriction, you may remove that term. If a license document contains
|
||||||
|
a further restriction but permits relicensing or conveying under this
|
||||||
|
License, you may add to a covered work material governed by the terms
|
||||||
|
of that license document, provided that the further restriction does
|
||||||
|
not survive such relicensing or conveying.
|
||||||
|
|
||||||
|
If you add terms to a covered work in accord with this section, you
|
||||||
|
must place, in the relevant source files, a statement of the
|
||||||
|
additional terms that apply to those files, or a notice indicating
|
||||||
|
where to find the applicable terms.
|
||||||
|
|
||||||
|
Additional terms, permissive or non-permissive, may be stated in the
|
||||||
|
form of a separately written license, or stated as exceptions;
|
||||||
|
the above requirements apply either way.
|
||||||
|
|
||||||
|
8. Termination.
|
||||||
|
|
||||||
|
You may not propagate or modify a covered work except as expressly
|
||||||
|
provided under this License. Any attempt otherwise to propagate or
|
||||||
|
modify it is void, and will automatically terminate your rights under
|
||||||
|
this License (including any patent licenses granted under the third
|
||||||
|
paragraph of section 11).
|
||||||
|
|
||||||
|
However, if you cease all violation of this License, then your
|
||||||
|
license from a particular copyright holder is reinstated (a)
|
||||||
|
provisionally, unless and until the copyright holder explicitly and
|
||||||
|
finally terminates your license, and (b) permanently, if the copyright
|
||||||
|
holder fails to notify you of the violation by some reasonable means
|
||||||
|
prior to 60 days after the cessation.
|
||||||
|
|
||||||
|
Moreover, your license from a particular copyright holder is
|
||||||
|
reinstated permanently if the copyright holder notifies you of the
|
||||||
|
violation by some reasonable means, this is the first time you have
|
||||||
|
received notice of violation of this License (for any work) from that
|
||||||
|
copyright holder, and you cure the violation prior to 30 days after
|
||||||
|
your receipt of the notice.
|
||||||
|
|
||||||
|
Termination of your rights under this section does not terminate the
|
||||||
|
licenses of parties who have received copies or rights from you under
|
||||||
|
this License. If your rights have been terminated and not permanently
|
||||||
|
reinstated, you do not qualify to receive new licenses for the same
|
||||||
|
material under section 10.
|
||||||
|
|
||||||
|
9. Acceptance Not Required for Having Copies.
|
||||||
|
|
||||||
|
You are not required to accept this License in order to receive or
|
||||||
|
run a copy of the Program. Ancillary propagation of a covered work
|
||||||
|
occurring solely as a consequence of using peer-to-peer transmission
|
||||||
|
to receive a copy likewise does not require acceptance. However,
|
||||||
|
nothing other than this License grants you permission to propagate or
|
||||||
|
modify any covered work. These actions infringe copyright if you do
|
||||||
|
not accept this License. Therefore, by modifying or propagating a
|
||||||
|
covered work, you indicate your acceptance of this License to do so.
|
||||||
|
|
||||||
|
10. Automatic Licensing of Downstream Recipients.
|
||||||
|
|
||||||
|
Each time you convey a covered work, the recipient automatically
|
||||||
|
receives a license from the original licensors, to run, modify and
|
||||||
|
propagate that work, subject to this License. You are not responsible
|
||||||
|
for enforcing compliance by third parties with this License.
|
||||||
|
|
||||||
|
An "entity transaction" is a transaction transferring control of an
|
||||||
|
organization, or substantially all assets of one, or subdividing an
|
||||||
|
organization, or merging organizations. If propagation of a covered
|
||||||
|
work results from an entity transaction, each party to that
|
||||||
|
transaction who receives a copy of the work also receives whatever
|
||||||
|
licenses to the work the party's predecessor in interest had or could
|
||||||
|
give under the previous paragraph, plus a right to possession of the
|
||||||
|
Corresponding Source of the work from the predecessor in interest, if
|
||||||
|
the predecessor has it or can get it with reasonable efforts.
|
||||||
|
|
||||||
|
You may not impose any further restrictions on the exercise of the
|
||||||
|
rights granted or affirmed under this License. For example, you may
|
||||||
|
not impose a license fee, royalty, or other charge for exercise of
|
||||||
|
rights granted under this License, and you may not initiate litigation
|
||||||
|
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||||
|
any patent claim is infringed by making, using, selling, offering for
|
||||||
|
sale, or importing the Program or any portion of it.
|
||||||
|
|
||||||
|
11. Patents.
|
||||||
|
|
||||||
|
A "contributor" is a copyright holder who authorizes use under this
|
||||||
|
License of the Program or a work on which the Program is based. The
|
||||||
|
work thus licensed is called the contributor's "contributor version".
|
||||||
|
|
||||||
|
A contributor's "essential patent claims" are all patent claims
|
||||||
|
owned or controlled by the contributor, whether already acquired or
|
||||||
|
hereafter acquired, that would be infringed by some manner, permitted
|
||||||
|
by this License, of making, using, or selling its contributor version,
|
||||||
|
but do not include claims that would be infringed only as a
|
||||||
|
consequence of further modification of the contributor version. For
|
||||||
|
purposes of this definition, "control" includes the right to grant
|
||||||
|
patent sublicenses in a manner consistent with the requirements of
|
||||||
|
this License.
|
||||||
|
|
||||||
|
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||||
|
patent license under the contributor's essential patent claims, to
|
||||||
|
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||||
|
propagate the contents of its contributor version.
|
||||||
|
|
||||||
|
In the following three paragraphs, a "patent license" is any express
|
||||||
|
agreement or commitment, however denominated, not to enforce a patent
|
||||||
|
(such as an express permission to practice a patent or covenant not to
|
||||||
|
sue for patent infringement). To "grant" such a patent license to a
|
||||||
|
party means to make such an agreement or commitment not to enforce a
|
||||||
|
patent against the party.
|
||||||
|
|
||||||
|
If you convey a covered work, knowingly relying on a patent license,
|
||||||
|
and the Corresponding Source of the work is not available for anyone
|
||||||
|
to copy, free of charge and under the terms of this License, through a
|
||||||
|
publicly available network server or other readily accessible means,
|
||||||
|
then you must either (1) cause the Corresponding Source to be so
|
||||||
|
available, or (2) arrange to deprive yourself of the benefit of the
|
||||||
|
patent license for this particular work, or (3) arrange, in a manner
|
||||||
|
consistent with the requirements of this License, to extend the patent
|
||||||
|
license to downstream recipients. "Knowingly relying" means you have
|
||||||
|
actual knowledge that, but for the patent license, your conveying the
|
||||||
|
covered work in a country, or your recipient's use of the covered work
|
||||||
|
in a country, would infringe one or more identifiable patents in that
|
||||||
|
country that you have reason to believe are valid.
|
||||||
|
|
||||||
|
If, pursuant to or in connection with a single transaction or
|
||||||
|
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||||
|
covered work, and grant a patent license to some of the parties
|
||||||
|
receiving the covered work authorizing them to use, propagate, modify
|
||||||
|
or convey a specific copy of the covered work, then the patent license
|
||||||
|
you grant is automatically extended to all recipients of the covered
|
||||||
|
work and works based on it.
|
||||||
|
|
||||||
|
A patent license is "discriminatory" if it does not include within
|
||||||
|
the scope of its coverage, prohibits the exercise of, or is
|
||||||
|
conditioned on the non-exercise of one or more of the rights that are
|
||||||
|
specifically granted under this License. You may not convey a covered
|
||||||
|
work if you are a party to an arrangement with a third party that is
|
||||||
|
in the business of distributing software, under which you make payment
|
||||||
|
to the third party based on the extent of your activity of conveying
|
||||||
|
the work, and under which the third party grants, to any of the
|
||||||
|
parties who would receive the covered work from you, a discriminatory
|
||||||
|
patent license (a) in connection with copies of the covered work
|
||||||
|
conveyed by you (or copies made from those copies), or (b) primarily
|
||||||
|
for and in connection with specific products or compilations that
|
||||||
|
contain the covered work, unless you entered into that arrangement,
|
||||||
|
or that patent license was granted, prior to 28 March 2007.
|
||||||
|
|
||||||
|
Nothing in this License shall be construed as excluding or limiting
|
||||||
|
any implied license or other defenses to infringement that may
|
||||||
|
otherwise be available to you under applicable patent law.
|
||||||
|
|
||||||
|
12. No Surrender of Others' Freedom.
|
||||||
|
|
||||||
|
If conditions are imposed on you (whether by court order, agreement or
|
||||||
|
otherwise) that contradict the conditions of this License, they do not
|
||||||
|
excuse you from the conditions of this License. If you cannot convey a
|
||||||
|
covered work so as to satisfy simultaneously your obligations under this
|
||||||
|
License and any other pertinent obligations, then as a consequence you may
|
||||||
|
not convey it at all. For example, if you agree to terms that obligate you
|
||||||
|
to collect a royalty for further conveying from those to whom you convey
|
||||||
|
the Program, the only way you could satisfy both those terms and this
|
||||||
|
License would be to refrain entirely from conveying the Program.
|
||||||
|
|
||||||
|
13. Use with the GNU Affero General Public License.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, you have
|
||||||
|
permission to link or combine any covered work with a work licensed
|
||||||
|
under version 3 of the GNU Affero General Public License into a single
|
||||||
|
combined work, and to convey the resulting work. The terms of this
|
||||||
|
License will continue to apply to the part which is the covered work,
|
||||||
|
but the special requirements of the GNU Affero General Public License,
|
||||||
|
section 13, concerning interaction through a network will apply to the
|
||||||
|
combination as such.
|
||||||
|
|
||||||
|
14. Revised Versions of this License.
|
||||||
|
|
||||||
|
The Free Software Foundation may publish revised and/or new versions of
|
||||||
|
the GNU General Public License from time to time. Such new versions will
|
||||||
|
be similar in spirit to the present version, but may differ in detail to
|
||||||
|
address new problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the
|
||||||
|
Program specifies that a certain numbered version of the GNU General
|
||||||
|
Public License "or any later version" applies to it, you have the
|
||||||
|
option of following the terms and conditions either of that numbered
|
||||||
|
version or of any later version published by the Free Software
|
||||||
|
Foundation. If the Program does not specify a version number of the
|
||||||
|
GNU General Public License, you may choose any version ever published
|
||||||
|
by the Free Software Foundation.
|
||||||
|
|
||||||
|
If the Program specifies that a proxy can decide which future
|
||||||
|
versions of the GNU General Public License can be used, that proxy's
|
||||||
|
public statement of acceptance of a version permanently authorizes you
|
||||||
|
to choose that version for the Program.
|
||||||
|
|
||||||
|
Later license versions may give you additional or different
|
||||||
|
permissions. However, no additional obligations are imposed on any
|
||||||
|
author or copyright holder as a result of your choosing to follow a
|
||||||
|
later version.
|
||||||
|
|
||||||
|
15. Disclaimer of Warranty.
|
||||||
|
|
||||||
|
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||||
|
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||||
|
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||||
|
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||||
|
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||||
|
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||||
|
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||||
|
|
||||||
|
16. Limitation of Liability.
|
||||||
|
|
||||||
|
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||||
|
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||||
|
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||||
|
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||||
|
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||||
|
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||||
|
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||||
|
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||||
|
SUCH DAMAGES.
|
||||||
|
|
||||||
|
17. Interpretation of Sections 15 and 16.
|
||||||
|
|
||||||
|
If the disclaimer of warranty and limitation of liability provided
|
||||||
|
above cannot be given local legal effect according to their terms,
|
||||||
|
reviewing courts shall apply local law that most closely approximates
|
||||||
|
an absolute waiver of all civil liability in connection with the
|
||||||
|
Program, unless a warranty or assumption of liability accompanies a
|
||||||
|
copy of the Program in return for a fee.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
How to Apply These Terms to Your New Programs
|
||||||
|
|
||||||
|
If you develop a new program, and you want it to be of the greatest
|
||||||
|
possible use to the public, the best way to achieve this is to make it
|
||||||
|
free software which everyone can redistribute and change under these terms.
|
||||||
|
|
||||||
|
To do so, attach the following notices to the program. It is safest
|
||||||
|
to attach them to the start of each source file to most effectively
|
||||||
|
state the exclusion of warranty; and each file should have at least
|
||||||
|
the "copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
|
<one line to give the program's name and a brief idea of what it does.>
|
||||||
|
Copyright (C) <year> <name of author>
|
||||||
|
|
||||||
|
This program 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.
|
||||||
|
|
||||||
|
This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
If the program does terminal interaction, make it output a short
|
||||||
|
notice like this when it starts in an interactive mode:
|
||||||
|
|
||||||
|
<program> Copyright (C) <year> <name of author>
|
||||||
|
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||||
|
This is free software, and you are welcome to redistribute it
|
||||||
|
under certain conditions; type `show c' for details.
|
||||||
|
|
||||||
|
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||||
|
parts of the General Public License. Of course, your program's commands
|
||||||
|
might be different; for a GUI interface, you would use an "about box".
|
||||||
|
|
||||||
|
You should also get your employer (if you work as a programmer) or school,
|
||||||
|
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||||
|
For more information on this, and how to apply and follow the GNU GPL, see
|
||||||
|
<http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
The GNU General Public License does not permit incorporating your program
|
||||||
|
into proprietary programs. If your program is a subroutine library, you
|
||||||
|
may consider it more useful to permit linking proprietary applications with
|
||||||
|
the library. If this is what you want to do, use the GNU Lesser General
|
||||||
|
Public License instead of this License. But first, please read
|
||||||
|
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,111 @@
|
||||||
|
-*- org -*-
|
||||||
|
#+TITLE: Building and Installing GNU Mes
|
||||||
|
|
||||||
|
Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
|
|
||||||
|
Copying and distribution of this file, with or without modification,
|
||||||
|
are permitted in any medium without royalty provided the copyright
|
||||||
|
notice and this notice are preserved.
|
||||||
|
|
||||||
|
Mes can be built in two modes: as a regulare package build or as a
|
||||||
|
bootstrap package.
|
||||||
|
|
||||||
|
After bootstrapping Mes it can be used to bootstrap TinyCC (tcc) in a
|
||||||
|
similar way.
|
||||||
|
|
||||||
|
* Get it
|
||||||
|
git clone [[git://git.savannah.gnu.org][git://git.savannah.gnu.org/mes.git]]
|
||||||
|
|
||||||
|
* Regular build
|
||||||
|
** Prerequisites
|
||||||
|
*** Guix
|
||||||
|
#+BEGIN_SRC bash
|
||||||
|
guix environment -l guix.scm #64 bit + 32bit
|
||||||
|
guix environment --system=i686-linux -l guix.scm #32 bit only
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
*** Other GNU/Linux
|
||||||
|
- [[https://savannah.gnu.org/projects/mescc-tools/][mescc-tools]], 0.6.1 is known to work.
|
||||||
|
- [[https://savannah.gnu.org/projects/nyacc][Nyacc]], 0.93.0 is known to work.
|
||||||
|
- GNU Gcc, 4.9.3 is known to work.
|
||||||
|
- GNU Guile, version 2.0.12 or is know to work.
|
||||||
|
- SH, /bin/sh, GNU Bash 4.3 is known to work.
|
||||||
|
- GNU coreutils
|
||||||
|
- sed, GNU sed 4.2 is known to work.
|
||||||
|
- Perl, 5.22 is known to work.
|
||||||
|
|
||||||
|
** Build it
|
||||||
|
|
||||||
|
#+BEGIN_SRC bash
|
||||||
|
./configure
|
||||||
|
make
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
If you get something like
|
||||||
|
|
||||||
|
#+BEGIN_SRC bash
|
||||||
|
mes.c:(.text+0x8da0): undefined reference to `__stack_chk_fail'
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
then your compiler inserts stack protection code. The Mes C Library
|
||||||
|
does not support that. Turn it off lik this
|
||||||
|
|
||||||
|
#+BEGIN_SRC bash
|
||||||
|
./configure CFLAGS=-fno-stack-protector
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
** Check it
|
||||||
|
|
||||||
|
#+BEGIN_SRC bash
|
||||||
|
make check
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
** Install it
|
||||||
|
|
||||||
|
#+BEGIN_SRC bash
|
||||||
|
make install
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
* Guix it
|
||||||
|
|
||||||
|
#+BEGIN_SRC bash
|
||||||
|
guix build -f guix.scm
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
* Bootstrap build
|
||||||
|
|
||||||
|
The bootstrap build is part of Guix, see
|
||||||
|
https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/commencement.scm
|
||||||
|
|
||||||
|
** Prerequisites
|
||||||
|
- [[https://savannah.gnu.org/projects/mescc-tools/][mescc-tools]], 0.6.1 is known to work.
|
||||||
|
- [[https://savannah.gnu.org/projects/nyacc][Nyacc]], 0.93.0 is known to work.
|
||||||
|
|
||||||
|
** Build it
|
||||||
|
|
||||||
|
#+BEGIN_SRC bash
|
||||||
|
sh configure.sh [--prefix=<prefix>]
|
||||||
|
sh bootstrap.sh
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
** Check it
|
||||||
|
|
||||||
|
#+BEGIN_SRC bash
|
||||||
|
sh check.sh
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
** Install it
|
||||||
|
|
||||||
|
#+BEGIN_SRC bash
|
||||||
|
sh install.sh
|
||||||
|
#+END_SRC
|
||||||
|
* Regular build and bootstrap combine
|
||||||
|
|
||||||
|
To build mes.c using MesCC, configure using --with-bootstrap:
|
||||||
|
|
||||||
|
#+BEGIN_SRC bash
|
||||||
|
./configure --with-bootstrap
|
||||||
|
make
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
This creates bin/mes-gcc and bin/mes-mescc.
|
|
@ -0,0 +1,599 @@
|
||||||
|
-*- org -*-
|
||||||
|
#+TITLE: GNU Mes NEWS – history of user-visible changes
|
||||||
|
#+STARTUP: content hidestars
|
||||||
|
|
||||||
|
Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
|
|
||||||
|
Copying and distribution of this file, with or without modification,
|
||||||
|
are permitted in any medium without royalty provided the copyright
|
||||||
|
notice and this notice are preserved.
|
||||||
|
|
||||||
|
Please send Mes bug reports to bug-mes@gnu.org.
|
||||||
|
|
||||||
|
* Changes in 0.22 since 0.21
|
||||||
|
** Core
|
||||||
|
*** Mes now builds reproducibly with MesCC, cross distribution
|
||||||
|
Using --with-bootstrap on x86, a bin/mes-mescc is compiled with
|
||||||
|
mes+mescc, that shall have sha256sum
|
||||||
|
|
||||||
|
9e0bcb1633c58e7bc415f6ea27cee7951d6b0658e13cdc147e992b31a14625fb bin/mes-mescc
|
||||||
|
|
||||||
|
This has been verified on GNU Guix, Debian GNU/Linux and NixOS.
|
||||||
|
*** Mes now builds reproducibly with Guile+MesCC vs Mes+MesCC.
|
||||||
|
*** Mes now builds reproducibly with Tiny CC-built MesCC.
|
||||||
|
*** configure now respects the user's CFLAGS, CPPFLAGS and LDFLAGS.
|
||||||
|
*** Mes now supports mescc-tools 0.5.2 next to 0.6.1.
|
||||||
|
This allows introducing the Scheme-only bootstrap without updating or
|
||||||
|
adding new bootstrap binary seeds into GNU Guix.
|
||||||
|
*** Mes now runs when configured --with-courage on the Hurd:
|
||||||
|
GNU debian 0.9 GNU-Mach 1.8+git20170609-486/Hurd-0.9 i686-AT386 GNU
|
||||||
|
Note that mescc does not run; fork and exec are not yet implemented.
|
||||||
|
*** Mes now configures --with-courage on x86-FreeBSD 12.1
|
||||||
|
The initial ELF scaffold tests: exit-42.S, 0exit-42.hex2,
|
||||||
|
body-exit-42.hex2, hello-mes.S, 0hello-mes.hex2, body-hello-mes.hex2
|
||||||
|
pass.
|
||||||
|
*** configure now has a --with-bootstrap option.
|
||||||
|
This adds the reproducible bootstrap build of bin/mes-mescc, using
|
||||||
|
mes+mescc.
|
||||||
|
*** configure prefers $CC over gcc; tcc over gcc, gcc over cc.
|
||||||
|
*** Mes now prints an error when attempting to read a file that does not exist.
|
||||||
|
*** Mes no longer depends on GIT.
|
||||||
|
** Noteworthy bug fixes
|
||||||
|
*** Several annoying build problems were fixed, for non-Guix systems.
|
||||||
|
*** A bug with buffered-read was fixed.
|
||||||
|
This means that bash-2.05 can now build glibc-2.2.5; notably it now
|
||||||
|
successfully executes make-syscall.sh.
|
||||||
|
*** A bug with execlp, execvp for file names containing a slash was fixed.
|
||||||
|
This should allow make-3.80 running scripts that have "#! ./move-if-change".
|
||||||
|
* Changes in 0.21 since 0.20
|
||||||
|
** Core
|
||||||
|
*** Mes can now be bootstrapped with Gash and Gash Core Utils.
|
||||||
|
*** Mes now supports a Scheme-only bootstrap.
|
||||||
|
*** Mes now supports -c EXPR.
|
||||||
|
** MesCC
|
||||||
|
*** Mes C Library now supports bootstrapping GNU Awk, GNU Bash, GNU SED, and GNU Tar.
|
||||||
|
*** Mes C Library now has limited float support in vfprintf, vsnprintf, vsscanf.
|
||||||
|
**** 7 new functions
|
||||||
|
abtod, atof, creat, dtoab, execlp, isgraph, mknod, readlink, strtod,
|
||||||
|
symlink.
|
||||||
|
**** 5 new stubs
|
||||||
|
getgrgid, getgrnam, getpgid, getpgrp, mktime, setgrent.
|
||||||
|
** Noteworthy bug fixes
|
||||||
|
*** A bug with `mes -c EXPR' has been fixed.
|
||||||
|
*** The REPL now works again on x86_64.
|
||||||
|
*** --with-system-libc now works again.
|
||||||
|
* Changes in 0.20 since 0.19
|
||||||
|
** Core
|
||||||
|
*** The build system has been simplified, again.
|
||||||
|
Mes now builds ootb on Debian.
|
||||||
|
*** Mes now supports -c EXPR.
|
||||||
|
** Divide by zero is now flagged.
|
||||||
|
** Language
|
||||||
|
*** 1 new function:
|
||||||
|
take-while.
|
||||||
|
** MesCC
|
||||||
|
*** The C libraries have been exploded into one function per file.
|
||||||
|
*** MesCC now has enhanced POSIX/gcc comand line support, e.g. -DFOO=1,
|
||||||
|
-nodefaultlibs,
|
||||||
|
-nostartfiles,
|
||||||
|
-nostdlib.
|
||||||
|
*** The archiver is now called `mesar'.
|
||||||
|
*** MesCC now supports Nyacc-0.99.
|
||||||
|
*** MesCC now depends on MesCC-Tools 0.6.0.
|
||||||
|
*** 1 new function
|
||||||
|
__mesabi_uldiv.
|
||||||
|
** Noteworthy bug fixes
|
||||||
|
*** map and for-each now support lists with unequal length.
|
||||||
|
*** interger division has been fixed.
|
||||||
|
*** isatty now looks at terminfo.
|
||||||
|
*** signal now uses sigaction correctly for non-x86.
|
||||||
|
*** string->number now support #x hex-prefix.
|
||||||
|
*** ungetc now has a buffer per file handle.
|
||||||
|
* Changes in 0.19 since 0.18
|
||||||
|
** Core
|
||||||
|
*** The build system has been simplified.
|
||||||
|
*** Mes now prints a backtrace upon error.
|
||||||
|
*** Performance has been improved 2-8 times, making Mes 2-10 times slower than Guile.
|
||||||
|
*** Mes now supports a module type and uses a `boot-module'.
|
||||||
|
*** Mes now supports a hash_table type.
|
||||||
|
*** Mes now supports a struct type.
|
||||||
|
*** Mes now supports building a %bootstrap-mes seed from Guix.
|
||||||
|
** Language
|
||||||
|
*** Records are now implemented using struct (WAS: vector).
|
||||||
|
*** 44 new functions
|
||||||
|
ceil, char-downcase, char-set-adjoin, char-set-complement,
|
||||||
|
char-upcase, current-time, delete-file, dup, dup2, file-exists?,
|
||||||
|
floor, frame-printer, get-internal-run-time, getcwd, gettimeofday,
|
||||||
|
hash, hash-ref, hash-set!, hash-table-printer, hashq,
|
||||||
|
hashq-get-handle, hashq-ref, hashq-set, inexact->exact,
|
||||||
|
make-hash-table, make-stack, make-struct, module-define!,
|
||||||
|
module-printer, module-ref, module-variable, read-line, round,
|
||||||
|
stack-length, stack-ref, string-downcase, string-tokenize,
|
||||||
|
string-upcase, struct-length, struct-ref, struct-set! struct-vtable,
|
||||||
|
struct-vtable, with-error-to-file.
|
||||||
|
** MesCC
|
||||||
|
*** Assembly defines have been cleaned-up: duplicates deleted, missing added, wrong fixed.
|
||||||
|
*** MesCC now supports compiling GNU Bash and GNU Tar.
|
||||||
|
**** 6 New functions
|
||||||
|
getegid, geteuid, getppid, setgid, setuid, sigdelset, sigprocmask.
|
||||||
|
**** 22 New macros
|
||||||
|
EACCES, ENOSPC, ESPIPE, INT16_MAX, INT16_MIN, INT32_MAX, INT32_MIN,
|
||||||
|
INT64_MAX, INT64_MIN, INT8_MAX, INT8_MIN, LLONG_MAX, LLONG_MIN,
|
||||||
|
SIZE_MAX SYS_getegid, SYS_geteuid, SYS_setgid SYS_setuid, S_IRGRP,
|
||||||
|
S_IROTH, S_IRWXG, S_IRWXO S_ISGID, S_ISUID, S_IWGRP, S_IWOTH, S_IXGRP,
|
||||||
|
S_IXOTH, UINT16_MAX, UINT32_MAX, UINT64_MAX, UINT8_MAX,
|
||||||
|
_POSIX_VERSION.
|
||||||
|
** Noteworthy bug fixes
|
||||||
|
*** Mes now supports characters #\xNN.
|
||||||
|
*** Mes now supports assq-ref and assoc-ref with alist == #f.
|
||||||
|
*** Mes now support \xNN in strings. Fixes using Nyacc-0.86.0.
|
||||||
|
*** MesCC now supports the unary plus operator.
|
||||||
|
*** MesCC now supports the `U' integer suffix.
|
||||||
|
*** MesCC now comes with INTnn_MIN/MAX, UINTnn defines in stdint.h.
|
||||||
|
*** MesCC now always exits non-zero when assembler or linker fail.
|
||||||
|
* Changes in 0.18 since 0.17.1
|
||||||
|
** Core
|
||||||
|
*** Mes/MesCC now supports x86_64.
|
||||||
|
*** Mes/MesCC now brings a Reduced Binary Seed bootstrap to GuixSD.
|
||||||
|
** Language
|
||||||
|
*** fold-right now supports 3 lists.
|
||||||
|
** MesCC
|
||||||
|
*** MesCC now supports x86_64 (also as cross build), using -m 64.
|
||||||
|
*** Mes C Library now has better support for bootstrapping gcc-3.0.
|
||||||
|
*** Mes C test suite now has 178 tests; 74 tests were added.
|
||||||
|
*** MesCC has been refactored to support use an abstracted assembly language.
|
||||||
|
*** MesCC now uses Nyacc 0.86.0.
|
||||||
|
** Noteworthy bug fixes
|
||||||
|
*** scaffold/tests/7s-struct-short.c has been fixed.
|
||||||
|
* Changes in 0.17.1 since 0.17
|
||||||
|
** MesCC
|
||||||
|
*** Mes C Library has now been exploded into a separate C file per function.
|
||||||
|
*** Mes C Library now bootstraps glibc-2.16.0, binutils-2.20.1, gcc-4.7.4.
|
||||||
|
*** Mes C Library now supports compiling make-3.82.
|
||||||
|
*** Mes C Library now supports compiling diffutils-2.7.
|
||||||
|
*** Mes C Library now supports x86_64.
|
||||||
|
**** 7 new functions
|
||||||
|
chdir, clock_gettime, closedir, execl, opendir, readdir, time.
|
||||||
|
**** 5 new stubs
|
||||||
|
getlogin, setlocale, setvbuf, sigaddset, sigblock.
|
||||||
|
** Noteworthy bug fixes
|
||||||
|
*** qsort can now handle lists with duplicate entries.
|
||||||
|
|
||||||
|
* Changes in 0.17 since 0.16.1
|
||||||
|
** Core
|
||||||
|
*** GNU Mes is now an official GNU package.
|
||||||
|
*** MesCC is now installed as a regular Guile package.
|
||||||
|
*** Support --srcdir build.
|
||||||
|
*** Support all standard GNU make targets.
|
||||||
|
** MesCC
|
||||||
|
*** Mes C Lib now bootstraps glibc-2.2.5, binutils-2.20.1, gcc-4.7.4.
|
||||||
|
* Changes in 0.16.1 since 0.16
|
||||||
|
** Core
|
||||||
|
*** Mes now builds out of the box on Debian buster/testing.
|
||||||
|
*** Mes now comes with a generic build recipe: build-aux/setup-mes.sh.
|
||||||
|
*** Mes now comes with INFO documentation.
|
||||||
|
** MesCC
|
||||||
|
*** MesCC now exits if spawning BLOOD_ELF, M1, or HEX2 fails.
|
||||||
|
* Changes in 0.16 since 0.15
|
||||||
|
** Core
|
||||||
|
*** Support building with tcc, including Mes C Lib in-line assembly.
|
||||||
|
*** core:execl now supports 1000 arguments.
|
||||||
|
** MesCC
|
||||||
|
*** Mes C Lib now bootstraps glibc-2.2.5, binutils-2.20.1, gcc-4.1.0.
|
||||||
|
*** MesCC binaries now run on Linux 4.17 too, i.e. survive Linus' new `sane mmap limits.'
|
||||||
|
*** MesCC now runs with mescc-tools 0.5 (no = in long options).
|
||||||
|
**** 3 new C test
|
||||||
|
88-strrchrc, 97-fopen.c, 98-fopen.c.
|
||||||
|
** Noteworthy bug fixes
|
||||||
|
*** strrchr now stops when it reaches start of string.
|
||||||
|
*** fopen now return 0 upon failure. Supports binutils' hack: fd=-2 means `cached'.
|
||||||
|
*** vfprintf, vsprintf now support precision and width on integers strings better.
|
||||||
|
*** fread now produces ungetc'd chars too.
|
||||||
|
*** memcmp now supports comparing 0 bytes, supporting binutils.
|
||||||
|
|
||||||
|
*** The unused ELF header data section, identical to the text section, has been removed.
|
||||||
|
* Changes in 0.15 since 0.14
|
||||||
|
** Core
|
||||||
|
*** Support fork, exec, waitpid.
|
||||||
|
*** Boot-0 loading has been refactored.
|
||||||
|
*** MesCC now has out of the box Geiser support.
|
||||||
|
** Language
|
||||||
|
*** 2 new functions
|
||||||
|
drop, drop-right.
|
||||||
|
** MesCC
|
||||||
|
*** MesCC and Mes C Lib can now build binutils-2.30, gcc-2.95.3 and glibc-2.2.5.
|
||||||
|
*** MesCC now provides dummy crti.o, crtn.o so that tcc needs not be patched for those.
|
||||||
|
*** Mes C Lib now supports compiling glibc-2.2.25.
|
||||||
|
*** Mes C Lib now supports compiling gcc-2.95.3
|
||||||
|
*** Mes C Lib now supports compiling binutils-2.30.
|
||||||
|
*** Mes C Lib now supports compiling m4-1.4.
|
||||||
|
*** Mes C Lib has been split into archs: gcc, x86-mes-gcc and x86-mes.
|
||||||
|
*** MesCC now has a posixy command line interface.
|
||||||
|
**** 70 new functions
|
||||||
|
abs, access, alarm, alloca, atexit, atol, bcmp, bcopy, brk, bzero,
|
||||||
|
chmod, clearerr, close, dup, dup2, execve, fabs, fcntl, fdgets, feof,
|
||||||
|
fgets, fileno, fork, freopen, fscanf, fstat, fsync, getcwd, getgid,
|
||||||
|
getpid, getrusage, getuid, index, ioctl, isalnum, isalpha, isascii,
|
||||||
|
iscntrl, isprint, ispunct, kill, link, lseek, lstat, mkdir, mktemp,
|
||||||
|
nanosleep, open, perror, pipe, raise, read, rename, rindex, rmdir,
|
||||||
|
sbrk, sbrk, setitimer, signal, sleep, stat, strcspn, strdup, strerror,
|
||||||
|
strncat, strpbrk, strspn, unlink, unsetenv, waitpid.
|
||||||
|
**** 23 new stubs
|
||||||
|
abort, atof, bsearch, bsearch, chown, ctime, fpurge, freadahead,
|
||||||
|
frexp, getpwnam, gmtime, mbstowcs, pclose, popen, rewind, setbuf,
|
||||||
|
sigsetmask, strftime, sys_siglist, system, times, umask, utime.
|
||||||
|
**** 10 new C tests
|
||||||
|
51-strcmp.c, 70-printf.c, 87-sscanf.c, 90-strpbrk.c, 91-fseek.c,
|
||||||
|
92-stat.c, 93-fread-fwrite.c, 94-unsetenv.c, 95-signal.c, 96-strto.c.
|
||||||
|
|
||||||
|
* Changes in 0.14 since 0.13
|
||||||
|
** Core
|
||||||
|
*** Bootstrapped Mes+MesCC now compiles a tcc that is self-hosting and only slightly patched.
|
||||||
|
*** The reader now supports binary numbers (previously: read as decimal).
|
||||||
|
*** String port support has been moved to C.
|
||||||
|
*** The build has been simplified, the Make-in-Scheme experiment has been removed.
|
||||||
|
*** 2 new functions
|
||||||
|
chmod, logxor.
|
||||||
|
** Language
|
||||||
|
*** Mes now supports define-immutable-record-type and single set-field from srfi-9 gnu.
|
||||||
|
*** 12 new functions
|
||||||
|
basename, chmod, const, delete-duplicates, logxor, string-contains,
|
||||||
|
string-map, string-replace, string-trim, string-trim-both,
|
||||||
|
string-trim-right, unfold.
|
||||||
|
** MesCC
|
||||||
|
*** MesCC now supports standalone usage of nestedly defined enums, structs and unions.
|
||||||
|
*** MesCC now supports comparison of unsigned and promotion of signed/unsigned -> unsigned.
|
||||||
|
*** MesCC now supports sign extension for char, short.
|
||||||
|
*** MesCC now has stubbing for floats; compiling works, data is fu.
|
||||||
|
*** MesCC now has full suport for switch case, e.g. with default as first clause.
|
||||||
|
*** MesCC now supports destruction of casted expressions: ((struct foo*)p)->bar.
|
||||||
|
*** MesCC now has full support for pre/post, e.g.: (foo--)->bar and permutations.
|
||||||
|
*** MesCC now supports sizeof any expression or type.
|
||||||
|
*** MesCC now supports initialization of anonymous unions.
|
||||||
|
*** MesCC now supports bit fields.
|
||||||
|
*** MesCC now supports valued functions in expressions: destruction and dereferencing.
|
||||||
|
*** MesCC now supports function-static variables.
|
||||||
|
*** MesCC now supports initializer lists in structs and unions.
|
||||||
|
*** MesCC now has full support for heterogeneous variable declarations, e.g.: char p, *x = "foo", buf[3];
|
||||||
|
**** 4 new functions
|
||||||
|
__lshrdi3, __ashldi3, __ashrdi3, strncpy.
|
||||||
|
**** 9 new mlibc stubs
|
||||||
|
__fixdfdi, __fixsfdi, __fixunsxfdi, __fixxfdi, __floatundixf, ldexp,
|
||||||
|
strtod, strtof, strtold.
|
||||||
|
* Changes in 0.13 since 0.12
|
||||||
|
** Core
|
||||||
|
*** Bootstrapped Mes+MesCC can now compile a patched tcc in ~1h45' (~25,000 LOC).
|
||||||
|
*** MesCC scripts for Mes and Guile are now merged; executable is: `mescc'.
|
||||||
|
*** Mes now uses only one arena for stop-and-copy; doubles available size.
|
||||||
|
*** Mes now has a Guile-like command-line interface (mes.repl has been removed).
|
||||||
|
*** Mes now boots into a full Scheme by default.
|
||||||
|
*** Mes can now be compiled (MES_MINI=1) to boot into a minimal Scheme (~2000 cells).
|
||||||
|
*** Mes now creates less garbage in the reader and in
|
||||||
|
append2, append_reverse, reverse, reverse!, vector-for-each, vector-to-list, vector-map.
|
||||||
|
*** 5 new functions
|
||||||
|
append-reverse, chmod, ioctl, isatty, isspace, last_pair, reverse!.
|
||||||
|
** Language
|
||||||
|
*** 3 new functions
|
||||||
|
char-whitespace?, chmod, isatty?
|
||||||
|
** Noteworthy bug fixes
|
||||||
|
*** Two bugs in the jam scraper/garbage collector have been fixed.
|
||||||
|
*** equal2_p now uses tail call elimination.
|
||||||
|
*** Escaped characters in strings are now read and write'd correctly.
|
||||||
|
*** The repl now expands macros again.
|
||||||
|
* Changes in 0.12 since 0.11
|
||||||
|
** Core
|
||||||
|
*** Mes can now run Nyacc (0.80.42) to compile itself in ~4min (~3000 LOC).
|
||||||
|
*** Mes now recursively expands global variables per top level statement.
|
||||||
|
*** Mes now recursively expands macros per top level statement.
|
||||||
|
*** Mes now boots from MES_BOOT (default: module/mes/boot-0.scm).
|
||||||
|
*** Mes now has a full Scheme reader in C again.
|
||||||
|
This gives a 10x-20x performance improvement and increases the
|
||||||
|
bootstrap footprint by 160 LOC.
|
||||||
|
*** Mes reader now supports older abbreviated character forms
|
||||||
|
#\bel, #\bs, #\ht and #\vt.
|
||||||
|
*** 3 new functions
|
||||||
|
equal2?, memq, core:write.
|
||||||
|
** Language
|
||||||
|
*** Mes now has an incremental Scheme semantics test suite with 71 small tests.
|
||||||
|
*** Variable names can now have ticks.
|
||||||
|
*** Mes now evaluates expresions of COND only once.
|
||||||
|
*** srfi-9 records have been reimplemented.
|
||||||
|
*** #\page is now whitespace.
|
||||||
|
*** #<eof> is no longer a character.
|
||||||
|
*** 2 new macros
|
||||||
|
define-macro*, with-fluids.
|
||||||
|
*** 9 new functions
|
||||||
|
dirname, last, reverse-list->string, setenv, string-drop-right,
|
||||||
|
string-fold, string-fold-right, string-null?, write.
|
||||||
|
** MesCC
|
||||||
|
**** 9 new functions
|
||||||
|
chmod, getopt_long, ferror, itoab, longjmp, qsort, setenv, setjmp, strtol.
|
||||||
|
**** 2 new header files
|
||||||
|
endian.h, sys/signal.h.
|
||||||
|
|
||||||
|
* Changes in 0.11 since 0.10
|
||||||
|
** MesCC
|
||||||
|
*** MesCC now compiles a mes-tcc that fails 41/69 of mescc's C tests.
|
||||||
|
*** MesCC's libc can now be compiled with tcc (syscall support: write).
|
||||||
|
*** MesCC now compiles a less-patched tcc: -214/+458 lines [WAS: -333/+747].
|
||||||
|
*** MesCC now supports empty for.
|
||||||
|
*** MesCC has been greatly refactored, 500/3000 lines have been removed.
|
||||||
|
*** MesCC now supports complex [struct] by value assign foo.bar, foo->bar, foo[bar].
|
||||||
|
*** MesCC now depends on Nyacc 0.82.4.
|
||||||
|
* Changes in 0.10 since 0.9
|
||||||
|
** Core
|
||||||
|
*** 2 new functions
|
||||||
|
logand, lognot.
|
||||||
|
*** Mes now includes M1 sources for full source bootstrapping up to tcc.
|
||||||
|
** Mescc
|
||||||
|
*** Mescc now depends on Nyacc 0.81.0.
|
||||||
|
*** Mescc now compiles a mes-tcc that compiles a trivial C to a running a.out.
|
||||||
|
*** Mescc now supports several (as used my tinycc) struct by value assignments.
|
||||||
|
*** Mescc now has _start in a separate crt1.c.
|
||||||
|
*** Mescc now supports initializer arithmetic.
|
||||||
|
*** Mescc now supports arrays of struct of arbitrary size.
|
||||||
|
*** Mescc now supports pointer arithmetic.
|
||||||
|
*** Mescc now defines __i386__, __linux__.
|
||||||
|
*** Mescc now supports --*p, ++*p.
|
||||||
|
*** Mescc now supports int foo[bar] = {baz,...}.
|
||||||
|
*** Mescc now supports \x00 in strings in M1.
|
||||||
|
*** Mescc now supports complex enum expressions. Thanks, rain1!
|
||||||
|
*** Mescc now supports short.
|
||||||
|
*** Mescc now supports foo.bar = foo.baz = bla.
|
||||||
|
*** Mescc now supports foo = bar < baz and comparison permutations.
|
||||||
|
*** Mescc now supports (anonymous) structs in unions.
|
||||||
|
*** Mescc now writes M1 strings if possible.
|
||||||
|
**** 2 improved mlibc functions
|
||||||
|
malloc, realloc.
|
||||||
|
**** 13 new mlibc functions
|
||||||
|
fclose, fgetc, fprintf, fwrite, memcpy, memmove, memset, snprintf, strcat,
|
||||||
|
strchr, strrchr, strtoull, vnsprintf.
|
||||||
|
**** 15 new tinycc-support tests
|
||||||
|
76-pointer-arithmetic.c, 77-pointer-assign.c, 78-union-struct.c,
|
||||||
|
79-int-array.c, 7a-struct-char-array.c, 7b-struct-int-array.c,
|
||||||
|
7c-dynarray.c, 7d-cast-char.c, 7e-struct-array-access.c,
|
||||||
|
7f-struct-pointer-arithmetic.c, 7g-struct-byte-word-field.c,
|
||||||
|
7h-struct-assign.c, 7i-struct-struct.c, 7j-strtoull.c,
|
||||||
|
7k-for-each-elem.c.
|
||||||
|
** Noteworthy bug fixes
|
||||||
|
*** Mescc has many fixes for foo.bar[baz], foo[bar].baz with ./-> permutations.
|
||||||
|
*** Many bugs and limitations in mescc have been fixed and removed.
|
||||||
|
* Changes in 0.9 since 0.8
|
||||||
|
** Core
|
||||||
|
*** Mes now builds better in non-Guix[SD] legacy distros/environments. Thanks, rain1!
|
||||||
|
** Mescc
|
||||||
|
*** Mescc now compiles a modified tinycc into a running [mostly segfaulting] mes-tcc.
|
||||||
|
https://gitlab.com/janneke/tinycc branch wip-mescc.
|
||||||
|
*** Mescc now supports locals stack frame larger than 1 byte offset.
|
||||||
|
*** Mescc now supports incomplete struct initializers {0}.
|
||||||
|
*** Mescc now supports >>=, <<=, ^=, ~.
|
||||||
|
*** Mescc now supports the comma operator.
|
||||||
|
*** Mescc now supports mullti-line string initializers.
|
||||||
|
*** Mescc now supports unions.
|
||||||
|
*** Mescc now supports arrays in structs.
|
||||||
|
*** Mescc now supports structs in structs.
|
||||||
|
*** Mescc now builds and runs with Guile-2.0 (legacy distro support, Guile-2.2 recommended).
|
||||||
|
*** Mescc has been refactored to use records.
|
||||||
|
*** Mescc now bundles tinycc's test2 test suite, passes one more test [34/55 pass].
|
||||||
|
*** Mescc now has an incremental test suite consisting of 56 tests.
|
||||||
|
*** Mescc now supports stdarg variable argument lists.
|
||||||
|
*** Mescc now has __GNUC__ unset, #f (WAS: 0).
|
||||||
|
*** Mescc now depends on Nyacc 0.80.3.
|
||||||
|
*** Mescc now depends on M1 from [[https://github.com/oriansj/mescc-tools][mescc-tools]] v0.2.
|
||||||
|
*** Mescc now compiles to M1 object files.
|
||||||
|
**** 7 new mlibc functions
|
||||||
|
calloc, close, getcwd, lseek, sprintf, unlink, vprintf.
|
||||||
|
**** 31 new mlibc stubs
|
||||||
|
execvp, fclose, fdopen, fflush, fopen, fprintf, fread, free, fseek,
|
||||||
|
ftell, fwrite, localtime, longjmp, memcpy, memmove, memmove, memset,
|
||||||
|
qsort, remove, setjump, snprintf, sscanf, strchr, strrchr, strstr,
|
||||||
|
strtol, strtoll, strtoul, strtoull, time, vnsprintf.
|
||||||
|
**** 10 new header files
|
||||||
|
alloca.h, float.h, libgen.h, locale.h, stdbool.h, stddef.h, stdint.h,
|
||||||
|
stdnoreturn.h, sys/select.h, sys/wait.h.
|
||||||
|
** Noteworthy bug fixes
|
||||||
|
*** Many bugs and limitations in mescc have been fixed and removed.
|
||||||
|
* Changes in 0.8 since 0.7
|
||||||
|
** Mescc
|
||||||
|
*** Mescc now has experimental annotation support for hex2.
|
||||||
|
*** Mescc now depends on the hex2 linker from [[https://github.com/oriansj/mescc-tools][mescc-tools]].
|
||||||
|
Direct ELF output support has been removed.
|
||||||
|
ELF symbol and string table creation has been removed.
|
||||||
|
*** Mescc has been simplified by leveraging use labels in hex2 output.
|
||||||
|
*** Mescc now supports continue in loops.
|
||||||
|
*** Mescc now compiles to hex2 object files.
|
||||||
|
** Language
|
||||||
|
*** 1 new function
|
||||||
|
list-index.
|
||||||
|
* Changes in 0.7 since 0.6
|
||||||
|
** Core
|
||||||
|
*** The minimal C reader is now always included; dependencies
|
||||||
|
on i686-unknown-linux-gnu-gcc and binary read-0-32.mo have been
|
||||||
|
dropped, these are now optional.
|
||||||
|
** Language
|
||||||
|
*** Mes reader now supports octal numbers #oXXX.
|
||||||
|
*** 10 new functions
|
||||||
|
current-output-port, getopt-long, negate, open-output-file,
|
||||||
|
option-ref, set-current-output-port, string-rindex, string-suffix?,
|
||||||
|
with-ouwith-output-to-file, with-output-to-port.
|
||||||
|
** Mescc
|
||||||
|
*** Mescc can now be installed and used alongside a gcc installation.
|
||||||
|
*** Mescc can now handle const anywhere.
|
||||||
|
*** Mescc now supports array fields in structs.
|
||||||
|
*** Mescc now supports forward declarations and typedef.
|
||||||
|
*** Mescc can now handle comments anywhere.
|
||||||
|
*** Mescc now supports addition and substraction for enum field values.
|
||||||
|
*** Mescc now supports anonymous enums.
|
||||||
|
*** Mescc now supports all C99 header files needed to compile tcc.c.
|
||||||
|
*** build: C sources are now preprocessed separately, then compiled and linked.
|
||||||
|
*** build: mlibc and C sources are now compiled separately and then linked.
|
||||||
|
*** mlibc has been moved from Scheme snippets into C.
|
||||||
|
*** Mescc now supports -c, -D, -E, -I and -o options.
|
||||||
|
**** open now supports optional third mode parameter.
|
||||||
|
** Noteworthy bug fixes
|
||||||
|
*** string-index now supports function predicate.
|
||||||
|
*** number->string for radix > 10 now produces `a' instead of `:'.
|
||||||
|
* Changes in 0.6 since 0.5
|
||||||
|
** Core
|
||||||
|
*** configure, build now supports x86 and development for arm with-courage.
|
||||||
|
** Language
|
||||||
|
*** Nyacc has been unbundled and is now a dependency.
|
||||||
|
*** Mes now supports case-lambda.
|
||||||
|
*** Mes reader now supports abbreviated form for return character #\cr.
|
||||||
|
*** 1 new function
|
||||||
|
string-index.
|
||||||
|
** Mescc
|
||||||
|
*** Mescc can be used on regular C sources, like tinycc's tests/test2 suite.
|
||||||
|
*** make check passes 33/55 of tinycc's test suite etest/test2 tests.
|
||||||
|
*** Mescc now recognizes `short' as a type.
|
||||||
|
*** Mescc now supports sizeof (<identifier>), sizeof(<expression>).
|
||||||
|
*** Mescc now respects enum field initializers and supports enum variables.
|
||||||
|
*** Mescc now supports binary constants .
|
||||||
|
*** Mescc now supports assignments from ==, != boolean expressions .
|
||||||
|
*** Mescc now supports &, ^.
|
||||||
|
*** Mescc now supports struct pointers.
|
||||||
|
*** Mescc now supports struct definition with immediatete variable declaration.
|
||||||
|
*** Mescc now supports calling (returning correctly from) void functions.
|
||||||
|
*** Mescc now handles case statements breaks without compound correctly.
|
||||||
|
*** Mescc now has better [int/pointer] array support.
|
||||||
|
*** Mescc now has better support for simple (non-array-)structs.
|
||||||
|
*** Mescc now supports multiple declarations in one statement like: int a,b;
|
||||||
|
**** 2 new mlibc functions
|
||||||
|
printf, strcpy.
|
||||||
|
** Noteworthy bug fixes
|
||||||
|
*** Installed mes and mes.repl now also run outside of source tree again.
|
||||||
|
* Changes in 0.5 since 0.4
|
||||||
|
** Core
|
||||||
|
*** Support compilation with Mescc.
|
||||||
|
*** Support compilation with -nostdinc, -nostdlib using mlibc.
|
||||||
|
*** Support call-with-current-continuation.
|
||||||
|
*** Support exception handling, catch/throw.
|
||||||
|
*** Give sensible error message when a macro is missing.
|
||||||
|
** Language
|
||||||
|
*** Map now supports 4 lists.
|
||||||
|
*** The reader supports negative hex numbers.
|
||||||
|
*** 24 new functions
|
||||||
|
access?, assoc-set! c????r, compose, list->char-set,
|
||||||
|
open-input-string, read-string, string-delete, with-throw-handler.
|
||||||
|
** Mescc
|
||||||
|
*** Mescc can be used separately as a Nyacc-based C compiler backend for Guile.
|
||||||
|
*** Switch to Nyacc frontend, update Nyacc to 0.76.5.
|
||||||
|
*** Mescc now has a test suite, scaffold/t.c.
|
||||||
|
*** Mescc now includes a minimal C library libc/mlib.c libc/mstart.c.
|
||||||
|
*** Mescc can now compile mes.c.
|
||||||
|
** Noteworthy bug fixes
|
||||||
|
*** The build system (configure, make) has been refactored.
|
||||||
|
*** Support map-4.
|
||||||
|
*** Evaluate arguments of OR only once.
|
||||||
|
*** Fix assq-set!
|
||||||
|
*** Fix ,expand in the REPL.
|
||||||
|
|
||||||
|
* Changes in 0.4 since 0.3
|
||||||
|
** Core
|
||||||
|
*** Improved performance.
|
||||||
|
Macros are now memoized; after expansion and before eval'ing the
|
||||||
|
expanded form, their input s-expression is replaced by the expansion.
|
||||||
|
This yields a nice performance improvement which finally allowed
|
||||||
|
moving all non-essential bits from the C-core into Scheme...including
|
||||||
|
the reader. The Scheme reader is much, much slower than the previous
|
||||||
|
C version, making Mes--again-- feel slow. Think of that as a feature.
|
||||||
|
*** Bootstrap with minimal reader in C.
|
||||||
|
The C-reader needs only support reading of words and lists
|
||||||
|
(s-expressions), line-comments to read the initial [[file:module/mes/read-0.mes][Scheme reader]] which
|
||||||
|
then takes over and handles reading of quoting, characters, strings,
|
||||||
|
block-comments.
|
||||||
|
*** Reduced size.
|
||||||
|
Total C size: ~1500LOC. The main Mes evaluator is now ~1000LOC
|
||||||
|
including cell creation and garbage collector. This code is able to
|
||||||
|
execute a Scheme program that has been loaded into memory. Another
|
||||||
|
~500LOC is spent to load a minimal Scheme program and to dump it, to
|
||||||
|
provide a small posix interface, math functions and do some error
|
||||||
|
reporting.
|
||||||
|
*** Programs can be dumped and loaded using --dump and --load.
|
||||||
|
** Language
|
||||||
|
*** Minimal syntactic exception support for Nyacc.
|
||||||
|
*** Minimal syntactic fluids support for Nyacc.
|
||||||
|
*** Keywords are now supported.
|
||||||
|
*** Cond now supports =>.
|
||||||
|
*** Guile's optargs: lambda* and define* are now supported.
|
||||||
|
*** #;-comments are now supported.
|
||||||
|
*** Non-nested #| |#-comments are now supported.
|
||||||
|
*** Quasisyntax is now supported.
|
||||||
|
*** R7RS syntax-rules with custom ellipsis, with-ellipsis are now supported.
|
||||||
|
*** 9 new [partial] modules
|
||||||
|
(mes fluids), (mes nyacc), (mes optargs), (mes pmatch), (mes peg),
|
||||||
|
(srfi srfi-13), (srfi srfi-9-psyntax), (srfi srfi-26), (srfi srfi-43),
|
||||||
|
(rnrs arithmetic bitwise), (sxml xpath)
|
||||||
|
*** 36 new functions
|
||||||
|
1+, 1-, abs, and=>, append-reverse, ash, char<=?, char<?, char>=?,
|
||||||
|
char>?, even?, filter, delete, delq, vector-copy, fold, fold-right,
|
||||||
|
getenv, iota, keyword->symbol list-head, list-tail, negative?, odd?,
|
||||||
|
positive?, remove!, remove, string->number, string-copy,
|
||||||
|
string-prefix?, string=, string=?, symbol->keyword symbol-append,
|
||||||
|
symbol-prefix?, unless, write, zero?.
|
||||||
|
** Noteworthy bug fixes
|
||||||
|
*** Macros are now memoized.
|
||||||
|
*** An error is reported when using a wrong number of arguments with a call.
|
||||||
|
*** Cond now evaluates its test clauses only once.
|
||||||
|
*** Append can also handle one argument.
|
||||||
|
*** For-each now supports 2 list arguments.
|
||||||
|
*** Map now supports 3 list arguments.
|
||||||
|
*** Backslash in string is supported.
|
||||||
|
*** Closure is not a pair.
|
||||||
|
*** All standard characters are supported.
|
||||||
|
*** Mescc now also runs in Guile.
|
||||||
|
* Changes in 0.3 since 0.2
|
||||||
|
** Core
|
||||||
|
*** Number-based rather than pointer-based cells.
|
||||||
|
*** Garbage collector aka Jam scraper.
|
||||||
|
A variant on SICP's stop and copy Garbage Colletor (Jam Scraper?)
|
||||||
|
algorithm has been implemented.
|
||||||
|
*** The reader has been moved to Scheme.
|
||||||
|
** Language
|
||||||
|
*** Simple loadable modules.
|
||||||
|
*** Srfi-9 and match use handwritten syntax-rules (mes-use-module (mes syntax)).
|
||||||
|
*** Optional syntax-case using psyntax (mes-use-module (mes psyntax)).
|
||||||
|
** Noteworthy bug fixes
|
||||||
|
*** Srfi-0 has been fixed.
|
||||||
|
* Changes in 0.2 since 0.1
|
||||||
|
** Core
|
||||||
|
*** Names of symbols and strings are list of characters [WAS: c-string].
|
||||||
|
*** Sc-expand from pre-R6RS's psyntax has been integrated.
|
||||||
|
*** Undefined variable error now shows the name of the undefined variable.
|
||||||
|
*** There is now only one SCM type for builtin functions.
|
||||||
|
*** Macro expansion has been cleaned-up.
|
||||||
|
** Language
|
||||||
|
*** Mes now provides a subset of R6RS.
|
||||||
|
*** Mes now provides syntax-case.
|
||||||
|
*** Mes now provides `load'.
|
||||||
|
** Noteworthy bug fixes
|
||||||
|
*** Using values as second parameter of builtin function yields first value.
|
||||||
|
*** Quoted internals (e.g. 'if 'lambda) are now symbols.
|
||||||
|
*** Syntax error now exits.
|
||||||
|
*** Make+Bash voodoo has been replaced by build-aux/mes-snarf.scm.
|
||||||
|
*** Apply now accepts multiple list arguments.
|
||||||
|
*** Apply of character, inernal, number, string is an error.
|
||||||
|
*** Quasisyntax reading
|
||||||
|
|
||||||
|
* Changes in 0.1 (since progress report #2)
|
||||||
|
** Core
|
||||||
|
*** expand_macro is now a separate function.
|
||||||
|
*** A smaller core can now compiled using BOOT=1.
|
||||||
|
The smaller core does not provide define, define-macro, or quasiquote;
|
||||||
|
these are provided from a Scheme version of implemented eval/apply.
|
||||||
|
** Language
|
||||||
|
*** Mes now provides a subset of R5RS.
|
||||||
|
*** Mes now provides let-syntax.
|
||||||
|
*** Mes now provides match.
|
||||||
|
*** Mes now provides quasisyntax, unsyntax and unsyntax-splicing.
|
||||||
|
** User interface
|
||||||
|
*** Mes now provides a REPL, run:
|
||||||
|
scripts/repl.mes
|
||||||
|
*** Mes compiler can be run as a script:
|
||||||
|
scripts/mescc.mes doc/examples/main.c
|
||||||
|
*** Macro expansion can be inspected in the REPL, e.g.:
|
||||||
|
,expand (and 0 1)
|
||||||
|
** Noteworthy bug fixes
|
||||||
|
*** Performance: scripts/mescc.mes now takes 2s to compile main.c (was 1'20").
|
||||||
|
*** Symbols are now truly unique.
|
||||||
|
* '(), #t, #f are no longer symbols.
|
|
@ -0,0 +1,84 @@
|
||||||
|
#+COMMENT: -*- org -*-
|
||||||
|
#+TITLE: Porting GNU Mes
|
||||||
|
|
||||||
|
* Porting GNU Mes to ARM
|
||||||
|
|
||||||
|
The ARM port can be found in wip-arm on savannah.
|
||||||
|
|
||||||
|
For development, we use Guix's qemu-binfmt-service-type.
|
||||||
|
|
||||||
|
** Guix Setup, see [[info:guix#Virtualization%20Services][Virtualization Services]].
|
||||||
|
|
||||||
|
Add something like
|
||||||
|
#+BEGIN_SRC scheme
|
||||||
|
(service qemu-binfmt-service-type
|
||||||
|
(qemu-binfmt-configuration
|
||||||
|
(platforms (lookup-qemu-platforms "arm"))
|
||||||
|
(guix-support? #t)))
|
||||||
|
#+END_SRC
|
||||||
|
to your config.scm and run guix system reconfigure.
|
||||||
|
|
||||||
|
** Setup environment
|
||||||
|
|
||||||
|
#+BEGIN_SRC bash
|
||||||
|
guix environment -s armhf-linux --pure --ad-hoc bash coreutils diffutils gawk gcc-toolchain grep guile help2man make nyacc pkg-config sed texinfo
|
||||||
|
PATH=~/src/mescc-tools-arm/bin:$PATH
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
(No git, graphviz on ARM yet).
|
||||||
|
|
||||||
|
** Try it
|
||||||
|
#+BEGIN_SRC bash
|
||||||
|
./configure --with-courage --with-system-libc
|
||||||
|
./simple.sh
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
some failures are expected.
|
||||||
|
|
||||||
|
** Build it
|
||||||
|
#+BEGIN_SRC bash
|
||||||
|
./configure --with-courage --with-system-libc
|
||||||
|
make MES=guile
|
||||||
|
make check
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
expect many failures. Non-system-libc, i.e. using the Mes C Library is currently WIP.
|
||||||
|
|
||||||
|
* Porting GNU Mes to x86_64
|
||||||
|
|
||||||
|
The x86_64 port is almost done, only a few bugs remain. The Guix
|
||||||
|
bootstrap for x86_64 uses x86 mes and that is not expected to change.
|
||||||
|
|
||||||
|
* Porting GNU Mes to GNU/Hurd
|
||||||
|
|
||||||
|
The Hurd port can be found in wip-hurd on savannah. For development, we
|
||||||
|
use a Debian GNU/Hurd vm.
|
||||||
|
|
||||||
|
* Porting GNU Mes to FreeBSD
|
||||||
|
The FreeBSD port can be found in wip-freebsd on savannah.
|
||||||
|
|
||||||
|
* Porting the Reduced Binary Seed bootstrap to NixOS
|
||||||
|
The NixOS port of the Reduced Binary Seed bootstrap lives on the
|
||||||
|
mes-bootstrap branch in https://github.com/xwvvvvwx/nixpkgs
|
||||||
|
|
||||||
|
* Porting the Reduced Binary Seed bootstrap to Debian GNU/Linux
|
||||||
|
To port the Reduced Binary Seed bootstrap to a traditional distribution
|
||||||
|
such as Debian, two things need to happen: the bootstrap must be ported
|
||||||
|
and the distribution build process needs to change to start from a only
|
||||||
|
binary seed.
|
||||||
|
|
||||||
|
The porting aspect is probably easiest: we start by packaging GNU Mes as
|
||||||
|
a regular package. Having Mes built as a regular package, we can then
|
||||||
|
build a bootstrap Mes. This bootstrap Mes can be used to build tinycc,
|
||||||
|
and so on.
|
||||||
|
|
||||||
|
Once we have shown that the Debian base system can be bootstrapped from
|
||||||
|
a Reduced Binary seed, thus significantly reducing the Trusted Computing
|
||||||
|
Base (TCB), strategic decisions about the build process can start.
|
||||||
|
|
||||||
|
* Legalese
|
||||||
|
Copyright © 2019 Jan (janneke) Nieuwenhuizen <[[mailto:janneke@gnu.org][janneke@gnu.org]]>
|
||||||
|
|
||||||
|
Copying and distribution of this file, with or without modification,
|
||||||
|
are permitted in any medium without royalty provided the copyright
|
||||||
|
notice and this notice are preserved.
|
|
@ -0,0 +1,84 @@
|
||||||
|
#+COMMENT: -*- org -*-
|
||||||
|
#+TITLE: About GNU Mes
|
||||||
|
|
||||||
|
#+SUBTITLE: Maxwell Equations of Software
|
||||||
|
|
||||||
|
[[https://www.gnu.org/software/mes][GNU Mes]] is a Scheme interpreter and C compiler for bootstrapping the GNU
|
||||||
|
System. Since version 0.22 it has again helped to halve the size of
|
||||||
|
opaque, uninspectable binary seeds that are currently being used in the
|
||||||
|
[[https://guix.gnu.org/blog/2019/guix-reduces-bootstrap-seed-by-50/][Reduced Binary Seed bootstrap]] of [[https://www.gnu.org/software/guix][GNU Guix]]. The final goal is to help
|
||||||
|
create a full source bootstrap as part of the [[http://bootstrappable.org][bootstrappable builds]]
|
||||||
|
effort for UNIX-like operating systems.
|
||||||
|
|
||||||
|
The Scheme interpreter is written in ~5,000 LOC of simple C, and the C
|
||||||
|
compiler written in Scheme and these are mutual self-hosting. This
|
||||||
|
mes.c is [[https://github.com/oriansj/mes-m2][being simplified]] to be transpiled by [[https://github.com/oriansj/m2-planet][M2-Planet]].
|
||||||
|
|
||||||
|
Mes has a Garbage Collector, a library of loadable Scheme modules--
|
||||||
|
notably Dominique Boucher's [[https://github.com/schemeway/lalr-scm][LALR]], Pre-R6RS [[https://www.cs.indiana.edu/chezscheme/syntax-case/old-psyntax.html][portable syntax-case]] with
|
||||||
|
R7RS ellipsis, Matt Wette's [[https://www.nongnu.org/nyacc][Nyacc]] --and test suite, just enough to
|
||||||
|
support a REPL and a C99 compiler: mescc.
|
||||||
|
|
||||||
|
Mes+MesCC can compile an only [[http://gitlab.com/janneke/tinycc][lightly patched TinyCC]] that is
|
||||||
|
self-hosting. Using this tcc and the Mes C library we now have a
|
||||||
|
Reduced Binary Seed bootstrap for the gnutools triplet: glibc-2.2.5,
|
||||||
|
binutils-2.20.1, gcc-2.95.3. This is enough to bootstrap Guix for
|
||||||
|
i686-linux and x86_64-linux.
|
||||||
|
|
||||||
|
Mes is inspired by The Maxwell Equations of Software: [[http://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf][LISP-1.5]] -- John
|
||||||
|
McCarthy page 13, GNU Guix's source/binary packaging transparency and
|
||||||
|
Jeremiah Orians's [[https://github.com/oriansj/stage0][stage0]] ~500 byte self-hosting hex assembler.
|
||||||
|
|
||||||
|
GNU Mes is free software, it is distributed under the terms of the GNU
|
||||||
|
General Public Licence version 3 or later. See the file [[file:COPYING][COPYING]].
|
||||||
|
|
||||||
|
* Get it
|
||||||
|
|
||||||
|
#+BEGIN_SRC bash
|
||||||
|
git clone git://git.savannah.gnu.org/mes.git
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
* Build it (see [[file:INSTALL][INSTALL]] for full instructions)
|
||||||
|
|
||||||
|
#+BEGIN_SRC bash
|
||||||
|
./configure
|
||||||
|
make all
|
||||||
|
make check
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
* REPL it
|
||||||
|
|
||||||
|
#+BEGIN_SRC bash
|
||||||
|
./pre-inst-env mes
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
* MesCC compiler
|
||||||
|
|
||||||
|
#+BEGIN_SRC bash
|
||||||
|
./pre-inst-env mescc -c scaffold/main.c
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
* Bugs
|
||||||
|
|
||||||
|
Please send Mes bug reports to [[mailto:bug-mes@gnu.org][bug-mes@gnu.org]].
|
||||||
|
|
||||||
|
* Links
|
||||||
|
[0] https://www.gnu.org/software/mes
|
||||||
|
[1] https://guix.gnu.org/blog/2019/guix-reduces-bootstrap-seed-by-50/
|
||||||
|
[2] https://www.gnu.org/software/guix
|
||||||
|
[3] https://bootstrappable.org
|
||||||
|
[4] https://github.com/oriansj/mes-m2
|
||||||
|
[5] https://github.com/oriansj/m2-planet
|
||||||
|
[6] https://github.com/schemeway/lalr-scm
|
||||||
|
[7] https://www.cs.indiana.edu/chezscheme/syntax-case/old-psyntax.html
|
||||||
|
[8] https://www.nongnu.org/nyacc
|
||||||
|
[9] https://gitlab.com/janneke/tinycc
|
||||||
|
[10] [[http://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf]]
|
||||||
|
[11] https://github.com/oriansj/stage0
|
||||||
|
|
||||||
|
* Legalese
|
||||||
|
Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <[[mailto:janneke@gnu.org][janneke@gnu.org]]>
|
||||||
|
|
||||||
|
Copying and distribution of this file, with or without modification,
|
||||||
|
are permitted in any medium without royalty provided the copyright
|
||||||
|
notice and this notice are preserved.
|
|
@ -0,0 +1,100 @@
|
||||||
|
-*- org -*-
|
||||||
|
#+TITLE: Tentative GNU Mes Road Map
|
||||||
|
|
||||||
|
Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
|
|
||||||
|
Copying and distribution of this file, with or without modification,
|
||||||
|
are permitted in any medium without royalty provided the copyright
|
||||||
|
notice and this notice are preserved.
|
||||||
|
|
||||||
|
The goals of the GNU Mes project are two-fold:
|
||||||
|
|
||||||
|
- to bootstrap the GNU System purely from source, without using any binary
|
||||||
|
seeds.
|
||||||
|
|
||||||
|
- to aid the Reproducible-Builds.org effort; demonstrate the impact and
|
||||||
|
importance of GNU and Software Freedom.
|
||||||
|
|
||||||
|
Since its inception, the project has gone a long way towards that goal. Below
|
||||||
|
is a list of items we want for version "1.0" of GNU Mes.
|
||||||
|
|
||||||
|
You're welcome to discuss this road map on bug-mes@gnu.org or #bootstrappable
|
||||||
|
on Freenode!
|
||||||
|
|
||||||
|
* TODO
|
||||||
|
** release 0.x, unsorted
|
||||||
|
- Merge the Scheme-only bootstrap which uses Gash and Gash Core
|
||||||
|
Utilities to remove from bootstrap-binary seed : Awk, Bash, Core
|
||||||
|
Utilities, Grep, Gzip, Sed, Tar.
|
||||||
|
- Introduce the Reduced Binaries Seed bootstrap to NixOS (Debian,
|
||||||
|
Arch, Gentoo, ...?)
|
||||||
|
- Full Source Bootstrap: compile mes.c using M2-Planet. Jeremiah
|
||||||
|
branched-out from mes; see https://github.com/oriansj/mes-m2, also see the
|
||||||
|
branches: wip-full-source-bootstrap, wip-m2-merge and wip-m2.
|
||||||
|
- Full Guile-compatible module support: define-module, define-public,
|
||||||
|
export, use-modules, ...
|
||||||
|
- ARMv7/AArch64 support: Mes C Library and MesCC.
|
||||||
|
- Simplify eval-apply and other core functionality (see mes-m2).
|
||||||
|
- Support native x86_64 bootstrap.
|
||||||
|
- Simplify MesCC ``MesCC should optimize ease of convincing us of its
|
||||||
|
correctness''
|
||||||
|
- tcc: remove or upstream patches from tcc-boot.
|
||||||
|
- tcc: build 0.9.27 directly instead of via 0.9.26, see tinycc
|
||||||
|
** after release 1.0
|
||||||
|
- Build Guix packages using Mes: run or simplify (guix build utils),
|
||||||
|
(guix build gnu-build-system).
|
||||||
|
- Build Guix packages without guix-daemon. See Ludovic's initrd build
|
||||||
|
work.
|
||||||
|
- Bootstrap support for the Hurd. Most needed now are fork and exec.
|
||||||
|
- Replace the initial gcc-2.95.3 with gcc-4.6.4.
|
||||||
|
- FreeBSD, *BSD?
|
||||||
|
wip-bootstrappable@0.9.27 branch
|
||||||
|
- Skip tcc: Build gcc using MesCC.
|
||||||
|
- better garbage collector.
|
||||||
|
- mes/mescc: proper docstrings, api reference documentation.
|
||||||
|
- mes/mescc: bootstrap a minimal Guile?
|
||||||
|
+ libguile/{eval,init,list,strings,values,..}.
|
||||||
|
+ ice-9/eval.scm
|
||||||
|
- syntax-case bootstrap problem
|
||||||
|
+ resolve portable syntax-case bootstrap, or
|
||||||
|
+ get full source syntax-case up (Andre van Tonder?)
|
||||||
|
https://srfi.schemers.org/srfi-72/srfi-72.html, or
|
||||||
|
+ ... drop it?
|
||||||
|
* DONE
|
||||||
|
- 0.22 GNU Mes now builds reproducibly cross-platform, runs on the
|
||||||
|
Hurd and has better support for other distributions and kernels.
|
||||||
|
- 0.21 GNU Mes now supports a Scheme-only bootstrap and is packaged in
|
||||||
|
Debian GNU/Linux.
|
||||||
|
- 0.20 GNU Mes brings the Reduced Binary Source bootstrap to Guix.
|
||||||
|
- 0.19 GNU Mes now compiles TinyCC in ~8min and supports building Bash and
|
||||||
|
GNU Tar.
|
||||||
|
- 0.18 GNU Mes now supports GuixSD bootstrap (x86,x86_64) and has native
|
||||||
|
x86_64 support.
|
||||||
|
- 0.17.1 GNU Mes now allows removing glibc, binutils and gcc from the GuixSD
|
||||||
|
bootstrap.
|
||||||
|
- 0.17 GNU Mes is now an official GNU project and bootstraps gcc-4.7.4.
|
||||||
|
- 0.16.1 Mes now has info docs and installs ootb on Debian buster/testing.
|
||||||
|
- 0.16 Mes Lib C now bootstraps glibc-2.2.5, binutils-2.20.1, gcc-4.1.0.
|
||||||
|
- 0.15: MesCC now has a libc+gnu that supports compiling binutils-2.14,
|
||||||
|
gcc-2.95.3 and glibc-2.2.5.
|
||||||
|
- 0.14: Mes+MesCC now compiles a slightly patched self-hosting tcc.
|
||||||
|
- 0.13: Mes+MesCC now compiles a modified, functional tcc.c (~25,000LOC) in
|
||||||
|
1h30'.
|
||||||
|
- 0.12: Mes+MesCC now compiles mes.c (~3000LOC) in ~4min.
|
||||||
|
- 0.11: MesCC now compiles a mes-tcc that passes 26/69 of mescc's C tests.
|
||||||
|
- 0.10: Mescc now compiles a mes-tcc that compiles a trivial C to a running
|
||||||
|
a.out.
|
||||||
|
- 0.9: Mescc now writes M1 macro assembly files and compiles tcc.
|
||||||
|
- 0.8: Mescc now writes object files in stage0's labeled hex2 format.
|
||||||
|
- 0.7: Mescc supports -E, -c, -o options, include more complete set of
|
||||||
|
header files, enough to work on compiling tinycc's tcc.c albeit a somewhat
|
||||||
|
modified version.
|
||||||
|
- 0.6: Work with unmodified, unbundled Nyacc; compile 33/55 tinycc's
|
||||||
|
tests/test2 suite.
|
||||||
|
- 0.5: Mutual self-hosting Scheme interpreter and C compiler: mes.c and
|
||||||
|
mescc, Support call-with-current-continuation, refactor catch/throw
|
||||||
|
- 0.4: Support Nyacc, Gcc-compiled Mes compiles minimal main.c using nyacc
|
||||||
|
- 0.3: Garbage collector
|
||||||
|
- 0.2: Support psyntax
|
||||||
|
- 0.1: Mes eval/apply feature complete; support syntax-rules, compile main.c
|
||||||
|
using LALR, dump ELF
|
|
@ -0,0 +1,402 @@
|
||||||
|
# GNU Mes --- Maxwell Equations of Software
|
||||||
|
# Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
|
#
|
||||||
|
# This file is part of GNU Mes.
|
||||||
|
#
|
||||||
|
# GNU 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.
|
||||||
|
#
|
||||||
|
# GNU 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 GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
SHELL=@BASH@
|
||||||
|
srcdest=@srcdest@
|
||||||
|
srcdir=@srcdir@
|
||||||
|
abs_top_srcdir=@abs_top_srcdir@
|
||||||
|
abs_top_builddir=@abs_top_builddir@
|
||||||
|
|
||||||
|
GUILE_FLAGS:=--no-auto-compile -L . -L module -C . -C module
|
||||||
|
|
||||||
|
cleaning-p:=$(filter clean%, $(MAKECMDGOALS))$(filter %clean, $(MAKECMDGOALS))
|
||||||
|
|
||||||
|
ifndef cleaning-p
|
||||||
|
include .config.make
|
||||||
|
ifneq ($(prefix),)
|
||||||
|
prefix-arg=--prefix=$(prefix)
|
||||||
|
endif
|
||||||
|
ifneq ($(build),)
|
||||||
|
build-arg=--build=$(build)
|
||||||
|
endif
|
||||||
|
ifneq ($(host),)
|
||||||
|
host-arg=--host=$(host)
|
||||||
|
endif
|
||||||
|
ifeq ($(mes_libc),system)
|
||||||
|
--with-system-libc=system
|
||||||
|
endif
|
||||||
|
.config.make:
|
||||||
|
${srcdir}/configure $(prefix_arg) $(host-arg) $(build-arg) $(with-system-libc)
|
||||||
|
endif
|
||||||
|
|
||||||
|
PHONY_TARGETS:=\
|
||||||
|
TAGS\
|
||||||
|
all-go\
|
||||||
|
all\
|
||||||
|
build\
|
||||||
|
check\
|
||||||
|
clean-go\
|
||||||
|
clean\
|
||||||
|
default\
|
||||||
|
dist\
|
||||||
|
distclean\
|
||||||
|
doc\
|
||||||
|
dvi\
|
||||||
|
gcc\
|
||||||
|
generate-ChangeLog\
|
||||||
|
help\
|
||||||
|
html\
|
||||||
|
info\
|
||||||
|
install-dvi\
|
||||||
|
install-html\
|
||||||
|
install-pdf\
|
||||||
|
install-ps\
|
||||||
|
install-strip\
|
||||||
|
install\
|
||||||
|
installcheck\
|
||||||
|
installdirs\
|
||||||
|
maintainer-clean\
|
||||||
|
man\
|
||||||
|
mes-gcc\
|
||||||
|
mes-tcc\
|
||||||
|
mes\
|
||||||
|
mostlyclean\
|
||||||
|
pdf\
|
||||||
|
ps\
|
||||||
|
sign-dist\
|
||||||
|
uninstall\
|
||||||
|
web\
|
||||||
|
#
|
||||||
|
|
||||||
|
.PHONY: $(PHONY_TARGETS)
|
||||||
|
|
||||||
|
default: all
|
||||||
|
|
||||||
|
all: doc
|
||||||
|
|
||||||
|
doc: build
|
||||||
|
|
||||||
|
build:
|
||||||
|
$(SHELL) build.sh
|
||||||
|
|
||||||
|
src/${program_prefix}mes: build
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f *.o *.s bin/mes bin/mes-gcc bin/mes-mescc
|
||||||
|
rm -f mes.{aux,cp,cps,fn,info,log,tmp,toc,vr,vrs}
|
||||||
|
rm -f .log build.log
|
||||||
|
rm -f 0exit-42 0hello-mes exit-42 body-exit-42 body-hello-mes hello-mes
|
||||||
|
rm -f build-aux/mes-snarf.go
|
||||||
|
rm -f module/mescc.go
|
||||||
|
rm -f module/mes/*.go module/mescc/*.go
|
||||||
|
rm -f module/mescc/i386/*.go
|
||||||
|
rm -f module/mescc/x86_64/*.go
|
||||||
|
rm -rf gcc-lib/*.o gcc-lib/*.s gcc-lib/*.a gcc-lib/*-mes
|
||||||
|
rm -f gcc-lib/libc+gnu.c
|
||||||
|
rm -f gcc-lib/.log gcc-lib/build.log
|
||||||
|
rm -rf mescc-lib/*.o mescc-lib/*.s mescc-lib/*.a mescc-lib/*-mes
|
||||||
|
rm -f mescc-lib/libc+gnu.c
|
||||||
|
rm -f mescc-lib/.log mescc-lib/build.log
|
||||||
|
rm -rf mescc/bin
|
||||||
|
rm -f scaffold/boot/*.log scaffold/boot/*.trs
|
||||||
|
rm -f test-suite.log tests/*.log tests/*.trs
|
||||||
|
rm -f scaffold/*.s scaffold/*.o
|
||||||
|
rm -f doc/images/gcc-mesboot-graph.{eps,pdf,png}
|
||||||
|
rm -f doc/mes.1 doc/mesar.1 doc/mescc.1
|
||||||
|
rm -f .config .config.E .config.o
|
||||||
|
|
||||||
|
distclean: clean
|
||||||
|
rm -f GNUmakefile bootstrap.sh build.sh check.sh install.sh uninstall.sh
|
||||||
|
rm -f include/mes/config.h
|
||||||
|
rm -f .config.make config.sh mescc-lib/config.sh gcc-lib/config.sh
|
||||||
|
rm -f scripts/mesar scripts/mescc scripts/mescc.scm scripts/m2-merge
|
||||||
|
rm -f TAGS
|
||||||
|
|
||||||
|
mostlyclean: clean
|
||||||
|
|
||||||
|
maintainer-clean: distclean
|
||||||
|
rm -f doc/mes.info
|
||||||
|
rm -f doc/version.texi
|
||||||
|
|
||||||
|
TAGS:
|
||||||
|
etags ${srcdest}lib/*.c ${srcdest}lib/*/*.c ${srcdest}src/*.c ${srcdest}include/*.h ${srcdest}include/sys/*.h
|
||||||
|
|
||||||
|
all-go:
|
||||||
|
${srcdest}build-aux/build-guile.sh
|
||||||
|
|
||||||
|
clean-go:
|
||||||
|
rm -f $(shell find . -name '*.go')
|
||||||
|
|
||||||
|
check:
|
||||||
|
$(SHELL) check.sh
|
||||||
|
|
||||||
|
check-mescc:
|
||||||
|
$(SHELL) pre-inst-env build-aux/check-mescc.sh
|
||||||
|
|
||||||
|
# Mes does not feature post-install checks yet, so we're great!
|
||||||
|
installcheck:
|
||||||
|
true
|
||||||
|
|
||||||
|
install:
|
||||||
|
$(SHELL) install.sh
|
||||||
|
|
||||||
|
uninstall:
|
||||||
|
$(SHELL) uninstall.sh
|
||||||
|
|
||||||
|
doc/version.texi: ${srcdest}doc/mes.texi GNUmakefile
|
||||||
|
@mkdir -p $(@D)
|
||||||
|
(set `LANG= date -r $< +'%d %B %Y'`;\
|
||||||
|
echo "@set UPDATED $$1 $$2 $$3"; \
|
||||||
|
echo "@set UPDATED-MONTH $$2 $$3"; \
|
||||||
|
echo "@set EDITION $(VERSION)"; \
|
||||||
|
echo "@set VERSION $(VERSION)") > $@
|
||||||
|
|
||||||
|
doc: doc/version.texi
|
||||||
|
ifdef MAKEINFO
|
||||||
|
doc: info
|
||||||
|
else
|
||||||
|
$(warning skipping info: no makeinfo)
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifdef HELP2MAN
|
||||||
|
doc: man
|
||||||
|
else
|
||||||
|
$(warning skipping man: no help2man)
|
||||||
|
endif
|
||||||
|
|
||||||
|
info: doc/mes.info
|
||||||
|
|
||||||
|
doc/mes.info: ${srcdest}doc/mes.texi doc/version.texi ${srcdest}doc/images/gcc-mesboot-graph.png GNUmakefile
|
||||||
|
$(MAKEINFO) -o $@ -I doc -I doc $<
|
||||||
|
|
||||||
|
doc/images/%.eps: ${srcdest}doc/images/%.dot
|
||||||
|
ifdef DOT
|
||||||
|
$(DOT) -T eps $< > $@
|
||||||
|
else
|
||||||
|
touch $@
|
||||||
|
endif
|
||||||
|
|
||||||
|
doc/images/%.pdf: ${srcdest}doc/images/%.dot
|
||||||
|
ifdef DOT
|
||||||
|
$(DOT) -T pdf $< > $@
|
||||||
|
else
|
||||||
|
touch $@
|
||||||
|
endif
|
||||||
|
|
||||||
|
doc/images/%.png: ${srcdest}doc/images/%.dot
|
||||||
|
ifdef DOT
|
||||||
|
$(DOT) -T png $< > $@
|
||||||
|
else
|
||||||
|
touch $@
|
||||||
|
$(warning info: graphvis missing: no images)
|
||||||
|
endif
|
||||||
|
|
||||||
|
man: doc/mes.1 doc/mescc.1 doc/mesar.1
|
||||||
|
|
||||||
|
# disable builtin-rules
|
||||||
|
%.o: %.s
|
||||||
|
%.s: %.S
|
||||||
|
%.o: %.S
|
||||||
|
%.o: %.c
|
||||||
|
%: %.S
|
||||||
|
%: %.o
|
||||||
|
%: %.c
|
||||||
|
|
||||||
|
doc/mes.1: src/${program_prefix}mes | build
|
||||||
|
MES_ARENA=10000000 ./pre-inst-env $(HELP2MAN) \
|
||||||
|
--name="Scheme interpreter for bootstrapping the GNU system" \
|
||||||
|
$(<F) > $@
|
||||||
|
|
||||||
|
doc/mescc.1: scripts/mescc src/${program_prefix}mes | build
|
||||||
|
MES_ARENA=10000000 ./pre-inst-env $(HELP2MAN) \
|
||||||
|
--name="C99 compiler in Scheme for bootstrapping the GNU system" \
|
||||||
|
$(<F) > $@
|
||||||
|
|
||||||
|
doc/mesar.1: scripts/mescc src/${program_prefix}mes | build
|
||||||
|
MES_ARENA=10000000 ./pre-inst-env $(HELP2MAN) \
|
||||||
|
--name="Archiver for MesCC" \
|
||||||
|
$(<F) > $@
|
||||||
|
|
||||||
|
html: doc/html/index.html
|
||||||
|
|
||||||
|
doc/html/index.html: ${srcdest}doc/mes.texi doc/version.texi doc/images/gcc-mesboot-graph.png
|
||||||
|
$(MAKEINFO) --html -o $(@D) -I ${srcdest}doc -I doc $<
|
||||||
|
|
||||||
|
dvi: doc/mes.dvi
|
||||||
|
|
||||||
|
doc/mes.dvi: ${srcdest}doc/mes.texi
|
||||||
|
$(MAKEINFO) --dvi -I ${srcdest}doc -I doc -o doc/mes.dvi $<
|
||||||
|
|
||||||
|
pdf: doc/mes.pdf
|
||||||
|
|
||||||
|
doc/mes.pdf: ${srcdest}doc/mes.texi
|
||||||
|
$(MAKEINFO) --pdf -I ${srcdest}doc -I doc -o doc/mes.pdf $<
|
||||||
|
|
||||||
|
ps: doc/mes.ps
|
||||||
|
|
||||||
|
doc/mes.ps: ${srcdest}doc/mes.texi
|
||||||
|
$(MAKEINFO) --ps -I ${srcdest}doc -I doc -o doc/mes.ps $<
|
||||||
|
|
||||||
|
WEB_IMAGES:=\
|
||||||
|
doc/images/gcc-mesboot-graph.eps\
|
||||||
|
doc/images/gcc-mesboot-graph.pdf\
|
||||||
|
doc/images/gcc-mesboot-graph.png
|
||||||
|
|
||||||
|
web: info $(WEB_IMAGES)
|
||||||
|
GENDOCS_TEMPLATE_DIR=doc build-aux/gendocs.sh -I doc -s ${srcdest}doc/mes.texi -o doc/web/manual --email bug-mes@gnu.org mes "GNU Mes manual"
|
||||||
|
|
||||||
|
### dist
|
||||||
|
COMMIT=$(shell test -e ${srcdest}.git && (cd ${srcdir} && git describe --dirty 2>/dev/null) || cat ${srcdest}.tarball-version)
|
||||||
|
TARBALL_VERSION=$(COMMIT:v%=%)
|
||||||
|
TARBALL_DIR:=$(PACKAGE)-$(TARBALL_VERSION)
|
||||||
|
TARBALL:=$(TARBALL_DIR).tar.gz
|
||||||
|
# Be friendly to Debian; avoid using EPOCH
|
||||||
|
MTIME=$(shell git show HEAD --format=%ct --no-patch 2>/dev/null)
|
||||||
|
# Reproducible tarball
|
||||||
|
TAR_FLAGS=--sort=name --mtime=@$(MTIME) --owner=0 --group=0 --numeric-owner --mode=go=rX,u+rw,a-s
|
||||||
|
|
||||||
|
.tarball-version:
|
||||||
|
echo $(COMMIT) > $@
|
||||||
|
|
||||||
|
GIT_ARCHIVE_HEAD:=git archive HEAD --
|
||||||
|
GIT_LS_FILES:=git ls-files
|
||||||
|
ifeq ($(wildcard .git),)
|
||||||
|
GIT_ARCHIVE_HEAD:=tar -cf-
|
||||||
|
GIT_LS_FILES:=find
|
||||||
|
MTIME:=0
|
||||||
|
endif
|
||||||
|
|
||||||
|
dist: $(TARBALL)
|
||||||
|
|
||||||
|
sign-dist: $(TARBALL)
|
||||||
|
gpg -a --output $(TARBALL).sig --detach-sig $(TARBALL)
|
||||||
|
git checkout ChangeLog
|
||||||
|
|
||||||
|
tree-clean-p:
|
||||||
|
test ! -d .git || git diff --exit-code > /dev/null
|
||||||
|
test ! -d .git || git diff --cached --exit-code > /dev/null
|
||||||
|
@echo commit:$(COMMIT)
|
||||||
|
|
||||||
|
generate-ChangeLog:
|
||||||
|
$(PERL) ${srcdest}build-aux/gitlog-to-changelog --srcdir=${srcdir} > $@
|
||||||
|
cat ChangeLog >> generate-ChangeLog
|
||||||
|
mv generate-ChangeLog ChangeLog
|
||||||
|
|
||||||
|
$(TARBALL): .tarball-version | generate-ChangeLog
|
||||||
|
($(GIT_LS_FILES) \
|
||||||
|
--exclude=$(TARBALL_DIR); \
|
||||||
|
echo $^ | tr ' ' '\n') \
|
||||||
|
| tar $(TAR_FLAGS) \
|
||||||
|
--transform=s,^,$(TARBALL_DIR)/,S -T- -cf- \
|
||||||
|
| gzip -c --no-name > $@
|
||||||
|
git checkout ChangeLog
|
||||||
|
|
||||||
|
ifdef GUIX
|
||||||
|
update-hash: $(TARBALL)
|
||||||
|
$(GUIX) download file://$(PWD)/$<
|
||||||
|
sed -i -e 's,(base32 #!mes!# "[^"]*"),(base32 #!mes!# "$(shell $(GUIX) hash $<)"),' guix/git/mes.scm
|
||||||
|
|
||||||
|
else
|
||||||
|
$(warning update-hash: no guix)
|
||||||
|
endif
|
||||||
|
|
||||||
|
tag:
|
||||||
|
git tag -s v$(VERSION) -m "GNU Mes $(VERSION)."
|
||||||
|
|
||||||
|
# Release process
|
||||||
|
# 0. Prepare git, see history:
|
||||||
|
# - doc: Release update
|
||||||
|
# + NEWS, etc.
|
||||||
|
# + doc/announce/ANNOUNCE-0.22, using xxx for checksums
|
||||||
|
# - Release 0.22
|
||||||
|
# 1. make tag VERSION=0.22
|
||||||
|
# 2. make sign-dist
|
||||||
|
# 3. make release
|
||||||
|
# - Update doc/announce/ANNOUNCE-0.22
|
||||||
|
# - doc: Post-release update.
|
||||||
|
# 4. verify bootstrap
|
||||||
|
|
||||||
|
guix-build:
|
||||||
|
./pre-inst-env $(GUIX) build mes@$(VERSION) --with-source=$(TARBALL)
|
||||||
|
|
||||||
|
release: update-hash | gen-announce guix-build
|
||||||
|
|
||||||
|
GPG_KEY_ID:=1A858392E331EAFDB8C27FFBF3C1A0D9C1D65273
|
||||||
|
GEN_ANNOUNCE=$(GNULIB)/build-aux/announce-gen
|
||||||
|
GNULIB=../../gnulib
|
||||||
|
gen-announce:
|
||||||
|
$(GEN_ANNOUNCE)\
|
||||||
|
--release-type=beta\
|
||||||
|
--package-name=mes\
|
||||||
|
--previous-version='0.21 '\
|
||||||
|
--current-version=$(VERSION)\
|
||||||
|
--gpg-key-id=$(GPG_KEY_ID)\
|
||||||
|
--url-directory=https://ftp.gnu.org/gnu/mes\
|
||||||
|
--news=NEWS\
|
||||||
|
> doc/announce/ANNOUNCE-$(VERSION)-
|
||||||
|
|
||||||
|
installdirs: mkinstalldirs
|
||||||
|
mkdir -p\
|
||||||
|
$(DESTDIR)$(bindir)\
|
||||||
|
$(DESTDIR)$(datadir)\
|
||||||
|
$(DESTDIR)$(libdir)\
|
||||||
|
$(DESTDIR)$(infodir)\
|
||||||
|
$(DESTDIR)$(mandir)
|
||||||
|
|
||||||
|
install-dvi: dvi
|
||||||
|
mkdir -p $(DESTDIR)${docdir}
|
||||||
|
cp doc/mes.dvi $(DESTDIR)${docdir}
|
||||||
|
|
||||||
|
install-html: html
|
||||||
|
mkdir -p $(DESTDIR)${docdir}
|
||||||
|
tar -cf- -C doc html | tar -xf- -C $(DESTDIR)${docdir}
|
||||||
|
|
||||||
|
install-pdf: pdf
|
||||||
|
mkdir -p $(DESTDIR)${docdir}
|
||||||
|
cp doc/mes.pdf $(DESTDIR)${docdir}
|
||||||
|
|
||||||
|
install-ps: ps
|
||||||
|
mkdir -p $(DESTDIR)${docdir}
|
||||||
|
cp doc/mes.ps $(DESTDIR)${docdir}
|
||||||
|
|
||||||
|
# We do not strip binaries, binutils' strip corrupts M1+hex2-generated ELFs
|
||||||
|
install-strip: install
|
||||||
|
|
||||||
|
|
||||||
|
define HELP_TOP
|
||||||
|
Usage: make [OPTION]... [TARGET]...
|
||||||
|
|
||||||
|
Main and non-standard targets:
|
||||||
|
all update everything
|
||||||
|
all-go update .go files
|
||||||
|
dist update $(TARBALL)
|
||||||
|
doc update documentation
|
||||||
|
check run unit tests
|
||||||
|
clean run git clean -dfx
|
||||||
|
clean-go clean .go files
|
||||||
|
info update info documentation
|
||||||
|
install install in $(prefix)
|
||||||
|
install-info install info docs in $(prefix)/share/info
|
||||||
|
release dist and tag
|
||||||
|
uninstall uninstall from $(prefix)
|
||||||
|
endef
|
||||||
|
export HELP_TOP
|
||||||
|
help:
|
||||||
|
@echo "$$HELP_TOP"
|
||||||
|
|
||||||
|
include ${srcdest}build-aux/export.make
|
|
@ -0,0 +1,114 @@
|
||||||
|
#! @SHELL@
|
||||||
|
|
||||||
|
# GNU Mes --- Maxwell Equations of Software
|
||||||
|
# Copyright © 2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
|
#
|
||||||
|
# This file is part of GNU Mes.
|
||||||
|
#
|
||||||
|
# GNU 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.
|
||||||
|
#
|
||||||
|
# GNU 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 GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
LANG=
|
||||||
|
MES_ARENA=${MES_ARENA-20000000}
|
||||||
|
export MES_ARENA
|
||||||
|
MES_MAX_ARENA=${MES_MAX_ARENA-${MES_ARENA}}
|
||||||
|
export MES_MAX_ARENA
|
||||||
|
MES_STACK=${MES_STACK-5000000}
|
||||||
|
export MES_STACK
|
||||||
|
MES_PREFIX=${MES_PREFIX-$PWD}
|
||||||
|
|
||||||
|
. ./config.sh
|
||||||
|
. ${srcdest}build-aux/configure-lib.sh
|
||||||
|
. ${srcdest}build-aux/cflags.sh
|
||||||
|
|
||||||
|
CPPFLAGS="-D HAVE_CONFIG_H=1 -I include"
|
||||||
|
AM_CFLAGS=""
|
||||||
|
mkdir -p mescc-lib
|
||||||
|
cp config.sh mescc-lib/config.sh
|
||||||
|
cd mescc-lib
|
||||||
|
srcdest=../${srcdest}
|
||||||
|
ln -sf ${srcdest}mes .
|
||||||
|
ln -sf ${srcdest}module .
|
||||||
|
ln -sf ${srcdest}src .
|
||||||
|
AM_CPPFLAGS="-D HAVE_CONFIG_H=1 -I ${srcdest}include -I ${srcdest}include/$mes_kernel/$mes_cpu"
|
||||||
|
|
||||||
|
mkdir -p $mes_cpu-mes
|
||||||
|
$CC -c $AM_CPPFLAGS $CPPFLAGS $AM_CFLAGS $CFLAGS ${srcdest}lib/$mes_kernel/$mes_cpu-mes-$compiler/crt1.c
|
||||||
|
cp crt1.o $mes_cpu-mes
|
||||||
|
cp crt1.s $mes_cpu-mes
|
||||||
|
|
||||||
|
objects=
|
||||||
|
for c in $libc_mini_SOURCES; do
|
||||||
|
o=$(basename $c .c).o
|
||||||
|
if test ! -e $o -o ${srcdest}$c -nt $o; then
|
||||||
|
echo " CC $c"
|
||||||
|
$CC -c $AM_CPPFLAGS $CPPFLAGS $AM_CFLAGS $CFLAGS ${srcdest}$c
|
||||||
|
fi
|
||||||
|
objects="$objects $o"
|
||||||
|
done
|
||||||
|
echo " AR $mes_cpu-mes/libc-mini.a"
|
||||||
|
$AR crD $mes_cpu-mes/libc-mini.a $objects
|
||||||
|
|
||||||
|
objects=
|
||||||
|
for c in $libc_SOURCES; do
|
||||||
|
o=$(basename $c .c).o
|
||||||
|
if test ! -e $o -o ${srcdest}$c -nt $o; then
|
||||||
|
echo " CC $c"
|
||||||
|
$CC -c $AM_CPPFLAGS $CPPFLAGS $AM_CFLAGS $CFLAGS ${srcdest}$c
|
||||||
|
fi
|
||||||
|
objects="$objects $o"
|
||||||
|
done
|
||||||
|
echo " AR $mes_cpu-mes/libc.a"
|
||||||
|
$AR crD $mes_cpu-mes/libc.a $objects
|
||||||
|
|
||||||
|
objects=
|
||||||
|
for c in $libc_tcc_SOURCES; do
|
||||||
|
o=$(basename $c .c).o
|
||||||
|
if test ! -e $o -o ${srcdest}$c -nt $o; then
|
||||||
|
echo " CC $c"
|
||||||
|
$CC -c $AM_CPPFLAGS $CPPFLAGS $AM_CFLAGS $CFLAGS ${srcdest}$c
|
||||||
|
fi
|
||||||
|
objects="$objects $o"
|
||||||
|
done
|
||||||
|
echo " AR $mes_cpu-mes/libc+tcc.a"
|
||||||
|
$AR crD $mes_cpu-mes/libc+tcc.a $objects
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
srcdest=
|
||||||
|
CPPFLAGS="-D HAVE_CONFIG_H=1 -I ${srcdest}include -I ${srcdest}include/$mes_kernel/$mes_cpu"
|
||||||
|
|
||||||
|
objects=
|
||||||
|
for c in $mes_SOURCES; do
|
||||||
|
o=$(basename $c .c).o
|
||||||
|
if test ! -e $o -o ${srcdest}$c -nt $o; then
|
||||||
|
echo " CC $c"
|
||||||
|
$CC -c $AM_CPPFLAGS $CPPFLAGS $AM_CFLAGS $CFLAGS ${srcdest}$c
|
||||||
|
fi
|
||||||
|
objects="$objects $o"
|
||||||
|
done
|
||||||
|
echo " CCLD bin/mes-mescc"
|
||||||
|
mkdir -p bin
|
||||||
|
$CC -nostdlib -o bin/mes-mescc -L mescc-lib mescc-lib/crt1.o $objects -lc
|
||||||
|
cp bin/mes-mescc bin/mes
|
||||||
|
|
||||||
|
(
|
||||||
|
mkdir -p gcc-lib
|
||||||
|
cp config.sh gcc-lib
|
||||||
|
cd gcc-lib
|
||||||
|
compiler=gcc
|
||||||
|
if test -z "$srcdest"; then
|
||||||
|
srcdest=../
|
||||||
|
srcdir=../
|
||||||
|
fi
|
||||||
|
@SHELL@ ${srcdest}build-aux/build-source-lib.sh
|
||||||
|
)
|
|
@ -0,0 +1,65 @@
|
||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
# GNU Mes --- Maxwell Equations of Software
|
||||||
|
# Copyright © 2017,2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
|
#
|
||||||
|
# This file is part of GNU Mes.
|
||||||
|
#
|
||||||
|
# GNU 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.
|
||||||
|
#
|
||||||
|
# GNU 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 GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
. ./config.sh
|
||||||
|
|
||||||
|
. ${srcdest}build-aux/trace.sh
|
||||||
|
GUILE_AUTO_COMPILE=0
|
||||||
|
|
||||||
|
SCM_FILES="
|
||||||
|
module/mes/getopt-long.scm
|
||||||
|
module/mes/guile.scm
|
||||||
|
module/mes/misc.scm
|
||||||
|
module/mes/test.scm
|
||||||
|
module/mescc/M1.scm
|
||||||
|
module/mescc/as.scm
|
||||||
|
module/mescc/bytevectors.scm
|
||||||
|
module/mescc/compile.scm
|
||||||
|
module/mescc/i386/as.scm
|
||||||
|
module/mescc/i386/info.scm
|
||||||
|
module/mescc/x86_64/as.scm
|
||||||
|
module/mescc/x86_64/info.scm
|
||||||
|
module/mescc/info.scm
|
||||||
|
module/mescc.scm
|
||||||
|
module/mescc/mescc.scm
|
||||||
|
module/mescc/preprocess.scm
|
||||||
|
"
|
||||||
|
|
||||||
|
SCRIPTS="
|
||||||
|
build-aux/mes-snarf.scm
|
||||||
|
"
|
||||||
|
|
||||||
|
export host=$($GUILE -c "(display %host-type)")
|
||||||
|
|
||||||
|
abs=$srcdest
|
||||||
|
if [ "$GUILE_EFFECTIVE_VERSION" = "2.0" ]; then
|
||||||
|
srcdest=$abs_top_srcdir/
|
||||||
|
fi
|
||||||
|
|
||||||
|
for i in $SCM_FILES $SCRIPTS; do
|
||||||
|
b=$(basename $i)
|
||||||
|
go=${i%%.scm}.go
|
||||||
|
f=${srcdest}$i
|
||||||
|
if test $f -nt $go; then
|
||||||
|
trace "GUILEC $f" $GUILD compile -L ${srcdest}module -L ${srcdest}build-aux -L ${srcdest}scripts -o $go $f
|
||||||
|
fi
|
||||||
|
done
|
|
@ -0,0 +1,81 @@
|
||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
# GNU Mes --- Maxwell Equations of Software
|
||||||
|
# Copyright © 2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
|
#
|
||||||
|
# This file is part of GNU Mes.
|
||||||
|
#
|
||||||
|
# GNU 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.
|
||||||
|
#
|
||||||
|
# GNU 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 GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
. ./config.sh
|
||||||
|
. ${srcdest}build-aux/configure-lib.sh
|
||||||
|
. ${srcdest}build-aux/trace.sh
|
||||||
|
. ${srcdest}build-aux/cc.sh
|
||||||
|
|
||||||
|
trap 'test -f .log && cat .log' EXIT
|
||||||
|
|
||||||
|
mkdir -p $mes_cpu-mes
|
||||||
|
compile lib/$mes_kernel/$mes_cpu-mes-$compiler/crt1.c
|
||||||
|
cp crt1.o $mes_cpu-mes
|
||||||
|
if test -e crt1.s; then
|
||||||
|
cp crt1.s $mes_cpu-mes
|
||||||
|
fi
|
||||||
|
|
||||||
|
archive libc-mini.a $libc_mini_SOURCES
|
||||||
|
cp libc-mini.a $mes_cpu-mes
|
||||||
|
if test -e libc-mini.s; then
|
||||||
|
cp libc-mini.s $mes_cpu-mes
|
||||||
|
fi
|
||||||
|
|
||||||
|
archive libmes.a $libmes_SOURCES
|
||||||
|
cp libmes.a $mes_cpu-mes
|
||||||
|
if test -e libmes.s; then
|
||||||
|
cp libmes.s $mes_cpu-mes
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test $mes_libc = mes; then
|
||||||
|
archive libc.a $libc_SOURCES
|
||||||
|
cp libc.a $mes_cpu-mes
|
||||||
|
if test -e libc.s; then
|
||||||
|
cp libc.s $mes_cpu-mes
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
archive libc+tcc.a $libc_tcc_SOURCES
|
||||||
|
cp libc+tcc.a $mes_cpu-mes
|
||||||
|
if test -e libc+tcc.s; then
|
||||||
|
cp libc+tcc.s $mes_cpu-mes
|
||||||
|
fi
|
||||||
|
|
||||||
|
if $courageous; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
archive libc+gnu.a $libc_gnu_SOURCES
|
||||||
|
cp libc+gnu.a $mes_cpu-mes
|
||||||
|
if test -e libc+gnu.s; then
|
||||||
|
cp libc+gnu.s $mes_cpu-mes
|
||||||
|
fi
|
||||||
|
|
||||||
|
archive libtcc1.a $libtcc1_SOURCES
|
||||||
|
cp libtcc1.a $mes_cpu-mes
|
||||||
|
if test -e libtcc1.s; then
|
||||||
|
cp libtcc1.s $mes_cpu-mes
|
||||||
|
fi
|
||||||
|
|
||||||
|
archive libgetopt.a lib/posix/getopt.c
|
||||||
|
cp libgetopt.a $mes_cpu-mes
|
||||||
|
if test -e libgetopt.s; then
|
||||||
|
cp libgetopt.s $mes_cpu-mes
|
||||||
|
fi
|
|
@ -0,0 +1,57 @@
|
||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
# GNU Mes --- Maxwell Equations of Software
|
||||||
|
# Copyright © 2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
|
#
|
||||||
|
# This file is part of GNU Mes.
|
||||||
|
#
|
||||||
|
# GNU 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.
|
||||||
|
#
|
||||||
|
# GNU 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 GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
set -e
|
||||||
|
set -u
|
||||||
|
|
||||||
|
V=${V-}
|
||||||
|
|
||||||
|
if [ "$V" = 2 ]; then
|
||||||
|
set -x
|
||||||
|
fi
|
||||||
|
|
||||||
|
. ./config.sh
|
||||||
|
. ${srcdest}build-aux/trace.sh
|
||||||
|
. ${srcdest}build-aux/cc.sh
|
||||||
|
|
||||||
|
trap 'test -f .log && cat .log' EXIT
|
||||||
|
|
||||||
|
mes_sources="
|
||||||
|
src/gc.c
|
||||||
|
src/hash.c
|
||||||
|
src/lib.c
|
||||||
|
src/math.c
|
||||||
|
src/mes.c
|
||||||
|
src/module.c
|
||||||
|
src/posix.c
|
||||||
|
src/reader.c
|
||||||
|
src/string.c
|
||||||
|
src/struct.c
|
||||||
|
src/vector.c
|
||||||
|
"
|
||||||
|
|
||||||
|
for c in $mes_sources; do
|
||||||
|
compile $c
|
||||||
|
done
|
||||||
|
if test $mes_libc = system; then
|
||||||
|
LIBS=-lmes
|
||||||
|
fi
|
||||||
|
link bin/mes-$compiler
|
||||||
|
cp bin/mes-$compiler bin/mes
|
|
@ -0,0 +1,149 @@
|
||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
# GNU Mes --- Maxwell Equations of Software
|
||||||
|
# Copyright © 2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
|
#
|
||||||
|
# This file is part of GNU Mes.
|
||||||
|
#
|
||||||
|
# GNU 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.
|
||||||
|
#
|
||||||
|
# GNU 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 GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
set -e
|
||||||
|
set -u
|
||||||
|
|
||||||
|
V=${V-1}
|
||||||
|
|
||||||
|
if [ "$V" = 2 ]; then
|
||||||
|
set -x
|
||||||
|
fi
|
||||||
|
|
||||||
|
. ./config.sh
|
||||||
|
. ${srcdest}build-aux/trace.sh
|
||||||
|
|
||||||
|
if $courageous; then
|
||||||
|
set +e
|
||||||
|
set_min_e () {
|
||||||
|
echo "Applying courage"
|
||||||
|
}
|
||||||
|
set_min_e
|
||||||
|
else
|
||||||
|
set_min_e () {
|
||||||
|
set -e
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
|
||||||
|
case "$mes_cpu" in
|
||||||
|
arm)
|
||||||
|
stage0_arch=40
|
||||||
|
stage0_cpu=armv7l
|
||||||
|
;;
|
||||||
|
x86_64)
|
||||||
|
stage0_arch=2
|
||||||
|
stage0_cpu=amd64
|
||||||
|
;;
|
||||||
|
x86)
|
||||||
|
stage0_arch=1
|
||||||
|
stage0_cpu=x86
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
stage0_arch=1
|
||||||
|
stage0_cpu=$mes_cpu
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
trace "CCLD ${srcdest}lib/$mes_kernel/$mes_cpu-mes-$compiler/exit-42.S" $CC\
|
||||||
|
-nostdlib\
|
||||||
|
-g\
|
||||||
|
${srcdest}lib/$mes_kernel/$mes_cpu-mes-$compiler/exit-42.S\
|
||||||
|
-o exit-42
|
||||||
|
|
||||||
|
trace "TEST exit-42"
|
||||||
|
{ set +e; ./exit-42; r=$?; set_min_e; }
|
||||||
|
[ $r != 42 ] && echo " => $r"
|
||||||
|
[ $r = 42 ]
|
||||||
|
|
||||||
|
if $numbered_arch; then
|
||||||
|
stage0_cpu_flag="--Architecture $stage0_arch";
|
||||||
|
else
|
||||||
|
stage0_cpu_flag="--architecture $stage0_cpu";
|
||||||
|
fi
|
||||||
|
|
||||||
|
trace "HEX2 ${srcdest}lib/$mes_kernel/$mes_cpu-mes/elf$mes_bits-0exit-42.hex2" $HEX2\
|
||||||
|
--LittleEndian\
|
||||||
|
$stage0_cpu_flag\
|
||||||
|
--BaseAddress 0x1000000\
|
||||||
|
-f ${srcdest}lib/$mes_kernel/$mes_cpu-mes/elf$mes_bits-0header.hex2\
|
||||||
|
-f ${srcdest}lib/$mes_kernel/$mes_cpu-mes/elf$mes_bits-0exit-42.hex2\
|
||||||
|
--exec_enable\
|
||||||
|
-o 0exit-42
|
||||||
|
|
||||||
|
trace "TEST 0exit-42"
|
||||||
|
{ set +e; ./0exit-42; r=$?; set_min_e; }
|
||||||
|
[ $r != 42 ] && echo " => $r"
|
||||||
|
[ $r = 42 ]
|
||||||
|
|
||||||
|
trace "HEX2 ${srcdest}lib/$mes_kernel/$mes_cpu-mes/elf$mes_bits-body-exit-42.hex2" $HEX2\
|
||||||
|
--LittleEndian\
|
||||||
|
$stage0_cpu_flag\
|
||||||
|
--BaseAddress 0x1000000\
|
||||||
|
-f ${srcdest}lib/$mes_kernel/$mes_cpu-mes/elf$mes_bits-header.hex2\
|
||||||
|
-f ${srcdest}lib/$mes_kernel/$mes_cpu-mes/elf$mes_bits-body-exit-42.hex2\
|
||||||
|
-f ${srcdest}lib/$mes_kernel/$mes_cpu-mes/elf$mes_bits-footer-single-main.hex2\
|
||||||
|
--exec_enable\
|
||||||
|
-o body-exit-42
|
||||||
|
|
||||||
|
trace "TEST body-exit-42"
|
||||||
|
{ set +e; ./body-exit-42; r=$?; set_min_e; }
|
||||||
|
[ $r != 42 ] && echo " => $r"
|
||||||
|
[ $r = 42 ]
|
||||||
|
|
||||||
|
### FIXME: c&p from exit-42
|
||||||
|
trace "CCLD ${srcdest}lib/$mes_kernel/$mes_cpu-mes-$compiler/hello-mes.S" $CC\
|
||||||
|
-nostdlib\
|
||||||
|
-g\
|
||||||
|
${srcdest}lib/$mes_kernel/$mes_cpu-mes-$compiler/hello-mes.S\
|
||||||
|
-o hello-mes
|
||||||
|
|
||||||
|
trace "TEST hello-mes"
|
||||||
|
{ set +e; ./hello-mes; r=$?; set_min_e; }
|
||||||
|
[ $r != 0 ] && echo " => $r"
|
||||||
|
[ $r = 0 ]
|
||||||
|
|
||||||
|
trace "HEX2 ${srcdest}lib/$mes_kernel/$mes_cpu-mes/elf$mes_bits-0hello-mes.hex2" $HEX2\
|
||||||
|
--LittleEndian\
|
||||||
|
$stage0_cpu_flag\
|
||||||
|
--BaseAddress 0x1000000\
|
||||||
|
-f ${srcdest}lib/$mes_kernel/$mes_cpu-mes/elf$mes_bits-0header.hex2\
|
||||||
|
-f ${srcdest}lib/$mes_kernel/$mes_cpu-mes/elf$mes_bits-0hello-mes.hex2\
|
||||||
|
--exec_enable\
|
||||||
|
-o 0hello-mes
|
||||||
|
|
||||||
|
trace "TEST 0hello-mes"
|
||||||
|
{ set +e; ./0hello-mes; r=$?; set_min_e; }
|
||||||
|
[ $r != 0 ] && echo " => $r"
|
||||||
|
[ $r = 0 ]
|
||||||
|
|
||||||
|
trace "HEX2 ${srcdest}lib/$mes_kernel/$mes_cpu-mes/elf$mes_bits-body-hello-mes.hex2" $HEX2\
|
||||||
|
--LittleEndian\
|
||||||
|
$stage0_cpu_flag\
|
||||||
|
--BaseAddress 0x1000000\
|
||||||
|
-f ${srcdest}lib/$mes_kernel/$mes_cpu-mes/elf$mes_bits-header.hex2\
|
||||||
|
-f ${srcdest}lib/$mes_kernel/$mes_cpu-mes/elf$mes_bits-body-hello-mes.hex2\
|
||||||
|
-f ${srcdest}lib/$mes_kernel/$mes_cpu-mes/elf$mes_bits-footer-single-main.hex2\
|
||||||
|
--exec_enable\
|
||||||
|
-o body-hello-mes
|
||||||
|
|
||||||
|
trace "TEST body-hello-mes"
|
||||||
|
{ set +e; ./body-hello-mes; r=$?; set_min_e; }
|
||||||
|
[ $r != 0 ] && echo " => $r"
|
||||||
|
[ $r = 0 ]
|
|
@ -0,0 +1,53 @@
|
||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
# GNU Mes --- Maxwell Equations of Software
|
||||||
|
# Copyright © 2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
|
#
|
||||||
|
# This file is part of GNU Mes.
|
||||||
|
#
|
||||||
|
# GNU 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.
|
||||||
|
#
|
||||||
|
# GNU 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 GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if test "$V" = 2; then
|
||||||
|
set -x
|
||||||
|
fi
|
||||||
|
|
||||||
|
set -u
|
||||||
|
srcdest=${srcdest-}
|
||||||
|
. ${srcdest}build-aux/configure-lib.sh
|
||||||
|
|
||||||
|
mkdir -p $mes_cpu-mes
|
||||||
|
cp ${srcdest}lib/$mes_kernel/$mes_cpu-mes-$compiler/crt*.c $mes_cpu-mes
|
||||||
|
|
||||||
|
rm -f libc+gnu.c
|
||||||
|
cat > libc+gnu.c <<EOF
|
||||||
|
// Generated from Mes -- do not edit
|
||||||
|
// compiler: $compiler
|
||||||
|
// cpu: $mes_cpu
|
||||||
|
// bits: $mes_bits
|
||||||
|
// libc: $mes_libc
|
||||||
|
// kernel: $mes_kernel
|
||||||
|
// system: $mes_system
|
||||||
|
|
||||||
|
EOF
|
||||||
|
for c in $libc_gnu_SOURCES; do
|
||||||
|
echo "// $c" >> libc+gnu.c
|
||||||
|
cat ${srcdest}$c >> libc+gnu.c
|
||||||
|
echo >> libc+gnu.c
|
||||||
|
done
|
||||||
|
cp libc+gnu.c $mes_cpu-mes
|
||||||
|
|
||||||
|
cp ${srcdest}lib/libtcc1.c $mes_cpu-mes
|
||||||
|
cp ${srcdest}lib/posix/getopt.c $mes_cpu-mes/libgetopt.c
|
|
@ -0,0 +1,141 @@
|
||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
# GNU Mes --- Maxwell Equations of Software
|
||||||
|
# Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
|
#
|
||||||
|
# This file is part of GNU Mes.
|
||||||
|
#
|
||||||
|
# GNU 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.
|
||||||
|
#
|
||||||
|
# GNU 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 GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if test "$1" = "help"; then
|
||||||
|
cat <<EOF
|
||||||
|
Run:
|
||||||
|
./build.sh to build mes
|
||||||
|
./check.sh to check mes
|
||||||
|
./install.sh to install mes
|
||||||
|
EOF
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "$V" = 2; then
|
||||||
|
set -x
|
||||||
|
fi
|
||||||
|
|
||||||
|
set -u
|
||||||
|
. ./config.sh
|
||||||
|
. ${srcdest}build-aux/cflags.sh
|
||||||
|
|
||||||
|
if $courageous; then
|
||||||
|
echo "Applying courage"
|
||||||
|
set +e
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "$compiler" != bootstrap; then
|
||||||
|
${SHELL} ${srcdest}build-aux/build-scaffold.sh
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -n "$GUILE" -a "$GUILE" != true; then
|
||||||
|
${SHELL} ${srcdest}build-aux/build-guile.sh
|
||||||
|
fi
|
||||||
|
|
||||||
|
(
|
||||||
|
mkdir -p gcc-lib
|
||||||
|
cp config.sh gcc-lib
|
||||||
|
cd gcc-lib
|
||||||
|
if test -z "$srcdest"; then
|
||||||
|
srcdest=../
|
||||||
|
srcdir=../
|
||||||
|
fi
|
||||||
|
if test $compiler = gcc; then
|
||||||
|
AM_LDFLAGS="$AM_LDFLAGS
|
||||||
|
-L gcc-lib
|
||||||
|
"
|
||||||
|
AM_CPPFLAGS="
|
||||||
|
-D HAVE_CONFIG_H=1
|
||||||
|
-I ${srcdest}lib
|
||||||
|
-I include
|
||||||
|
-I ${srcdest}include
|
||||||
|
-I ${srcdest}include/$mes_kernel/$mes_cpu
|
||||||
|
"
|
||||||
|
if test $mes_kernel = gnu; then
|
||||||
|
AM_CPPFLAGS="$AM_CPPFLAGS
|
||||||
|
-I /usr/include
|
||||||
|
"
|
||||||
|
fi
|
||||||
|
|
||||||
|
${SHELL} ${srcdest}build-aux/build-lib.sh
|
||||||
|
cp crt1.o ..
|
||||||
|
fi
|
||||||
|
compiler=gcc ${SHELL} ${srcdest}build-aux/build-source-lib.sh
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
(
|
||||||
|
if test $compiler = gcc; then
|
||||||
|
AM_LDFLAGS="$AM_LDFLAGS
|
||||||
|
-L gcc-lib
|
||||||
|
"
|
||||||
|
fi
|
||||||
|
|
||||||
|
AM_CPPFLAGS="
|
||||||
|
-D HAVE_CONFIG_H=1
|
||||||
|
-I ${srcdest}lib
|
||||||
|
-I include
|
||||||
|
-I ${srcdest}include
|
||||||
|
-I ${srcdest}include/$mes_kernel/$mes_cpu
|
||||||
|
"
|
||||||
|
if test $compiler = gcc; then
|
||||||
|
${SHELL} ${srcdest}build-aux/build-mes.sh
|
||||||
|
fi
|
||||||
|
)
|
||||||
|
|
||||||
|
(
|
||||||
|
mkdir -p mescc-lib
|
||||||
|
cp config.sh mescc-lib
|
||||||
|
cd mescc-lib
|
||||||
|
sed -i s,mes_libc=system,mes_libc=mes, config.sh
|
||||||
|
mkdir -p include/mes
|
||||||
|
cp ../include/mes/config.h include/mes/config.h
|
||||||
|
sed -i 's,#define SYSTEM_LIBC 1,#undef SYSTEM_LIBC,' include/mes/config.h
|
||||||
|
if test -z "$srcdest"; then
|
||||||
|
srcdest=../
|
||||||
|
srcdir=../
|
||||||
|
fi
|
||||||
|
ln -sf ${srcdest}mes .
|
||||||
|
ln -sf ${srcdest}module .
|
||||||
|
ln -sf ${srcdest}src .
|
||||||
|
AM_CPPFLAGS="
|
||||||
|
-D HAVE_CONFIG_H=1
|
||||||
|
-I ${srcdest}lib
|
||||||
|
-I include
|
||||||
|
-I ${srcdest}include
|
||||||
|
-I ${srcdest}include/$mes_kernel/$mes_cpu
|
||||||
|
"
|
||||||
|
compiler=mescc
|
||||||
|
AR=${MESAR-"${srcdest}pre-inst-env mesar"}
|
||||||
|
CC=${MESCC-"${srcdest}pre-inst-env mescc -m $mes_bits"}
|
||||||
|
# No user overrides for MesCC, they are probably intended for GCC
|
||||||
|
CFLAGS=
|
||||||
|
CPPFLAGS=
|
||||||
|
LDFLAGS=
|
||||||
|
${SHELL} ${srcdest}build-aux/build-lib.sh
|
||||||
|
${SHELL} ${srcdest}build-aux/build-source-lib.sh
|
||||||
|
if $bootstrap; then
|
||||||
|
${SHELL} ${srcdest}build-aux/build-mes.sh
|
||||||
|
cp -f bin/mes-mescc ../bin
|
||||||
|
cp -f bin/mes ../bin
|
||||||
|
fi
|
||||||
|
)
|
|
@ -0,0 +1,56 @@
|
||||||
|
# GNU Mes --- Maxwell Equations of Software
|
||||||
|
# Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
|
#
|
||||||
|
# This file is part of GNU Mes.
|
||||||
|
#
|
||||||
|
# GNU 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.
|
||||||
|
#
|
||||||
|
# GNU 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 GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
objects=
|
||||||
|
compile () {
|
||||||
|
c=${srcdest}$1
|
||||||
|
b=$(basename $c .c)
|
||||||
|
o=$b.o
|
||||||
|
objects="$objects $o"
|
||||||
|
if test ! -e $o -o $c -nt $o; then
|
||||||
|
trace "CC $c" $CC -c $AM_CPPFLAGS $CPPFLAGS $AM_CFLAGS $CFLAGS -o $o $c
|
||||||
|
$CC -c $AM_CPPFLAGS $CPPFLAGS $AM_CFLAGS $CFLAGS -o $o $c
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
archive () {
|
||||||
|
archive=$1
|
||||||
|
shift
|
||||||
|
sources="$@"
|
||||||
|
objects=
|
||||||
|
for c in $sources; do
|
||||||
|
b=$(basename $c .c)
|
||||||
|
o=$b.o
|
||||||
|
compile $c
|
||||||
|
done
|
||||||
|
trace "AR $archive" $AR crD $archive $objects
|
||||||
|
objects=
|
||||||
|
}
|
||||||
|
|
||||||
|
link () {
|
||||||
|
out=$1
|
||||||
|
d=$(dirname $out)
|
||||||
|
mkdir -p $d
|
||||||
|
if test $mes_libc = system; then
|
||||||
|
crt1=
|
||||||
|
else
|
||||||
|
crt1=crt1.o
|
||||||
|
fi
|
||||||
|
trace "CCLD $out" $CC $AM_CFLAGS $CFLAGS $AM_LDFLAGS $LDFLAGS -o $out $crt1 $objects $LIBS
|
||||||
|
objects=
|
||||||
|
}
|
|
@ -0,0 +1,56 @@
|
||||||
|
# GNU Mes --- Maxwell Equations of Software
|
||||||
|
# Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
|
#
|
||||||
|
# This file is part of GNU Mes.
|
||||||
|
#
|
||||||
|
# GNU 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.
|
||||||
|
#
|
||||||
|
# GNU 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 GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
AM_CPPFLAGS="
|
||||||
|
-D HAVE_CONFIG_H=1
|
||||||
|
-I ${srcdest}include
|
||||||
|
-I ${srcdest}include/$mes_kernel/$mes_cpu
|
||||||
|
"
|
||||||
|
|
||||||
|
if test $mes_kernel = gnu; then
|
||||||
|
AM_CPPFLAGS="$AM_CPPFLAGS
|
||||||
|
-I /usr/include
|
||||||
|
"
|
||||||
|
fi
|
||||||
|
|
||||||
|
AM_CFLAGS=
|
||||||
|
|
||||||
|
if test $mes_libc = mes; then
|
||||||
|
AM_CFLAGS="$AM_CFLAGS
|
||||||
|
-static
|
||||||
|
-nostdinc
|
||||||
|
-nostdlib
|
||||||
|
-fno-builtin
|
||||||
|
"
|
||||||
|
fi
|
||||||
|
|
||||||
|
AM_LDFLAGS="
|
||||||
|
-L .
|
||||||
|
"
|
||||||
|
if test $mes_libc = mes; then
|
||||||
|
AM_LDFLAGS="$AM_LDFLAGS
|
||||||
|
-static
|
||||||
|
-nostdlib
|
||||||
|
"
|
||||||
|
fi
|
||||||
|
LIBS=-lc
|
||||||
|
|
||||||
|
export AM_CFLAGS CFLAGS
|
||||||
|
export AM_CPPFLAGS CPPFLAGS
|
||||||
|
export AM_LDFLAGS LDFLAGS
|
||||||
|
export LIBS
|
|
@ -0,0 +1,121 @@
|
||||||
|
#! /bin/bash
|
||||||
|
|
||||||
|
# GNU Mes --- Maxwell Equations of Software
|
||||||
|
# Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
|
#
|
||||||
|
# This file is part of GNU Mes.
|
||||||
|
#
|
||||||
|
# GNU 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.
|
||||||
|
#
|
||||||
|
# GNU 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 GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
set -e
|
||||||
|
. ./config.sh
|
||||||
|
set -u
|
||||||
|
|
||||||
|
TESTS="
|
||||||
|
|
||||||
|
scaffold/boot/00-zero.scm
|
||||||
|
scaffold/boot/01-true.scm
|
||||||
|
scaffold/boot/02-symbol.scm
|
||||||
|
scaffold/boot/03-string.scm
|
||||||
|
scaffold/boot/04-quote.scm
|
||||||
|
scaffold/boot/05-list.scm
|
||||||
|
scaffold/boot/06-tick.scm
|
||||||
|
scaffold/boot/07-if.scm
|
||||||
|
scaffold/boot/08-if-if.scm
|
||||||
|
|
||||||
|
scaffold/boot/10-cons.scm
|
||||||
|
scaffold/boot/11-list.scm
|
||||||
|
scaffold/boot/11-vector.scm
|
||||||
|
scaffold/boot/12-car.scm
|
||||||
|
scaffold/boot/13-cdr.scm
|
||||||
|
scaffold/boot/14-exit.scm
|
||||||
|
scaffold/boot/15-display.scm
|
||||||
|
|
||||||
|
scaffold/boot/16-if-eq-quote.scm
|
||||||
|
|
||||||
|
scaffold/boot/17-memq.scm
|
||||||
|
scaffold/boot/17-memq-keyword.scm
|
||||||
|
scaffold/boot/17-string-equal.scm
|
||||||
|
scaffold/boot/17-equal2.scm
|
||||||
|
scaffold/boot/17-string-append.scm
|
||||||
|
scaffold/boot/17-open-input-string.scm
|
||||||
|
|
||||||
|
scaffold/boot/20-define.scm
|
||||||
|
scaffold/boot/20-define-quoted.scm
|
||||||
|
scaffold/boot/20-define-quote.scm
|
||||||
|
|
||||||
|
scaffold/boot/21-define-procedure.scm
|
||||||
|
scaffold/boot/22-define-procedure-2.scm
|
||||||
|
scaffold/boot/23-begin.scm
|
||||||
|
scaffold/boot/24-begin-define.scm
|
||||||
|
scaffold/boot/25-begin-define-2.scm
|
||||||
|
scaffold/boot/26-begin-define-later.scm
|
||||||
|
scaffold/boot/27-lambda-define.scm
|
||||||
|
scaffold/boot/28-define-define.scm
|
||||||
|
scaffold/boot/29-lambda-define.scm
|
||||||
|
scaffold/boot/2a-lambda-lambda.scm
|
||||||
|
scaffold/boot/2b-define-lambda.scm
|
||||||
|
scaffold/boot/2c-define-lambda-recurse.scm
|
||||||
|
scaffold/boot/2d-define-lambda-set.scm
|
||||||
|
scaffold/boot/2d-compose.scm
|
||||||
|
scaffold/boot/2e-define-first.scm
|
||||||
|
scaffold/boot/2f-define-second.scm
|
||||||
|
scaffold/boot/2f-define-second-lambda.scm
|
||||||
|
scaffold/boot/2g-vector.scm
|
||||||
|
|
||||||
|
scaffold/boot/30-capture.scm
|
||||||
|
scaffold/boot/31-capture-define.scm
|
||||||
|
scaffold/boot/32-capture-modify-close.scm
|
||||||
|
scaffold/boot/33-procedure-override-close.scm
|
||||||
|
scaffold/boot/34-cdr-override-close.scm
|
||||||
|
scaffold/boot/35-closure-modify.scm
|
||||||
|
scaffold/boot/36-closure-override.scm
|
||||||
|
scaffold/boot/37-closure-lambda.scm
|
||||||
|
scaffold/boot/38-simple-format.scm
|
||||||
|
scaffold/boot/39-global-define-override.scm
|
||||||
|
scaffold/boot/3a-global-define-lambda-override.scm
|
||||||
|
|
||||||
|
scaffold/boot/40-define-macro.scm
|
||||||
|
scaffold/boot/41-when.scm
|
||||||
|
scaffold/boot/42-if-when.scm
|
||||||
|
scaffold/boot/43-or.scm
|
||||||
|
scaffold/boot/44-or-if.scm
|
||||||
|
scaffold/boot/45-pass-if.scm
|
||||||
|
scaffold/boot/46-report.scm
|
||||||
|
scaffold/boot/47-pass-if-eq.scm
|
||||||
|
scaffold/boot/48-let.scm
|
||||||
|
scaffold/boot/49-macro-override.scm
|
||||||
|
scaffold/boot/4a-define-macro-define-macro.scm
|
||||||
|
scaffold/boot/4b-define-macro-define.scm
|
||||||
|
scaffold/boot/4c-quasiquote.scm
|
||||||
|
scaffold/boot/4d-let-map.scm
|
||||||
|
scaffold/boot/4e-let-global.scm
|
||||||
|
scaffold/boot/4f-string-split.scm
|
||||||
|
|
||||||
|
scaffold/boot/50-keyword.scm
|
||||||
|
scaffold/boot/50-make-string.scm
|
||||||
|
scaffold/boot/50-string-join.scm
|
||||||
|
scaffold/boot/50-primitive-load.scm
|
||||||
|
scaffold/boot/53-closure-display.scm
|
||||||
|
scaffold/boot/60-let-syntax.scm
|
||||||
|
scaffold/boot/call-cc.scm
|
||||||
|
scaffold/boot/memory.scm
|
||||||
|
scaffold/boot/numbers.scm
|
||||||
|
"
|
||||||
|
|
||||||
|
XFAIL_TESTS=
|
||||||
|
|
||||||
|
test_ext=.scm
|
||||||
|
log_compiler="${SHELL} ${srcdest}build-aux/test-boot.sh"
|
||||||
|
. ${srcdest}build-aux/test-suite.sh
|
|
@ -0,0 +1,62 @@
|
||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
# GNU Mes --- Maxwell Equations of Software
|
||||||
|
# Copyright © 2017,2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
|
#
|
||||||
|
# This file is part of GNU Mes.
|
||||||
|
#
|
||||||
|
# GNU 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.
|
||||||
|
#
|
||||||
|
# GNU 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 GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
set -e
|
||||||
|
. ./config.sh
|
||||||
|
set -u
|
||||||
|
|
||||||
|
TESTS="
|
||||||
|
tests/boot.test
|
||||||
|
tests/read.test
|
||||||
|
tests/srfi-0.test
|
||||||
|
tests/macro.test
|
||||||
|
tests/perform.test
|
||||||
|
tests/base.test
|
||||||
|
tests/quasiquote.test
|
||||||
|
tests/let.test
|
||||||
|
tests/closure.test
|
||||||
|
tests/scm.test
|
||||||
|
tests/display.test
|
||||||
|
tests/cwv.test
|
||||||
|
tests/math.test
|
||||||
|
tests/vector.test
|
||||||
|
tests/srfi-1.test
|
||||||
|
tests/srfi-9.test
|
||||||
|
tests/srfi-13.test
|
||||||
|
tests/srfi-14.test
|
||||||
|
tests/srfi-43.test
|
||||||
|
tests/optargs.test
|
||||||
|
tests/fluids.test
|
||||||
|
tests/catch.test
|
||||||
|
tests/getopt-long.test
|
||||||
|
tests/guile.test
|
||||||
|
tests/syntax.test
|
||||||
|
tests/let-syntax.test
|
||||||
|
tests/pmatch.test
|
||||||
|
tests/posix.test
|
||||||
|
tests/match.test
|
||||||
|
tests/psyntax.test
|
||||||
|
"
|
||||||
|
|
||||||
|
XFAIL_TESTS=
|
||||||
|
|
||||||
|
test_ext=.test
|
||||||
|
log_compiler=${SHELL}
|
||||||
|
. ${srcdest}build-aux/test-suite.sh
|
|
@ -0,0 +1,290 @@
|
||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
# GNU Mes --- Maxwell Equations of Software
|
||||||
|
# Copyright © 2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
|
#
|
||||||
|
# This file is part of GNU Mes.
|
||||||
|
#
|
||||||
|
# GNU 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.
|
||||||
|
#
|
||||||
|
# GNU 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 GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
set -e
|
||||||
|
. ./config.sh
|
||||||
|
set -u
|
||||||
|
|
||||||
|
TESTS="
|
||||||
|
lib/tests/scaffold/t.c
|
||||||
|
lib/tests/scaffold/01-return-0.c
|
||||||
|
lib/tests/scaffold/02-return-1.c
|
||||||
|
lib/tests/scaffold/03-call.c
|
||||||
|
lib/tests/scaffold/04-call-0.c
|
||||||
|
lib/tests/scaffold/05-call-1.c
|
||||||
|
lib/tests/scaffold/06-call-not-1.c
|
||||||
|
lib/tests/scaffold/06-not-call-1.c
|
||||||
|
lib/tests/scaffold/06-call-2.c
|
||||||
|
lib/tests/scaffold/06-call-string.c
|
||||||
|
lib/tests/scaffold/06-call-variable.c
|
||||||
|
lib/tests/scaffold/06-return-void.c
|
||||||
|
lib/tests/scaffold/07-include.c
|
||||||
|
lib/tests/scaffold/08-assign.c
|
||||||
|
lib/tests/scaffold/08-assign-negative.c
|
||||||
|
lib/tests/scaffold/08-assign-global.c
|
||||||
|
lib/tests/scaffold/10-if-0.c
|
||||||
|
lib/tests/scaffold/11-if-1.c
|
||||||
|
lib/tests/scaffold/12-if-eq.c
|
||||||
|
lib/tests/scaffold/13-if-neq.c
|
||||||
|
lib/tests/scaffold/14-if-goto.c
|
||||||
|
lib/tests/scaffold/15-if-not-f.c
|
||||||
|
lib/tests/scaffold/16-if-t.c
|
||||||
|
lib/tests/scaffold/17-compare-char.c
|
||||||
|
lib/tests/scaffold/17-compare-ge.c
|
||||||
|
lib/tests/scaffold/17-compare-gt.c
|
||||||
|
lib/tests/scaffold/17-compare-le.c
|
||||||
|
lib/tests/scaffold/17-compare-lt.c
|
||||||
|
lib/tests/scaffold/17-compare-unsigned-ge.c
|
||||||
|
lib/tests/scaffold/17-compare-unsigned-gt.c
|
||||||
|
lib/tests/scaffold/17-compare-unsigned-le.c
|
||||||
|
lib/tests/scaffold/17-compare-unsigned-lt.c
|
||||||
|
lib/tests/scaffold/17-compare-unsigned-char-le.c
|
||||||
|
lib/tests/scaffold/17-compare-unsigned-short-le.c
|
||||||
|
lib/tests/scaffold/17-compare-unsigned-long-le.c
|
||||||
|
lib/tests/scaffold/17-compare-and.c
|
||||||
|
lib/tests/scaffold/17-compare-or.c
|
||||||
|
lib/tests/scaffold/17-compare-and-or.c
|
||||||
|
lib/tests/scaffold/17-compare-assign.c
|
||||||
|
lib/tests/scaffold/17-compare-call.c
|
||||||
|
lib/tests/scaffold/18-assign-shadow.c
|
||||||
|
lib/tests/scaffold/20-while.c
|
||||||
|
lib/tests/scaffold/21-char-array-simple.c
|
||||||
|
lib/tests/scaffold/21-char-array.c
|
||||||
|
lib/tests/scaffold/22-while-char-array.c
|
||||||
|
lib/tests/scaffold/23-global-pointer-init-null.c
|
||||||
|
lib/tests/scaffold/23-global-pointer-init.c
|
||||||
|
lib/tests/scaffold/23-global-pointer-ref.c
|
||||||
|
lib/tests/scaffold/23-global-pointer-pointer-ref.c
|
||||||
|
lib/tests/scaffold/23-pointer-sub.c
|
||||||
|
lib/tests/scaffold/23-pointer.c
|
||||||
|
lib/tests/mes/30-oputs.c
|
||||||
|
lib/tests/mes/30-eputs.c
|
||||||
|
lib/tests/string/30-strlen.c
|
||||||
|
lib/tests/scaffold/30-exit-0.c
|
||||||
|
lib/tests/scaffold/30-exit-42.c
|
||||||
|
lib/tests/scaffold/32-call-wrap.c
|
||||||
|
lib/tests/scaffold/32-compare.c
|
||||||
|
lib/tests/scaffold/33-and-or.c
|
||||||
|
lib/tests/scaffold/34-pre-post.c
|
||||||
|
lib/tests/scaffold/35-compare-char.c
|
||||||
|
lib/tests/scaffold/36-compare-arithmetic.c
|
||||||
|
lib/tests/scaffold/37-compare-assign.c
|
||||||
|
lib/tests/scaffold/38-compare-call-2.c
|
||||||
|
lib/tests/scaffold/38-compare-call-3.c
|
||||||
|
lib/tests/scaffold/38-compare-call.c
|
||||||
|
lib/tests/scaffold/40-if-else.c
|
||||||
|
lib/tests/scaffold/41-ternary.c
|
||||||
|
lib/tests/scaffold/42-goto-label.c
|
||||||
|
lib/tests/scaffold/43-for-do-while.c
|
||||||
|
lib/tests/scaffold/44-switch.c
|
||||||
|
lib/tests/scaffold/44-switch-fallthrough.c
|
||||||
|
lib/tests/scaffold/44-switch-body-fallthrough.c
|
||||||
|
lib/tests/scaffold/45-void-call.c
|
||||||
|
lib/tests/scaffold/46-function-static.c
|
||||||
|
lib/tests/scaffold/47-function-expression.c
|
||||||
|
lib/tests/scaffold/48-global-static.c
|
||||||
|
lib/tests/assert/50-assert.c
|
||||||
|
lib/tests/mes/50-itoa.c
|
||||||
|
lib/tests/posix/50-getenv.c
|
||||||
|
lib/tests/stdlib/50-malloc.c
|
||||||
|
lib/tests/string/50-strcmp.c
|
||||||
|
lib/tests/string/50-strcpy.c
|
||||||
|
lib/tests/string/50-strncmp.c
|
||||||
|
lib/tests/posix/50-open-read.c
|
||||||
|
lib/tests/scaffold/51-pointer-sub.c
|
||||||
|
lib/tests/scaffold/54-argc.c
|
||||||
|
lib/tests/scaffold/54-argv.c
|
||||||
|
lib/tests/scaffold/55-char-array.c
|
||||||
|
lib/tests/scaffold/60-math.c
|
||||||
|
lib/tests/scaffold/61-array.c
|
||||||
|
lib/tests/scaffold/62-array.c
|
||||||
|
lib/tests/scaffold/63-struct.c
|
||||||
|
lib/tests/scaffold/63-struct-pointer.c
|
||||||
|
lib/tests/scaffold/63-struct-local.c
|
||||||
|
lib/tests/scaffold/63-struct-function.c
|
||||||
|
lib/tests/scaffold/63-struct-assign.c
|
||||||
|
lib/tests/scaffold/63-struct-array.c
|
||||||
|
lib/tests/scaffold/63-struct-array-assign.c
|
||||||
|
lib/tests/scaffold/63-struct-array-compare.c
|
||||||
|
lib/tests/scaffold/63-struct-cell.c
|
||||||
|
lib/tests/scaffold/64-make-cell.c
|
||||||
|
lib/tests/scaffold/65-read.c
|
||||||
|
lib/tests/scaffold/66-local-char-array.c
|
||||||
|
lib/tests/scaffold/70-stdarg.c
|
||||||
|
lib/tests/stdio/70-printf-hello.c
|
||||||
|
lib/tests/stdio/70-printf-simple.c
|
||||||
|
lib/tests/stdio/70-printf.c
|
||||||
|
lib/tests/stdlib/70-strtoull.c
|
||||||
|
lib/tests/string/70-strchr.c
|
||||||
|
lib/tests/scaffold/71-struct-array.c
|
||||||
|
lib/tests/scaffold/72-typedef-struct-def.c
|
||||||
|
lib/tests/scaffold/72-typedef-struct-def-local.c
|
||||||
|
lib/tests/scaffold/73-union-hello.c
|
||||||
|
lib/tests/scaffold/73-union.c
|
||||||
|
lib/tests/scaffold/74-multi-line-string.c
|
||||||
|
lib/tests/scaffold/75-struct-union.c
|
||||||
|
lib/tests/scaffold/76-pointer-arithmetic-pp.c
|
||||||
|
lib/tests/scaffold/76-pointer-arithmetic.c
|
||||||
|
lib/tests/scaffold/77-pointer-assign.c
|
||||||
|
lib/tests/scaffold/78-union-struct.c
|
||||||
|
lib/tests/scaffold/79-int-array-simple.c
|
||||||
|
lib/tests/scaffold/79-int-array.c
|
||||||
|
lib/tests/scaffold/7a-struct-char-array.c
|
||||||
|
lib/tests/scaffold/7b-struct-int-array-hello.c
|
||||||
|
lib/tests/scaffold/7b-struct-int-array-pointer.c
|
||||||
|
lib/tests/scaffold/7b-struct-int-array.c
|
||||||
|
lib/tests/scaffold/7c-dynarray.c
|
||||||
|
lib/tests/scaffold/7d-cast-char.c
|
||||||
|
lib/tests/scaffold/7e-struct-array-access.c
|
||||||
|
lib/tests/scaffold/7f-struct-pointer-arithmetic.c
|
||||||
|
lib/tests/scaffold/7g-struct-byte-word-field.c
|
||||||
|
lib/tests/scaffold/7h-struct-assign.c
|
||||||
|
lib/tests/scaffold/7i-struct-struct-simple.c
|
||||||
|
lib/tests/scaffold/7i-struct-struct.c
|
||||||
|
lib/tests/scaffold/7k-empty-for.c
|
||||||
|
lib/tests/scaffold/7k-for-each-elem-simple.c
|
||||||
|
lib/tests/scaffold/7k-for-each-elem.c
|
||||||
|
lib/tests/scaffold/7l-struct-any-size-array-simple.c
|
||||||
|
lib/tests/scaffold/7l-struct-any-size-array.c
|
||||||
|
lib/tests/scaffold/7m-struct-char-array-assign.c
|
||||||
|
lib/tests/scaffold/7n-struct-struct-array.c
|
||||||
|
lib/tests/scaffold/7o-struct-pre-post-simple.c
|
||||||
|
lib/tests/scaffold/7o-struct-pre-post.c
|
||||||
|
lib/tests/scaffold/7p-struct-cast.c
|
||||||
|
lib/tests/scaffold/7q-bit-field-simple.c
|
||||||
|
lib/tests/scaffold/7q-bit-field.c
|
||||||
|
lib/tests/scaffold/7r-sign-extend.c
|
||||||
|
lib/tests/scaffold/7s-struct-short.c
|
||||||
|
lib/tests/scaffold/7s-unsigned-compare.c
|
||||||
|
lib/tests/scaffold/7t-function-destruct.c
|
||||||
|
lib/tests/scaffold/7u-double.c
|
||||||
|
lib/tests/scaffold/7u-long-long.c
|
||||||
|
lib/tests/scaffold/7u-ternary-expression.c
|
||||||
|
lib/tests/scaffold/7u-call-ternary.c
|
||||||
|
lib/tests/scaffold/7u-inc-byte-word.c
|
||||||
|
lib/tests/scaffold/7u-struct-func.c
|
||||||
|
lib/tests/scaffold/7u-struct-size10.c
|
||||||
|
lib/tests/scaffold/7u-vstack.c
|
||||||
|
lib/tests/scaffold/70-array-in-struct-init.c
|
||||||
|
lib/tests/scaffold/70-struct-short-enum-init.c
|
||||||
|
lib/tests/scaffold/70-struct-post.c
|
||||||
|
lib/tests/scaffold/70-extern.c
|
||||||
|
lib/tests/setjmp/80-setjmp.c
|
||||||
|
lib/tests/stdio/80-sscanf.c
|
||||||
|
lib/tests/stdlib/80-qsort.c
|
||||||
|
lib/tests/stdlib/80-qsort-dupes.c
|
||||||
|
lib/tests/string/80-strncpy.c
|
||||||
|
lib/tests/string/80-strrchr.c
|
||||||
|
lib/tests/scaffold/82-define.c
|
||||||
|
lib/tests/scaffold/83-heterogenoous-init.c
|
||||||
|
lib/tests/scaffold/84-struct-field-list.c
|
||||||
|
lib/tests/scaffold/85-sizeof.c
|
||||||
|
"
|
||||||
|
|
||||||
|
if test -z "$bootstrap"; then
|
||||||
|
TESTS="$TESTS
|
||||||
|
lib/tests/dirent/90-readdir.c
|
||||||
|
lib/tests/io/90-stat.c
|
||||||
|
lib/tests/mes/90-abtod.c
|
||||||
|
lib/tests/mes/90-dtoab.c
|
||||||
|
lib/tests/posix/90-execlp.c
|
||||||
|
lib/tests/posix/90-unsetenv.c
|
||||||
|
lib/tests/signal/90-signal.c
|
||||||
|
lib/tests/stdio/90-fopen.c
|
||||||
|
lib/tests/stdio/90-fopen-append.c
|
||||||
|
lib/tests/stdio/90-fread-fwrite.c
|
||||||
|
lib/tests/stdio/90-fseek.c
|
||||||
|
lib/tests/stdio/90-sprintf.c
|
||||||
|
lib/tests/stdlib/90-strtol.c
|
||||||
|
lib/tests/string/90-snprintf.c
|
||||||
|
lib/tests/string/90-strpbrk.c
|
||||||
|
lib/tests/string/90-strspn.c
|
||||||
|
lib/tests/scaffold/90-goto-var.c
|
||||||
|
lib/tests/scaffold/91-goto-array.c
|
||||||
|
lib/tests/scaffold/a0-call-trunc-char.c
|
||||||
|
lib/tests/scaffold/a0-call-trunc-short.c
|
||||||
|
lib/tests/scaffold/a0-call-trunc-int.c
|
||||||
|
lib/tests/scaffold/a0-math-divide-signed-negative.c
|
||||||
|
lib/tests/scaffold/a1-global-no-align.c
|
||||||
|
lib/tests/scaffold/a1-global-no-clobber.c
|
||||||
|
"
|
||||||
|
fi
|
||||||
|
|
||||||
|
XFAIL_TESTS="
|
||||||
|
lib/tests/stdio/90-sprintf.c
|
||||||
|
"
|
||||||
|
|
||||||
|
if test $compiler = mescc; then
|
||||||
|
XFAIL_TESTS="$XFAIL_TESTS
|
||||||
|
lib/tests/scaffold/17-compare-unsigned-char-le.c
|
||||||
|
lib/tests/scaffold/17-compare-unsigned-short-le.c
|
||||||
|
lib/tests/scaffold/66-local-char-array.c
|
||||||
|
lib/tests/scaffold/72-typedef-struct-def-local.c
|
||||||
|
lib/tests/mes/90-abtod.c
|
||||||
|
lib/tests/mes/90-dtoab.c
|
||||||
|
lib/tests/scaffold/90-goto-var.c
|
||||||
|
lib/tests/scaffold/91-goto-array.c
|
||||||
|
"
|
||||||
|
|
||||||
|
if test $mes_cpu = x86; then
|
||||||
|
XFAIL_TESTS="$XFAIL_TESTS
|
||||||
|
"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test $mes_cpu = x86_64; then
|
||||||
|
XFAIL_TESTS="$XFAIL_TESTS
|
||||||
|
lib/tests/scaffold/a0-call-trunc-int.c
|
||||||
|
"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test $mes_cpu = x86_64; then
|
||||||
|
XFAIL_TESTS="$XFAIL_TESTS
|
||||||
|
lib/tests/stdio/70-printf-stdarg.c
|
||||||
|
"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test $compiler = gcc; then
|
||||||
|
XFAIL_TESTS="$XFAIL_TESTS
|
||||||
|
"
|
||||||
|
|
||||||
|
if test $mes_cpu = x86; then
|
||||||
|
XFAIL_TESTS="$XFAIL_TESTS
|
||||||
|
lib/tests/mes/90-dtoab.c
|
||||||
|
"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test $mes_cpu = x86_64; then
|
||||||
|
XFAIL_TESTS="$XFAIL_TESTS
|
||||||
|
lib/tests/stdio/70-printf-hello.c
|
||||||
|
lib/tests/stdio/70-printf-simple.c
|
||||||
|
lib/tests/stdio/70-printf.c
|
||||||
|
lib/tests/scaffold/70-extern.c
|
||||||
|
lib/tests/stdio/80-sscanf.c
|
||||||
|
lib/tests/posix/90-execlp.c
|
||||||
|
lib/tests/string/90-snprintf.c
|
||||||
|
"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
recheck=${recheck-false}
|
||||||
|
test_ext=.c
|
||||||
|
log_compiler="${SHELL} ${srcdest}build-aux/test-c.sh"
|
||||||
|
. ${srcdest}build-aux/test-suite.sh
|
|
@ -0,0 +1,101 @@
|
||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
# GNU Mes --- Maxwell Equations of Software
|
||||||
|
# Copyright © 2017,2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
|
#
|
||||||
|
# This file is part of GNU Mes.
|
||||||
|
#
|
||||||
|
# GNU 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.
|
||||||
|
#
|
||||||
|
# GNU 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 GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
MES_ARENA=${MES_ARENA-20000000}
|
||||||
|
export MES_ARENA
|
||||||
|
MES_MAX_ARENA=${MES_MAX_ARENA-${MES_ARENA}}
|
||||||
|
export MES_MAX_ARENA
|
||||||
|
MES_STACK=${MES_STACK-5000000}
|
||||||
|
export MES_STACK
|
||||||
|
|
||||||
|
. ./config.sh
|
||||||
|
|
||||||
|
if $courageous; then
|
||||||
|
echo "Applying courage"
|
||||||
|
set +e
|
||||||
|
fi
|
||||||
|
|
||||||
|
CFLAGS=
|
||||||
|
if test $mes_libc = mes; then
|
||||||
|
CFLAGS="${CFLAGS}
|
||||||
|
-static
|
||||||
|
-nostdinc
|
||||||
|
-nostdlib
|
||||||
|
-fno-builtin
|
||||||
|
"
|
||||||
|
fi
|
||||||
|
|
||||||
|
CPPFLAGS="
|
||||||
|
-D HAVE_CONFIG_H=1
|
||||||
|
-I ../include
|
||||||
|
-I ${srcdir}/include
|
||||||
|
-I ${srcdir}/include/$mes_kernel/$mes_cpu
|
||||||
|
"
|
||||||
|
|
||||||
|
LIBS=
|
||||||
|
LDFLAGS=
|
||||||
|
if test $mes_libc = mes; then
|
||||||
|
LDFLAGS="
|
||||||
|
-nostdlib
|
||||||
|
"
|
||||||
|
LIBS=-lc
|
||||||
|
fi
|
||||||
|
|
||||||
|
export CFLAGS
|
||||||
|
export CPPFLAGS
|
||||||
|
export LDFLAGS
|
||||||
|
#export LIBS
|
||||||
|
|
||||||
|
recheck=${recheck-false}
|
||||||
|
export recheck
|
||||||
|
|
||||||
|
./pre-inst-env ${SHELL} ${srcdest}build-aux/check-boot.sh
|
||||||
|
./pre-inst-env ${SHELL} ${srcdest}build-aux/check-mes.sh
|
||||||
|
|
||||||
|
if test $compiler = gcc; then
|
||||||
|
(
|
||||||
|
cd gcc-lib
|
||||||
|
srcdest=$srcdir/../
|
||||||
|
srcdir=../$srcdir
|
||||||
|
../pre-inst-env ${SHELL} ${srcdest}build-aux/check-mescc.sh
|
||||||
|
)
|
||||||
|
fi
|
||||||
|
|
||||||
|
(
|
||||||
|
cd mescc-lib
|
||||||
|
srcdest=$srcdir/../
|
||||||
|
srcdir=../$srcdir
|
||||||
|
compiler=mescc
|
||||||
|
mes_lib=mes
|
||||||
|
CFLAGS="
|
||||||
|
-nostdinc
|
||||||
|
-nostdlib
|
||||||
|
-fno-builtin
|
||||||
|
"
|
||||||
|
LDFLAGS="
|
||||||
|
-nostdlib
|
||||||
|
"
|
||||||
|
LIBS=-lc
|
||||||
|
AR="${srcdest}pre-inst-env mesar"
|
||||||
|
CC="${srcdest}pre-inst-env mescc"
|
||||||
|
../pre-inst-env ${SHELL} ${srcdest}build-aux/check-mescc.sh
|
||||||
|
)
|
|
@ -0,0 +1,82 @@
|
||||||
|
# GNU Mes --- Maxwell Equations of Software
|
||||||
|
# Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
|
#
|
||||||
|
# This file is part of GNU Mes.
|
||||||
|
#
|
||||||
|
# GNU 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.
|
||||||
|
#
|
||||||
|
# GNU 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 GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
AR:=@AR@
|
||||||
|
BASH:=@BASH@
|
||||||
|
BLOOD_ELF:=@BLOOD_ELF@
|
||||||
|
CC:=@CC@
|
||||||
|
CFLAGS:=@CFLAGS@
|
||||||
|
CPPFLAGS:=@CPPFLAGS@
|
||||||
|
DIFF:=@DIFF@
|
||||||
|
DOT:=@DOT@
|
||||||
|
GIT:=@GIT@
|
||||||
|
GUILD:=@GUILD@
|
||||||
|
GUILE:=@GUILE@
|
||||||
|
GUILE_EFFECTIVE_VERSION:=@GUILE_EFFECTIVE_VERSION@
|
||||||
|
GUILE_LOAD_PATH:=@GUILE_LOAD_PATH@
|
||||||
|
GUIX:=@GUIX@
|
||||||
|
HELP2MAN:=@HELP2MAN@
|
||||||
|
HEX2:=@HEX2@
|
||||||
|
LDFLAGS:=@LDFLAGS@
|
||||||
|
MAKEINFO:=@MAKEINFO@
|
||||||
|
M1:=@M1@
|
||||||
|
MES_FOR_BUILD:=@MES_FOR_BUILD@
|
||||||
|
NYACC:=@NYACC@
|
||||||
|
PACKAGE:=@PACKAGE@
|
||||||
|
PACKAGE_NAME:=@PACKAGE_NAME@
|
||||||
|
PACKAGE_BUGREPORT:=@PACKAGE_BUGREPORT@
|
||||||
|
PERL:=@PERL@
|
||||||
|
SCHEME:=@SCHEME@
|
||||||
|
SHELL:=@SHELL@
|
||||||
|
VERSION:=@VERSION@
|
||||||
|
V:=@V@
|
||||||
|
colors:=@colors@
|
||||||
|
|
||||||
|
abs_top_builddir:=@abs_top_builddir@
|
||||||
|
abs_top_srcdir:=@abs_top_srcdir@
|
||||||
|
arch:=@arch@
|
||||||
|
build:=@build@
|
||||||
|
host:=@host@
|
||||||
|
|
||||||
|
bootstrap:=@bootstrap@
|
||||||
|
compiler:=@compiler@
|
||||||
|
courageous:=@courageous@
|
||||||
|
mes_system:=@mes_system@
|
||||||
|
mes_cpu:=@mes_cpu@
|
||||||
|
mes_bits:=@mes_bits@
|
||||||
|
mes_libc:=@mes_libc@
|
||||||
|
mes_kernel:=@mes_kernel@
|
||||||
|
|
||||||
|
prefix:=@prefix@
|
||||||
|
|
||||||
|
bindir:=@bindir@
|
||||||
|
datadir:=@datadir@
|
||||||
|
docdir:=@docdir@
|
||||||
|
guile_site_ccache_dir:=@guile_site_ccache_dir@
|
||||||
|
guile_site_dir:=@guile_site_dir@
|
||||||
|
includedir:=@includedir@
|
||||||
|
infodir:=@infodir@
|
||||||
|
libdir:=@libdir@
|
||||||
|
mandir:=@mandir@
|
||||||
|
moduledir:=@moduledir@
|
||||||
|
with_glibc_p:=@with_glibc_p@
|
||||||
|
program_prefix:=@program_prefix@
|
||||||
|
srcdest:=@srcdest@
|
||||||
|
srcdir:=@srcdir@
|
||||||
|
sysconfdir:=@sysconfdir@
|
||||||
|
top_builddir:=@top_builddir@
|
|
@ -0,0 +1,104 @@
|
||||||
|
# GNU Mes --- Maxwell Equations of Software
|
||||||
|
# Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
|
#
|
||||||
|
# This file is part of GNU Mes.
|
||||||
|
#
|
||||||
|
# GNU 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.
|
||||||
|
#
|
||||||
|
# GNU 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 GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
config_sh=1
|
||||||
|
AR=${AR-"@AR@"}
|
||||||
|
BASH="@BASH@"
|
||||||
|
BLOOD_ELF="@BLOOD_ELF@"
|
||||||
|
CC=${CC-"@CC@"}
|
||||||
|
CFLAGS=${CFLAGS-"@CFLAGS@"}
|
||||||
|
CPPFLAGS=${CPPFLAGS-"@CPPFLAGS@"}
|
||||||
|
DIFF=${DIFF-@DIFF@}
|
||||||
|
DOT="@DOT@"
|
||||||
|
GIT="@GIT@"
|
||||||
|
GUILD="@GUILD@"
|
||||||
|
GUILE="@GUILE@"
|
||||||
|
GUILE_EFFECTIVE_VERSION="@GUILE_EFFECTIVE_VERSION@"
|
||||||
|
GUILE_LOAD_PATH="@GUILE_LOAD_PATH@"
|
||||||
|
GUIX="@GUIX@"
|
||||||
|
HELP2MAN="@HELP2MAN@"
|
||||||
|
HEX2="@HEX2@"
|
||||||
|
LDFLAGS=${LDFLAGS-"@LDFLAGS@"}
|
||||||
|
MAKEINFO="@MAKEINFO@"
|
||||||
|
M1="@M1@"
|
||||||
|
MES_FOR_BUILD="@MES_FOR_BUILD@"
|
||||||
|
NYACC="@NYACC@"
|
||||||
|
PACKAGE="@PACKAGE@"
|
||||||
|
PACKAGE_NAME="@PACKAGE_NAME@"
|
||||||
|
PACKAGE_BUGREPORT="@PACKAGE_BUGREPORT@"
|
||||||
|
PERL="@PERL@"
|
||||||
|
#SCHEME="@SCHEME@"
|
||||||
|
SHELL="@SHELL@"
|
||||||
|
TINYCC_PREFIX="@TINYCC_PREFIX@"
|
||||||
|
VERSION="@VERSION@"
|
||||||
|
V=${V-"@V@"}
|
||||||
|
colors=${colors-@colors@}
|
||||||
|
|
||||||
|
abs_top_builddir="@abs_top_builddir@"
|
||||||
|
abs_top_srcdir="@abs_top_srcdir@"
|
||||||
|
arch="@arch@"
|
||||||
|
build="@build@"
|
||||||
|
host="@host@"
|
||||||
|
numbered_arch=${numbered_arch-"@numbered_arch@"}
|
||||||
|
|
||||||
|
bootstrap=${bootstrap-@bootstrap@}
|
||||||
|
compiler=${compiler-@compiler@}
|
||||||
|
courageous=${courageous-@courageous@}
|
||||||
|
mes_system=@mes_system@
|
||||||
|
mes_cpu=@mes_cpu@
|
||||||
|
mes_bits=@mes_bits@
|
||||||
|
mes_libc=@mes_libc@
|
||||||
|
mes_kernel=@mes_kernel@
|
||||||
|
|
||||||
|
prefix="@prefix@"
|
||||||
|
|
||||||
|
bindir="@bindir@"
|
||||||
|
datadir="@datadir@"
|
||||||
|
pkgdatadir="@pkgdatadir@"
|
||||||
|
docdir="@docdir@"
|
||||||
|
guile_site_ccache_dir="@guile_site_ccache_dir@"
|
||||||
|
guile_site_dir="@guile_site_dir@"
|
||||||
|
includedir="@includedir@"
|
||||||
|
infodir="@infodir@"
|
||||||
|
libdir="@libdir@"
|
||||||
|
mandir="@mandir@"
|
||||||
|
moduledir="@moduledir@"
|
||||||
|
with_glibc_p="@with_glibc_p@"
|
||||||
|
program_prefix="@program_prefix@"
|
||||||
|
srcdest=${srcdest-"@srcdest@"}
|
||||||
|
srcdir=${srcdir-"@srcdir@"}
|
||||||
|
sysconfdir="@sysconfdir@"
|
||||||
|
top_builddir="@top_builddir@"
|
||||||
|
|
||||||
|
MES_PREFIX=${MES_PREFIX-$abs_top_srcdir}
|
||||||
|
|
||||||
|
export PACKAGE
|
||||||
|
export PACKAGE_NAME
|
||||||
|
export PACKAGE_BUGREPORT
|
||||||
|
export AR
|
||||||
|
export CC
|
||||||
|
export DIFF
|
||||||
|
export SHELL
|
||||||
|
export V
|
||||||
|
export colors
|
||||||
|
export compiler
|
||||||
|
export courageous
|
||||||
|
export srcdest
|
||||||
|
export srcdir
|
||||||
|
export GUILE_AUTO_COMPILE
|
||||||
|
export MES_PREFIX
|
|
@ -0,0 +1,422 @@
|
||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
# GNU Mes --- Maxwell Equations of Software
|
||||||
|
# Copyright © 2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
|
#
|
||||||
|
# This file is part of GNU Mes.
|
||||||
|
#
|
||||||
|
# GNU 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.
|
||||||
|
#
|
||||||
|
# GNU 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 GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
set -e
|
||||||
|
set -u
|
||||||
|
|
||||||
|
V=${V-1}
|
||||||
|
|
||||||
|
if [ "$V" = 2 ]; then
|
||||||
|
set -x
|
||||||
|
fi
|
||||||
|
|
||||||
|
. ./config.sh
|
||||||
|
|
||||||
|
libc_mini_shared_SOURCES="
|
||||||
|
lib/mes/eputs.c
|
||||||
|
lib/mes/oputs.c
|
||||||
|
"
|
||||||
|
|
||||||
|
if test $mes_libc = mes; then
|
||||||
|
libc_mini_shared_SOURCES="$libc_mini_shared_SOURCES
|
||||||
|
lib/$mes_kernel/$mes_cpu-mes-$compiler/mini.c
|
||||||
|
lib/stdlib/exit.c
|
||||||
|
lib/stdlib/puts.c
|
||||||
|
lib/string/strlen.c
|
||||||
|
"
|
||||||
|
|
||||||
|
if test $mes_kernel = gnu; then
|
||||||
|
libc_mini_shared_SOURCES="$libc_mini_shared_SOURCES
|
||||||
|
lib/gnu/_exit.c
|
||||||
|
lib/gnu/exec-startup-get-data.c
|
||||||
|
lib/gnu/fd-get.c
|
||||||
|
lib/gnu/fd-write.c
|
||||||
|
lib/gnu/io-write.c
|
||||||
|
lib/gnu/_write.c
|
||||||
|
lib/gnu/hurd-start.c
|
||||||
|
lib/gnu/proc-mark-exit.c
|
||||||
|
lib/gnu/syscall.c
|
||||||
|
lib/gnu/task-get-special-port.c
|
||||||
|
lib/gnu/task-terminate.c
|
||||||
|
lib/gnu/vm-statistics.c
|
||||||
|
lib/mach/mach-init.c
|
||||||
|
lib/mach/mach_host_self.S
|
||||||
|
lib/mach/mach_msg_trap.S
|
||||||
|
lib/mach/mach_reply_port.S
|
||||||
|
lib/mach/mach_task_self.S
|
||||||
|
lib/mach/mach_thread_self.S
|
||||||
|
lib/mach/msg.c
|
||||||
|
lib/string/argz-extract.c
|
||||||
|
"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
libc_mini_SOURCES="$libc_mini_shared_SOURCES"
|
||||||
|
|
||||||
|
if test $mes_libc = mes; then
|
||||||
|
libc_mini_SOURCES="$libc_mini_SOURCES
|
||||||
|
lib/mes/mini-write.c
|
||||||
|
"
|
||||||
|
fi
|
||||||
|
|
||||||
|
libmes_SOURCES="
|
||||||
|
$libc_mini_shared_SOURCES
|
||||||
|
lib/ctype/isnumber.c
|
||||||
|
lib/mes/abtol.c
|
||||||
|
lib/mes/div.c
|
||||||
|
lib/mes/eputc.c
|
||||||
|
lib/mes/fdgetc.c
|
||||||
|
lib/mes/fdputc.c
|
||||||
|
lib/mes/fdputs.c
|
||||||
|
lib/mes/fdungetc.c
|
||||||
|
lib/mes/itoa.c
|
||||||
|
lib/mes/ltoa.c
|
||||||
|
lib/mes/ltoab.c
|
||||||
|
lib/mes/mes_open.c
|
||||||
|
lib/mes/ntoab.c
|
||||||
|
lib/mes/oputc.c
|
||||||
|
lib/mes/ultoa.c
|
||||||
|
lib/mes/utoa.c
|
||||||
|
"
|
||||||
|
|
||||||
|
if test $mes_libc = mes; then
|
||||||
|
libmes_SOURCES="$libmes_SOURCES
|
||||||
|
lib/ctype/isdigit.c
|
||||||
|
lib/ctype/isspace.c
|
||||||
|
lib/ctype/isxdigit.c
|
||||||
|
lib/posix/write.c
|
||||||
|
lib/stdlib/atoi.c
|
||||||
|
"
|
||||||
|
if test $mes_kernel = gnu; then
|
||||||
|
libmes_SOURCES="$libmes_SOURCES
|
||||||
|
lib/stub/lseek.c
|
||||||
|
"
|
||||||
|
fi
|
||||||
|
if test $mes_kernel = linux; then
|
||||||
|
libmes_SOURCES="$libmes_SOURCES
|
||||||
|
lib/linux/lseek.c
|
||||||
|
"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
libmes_SOURCES="$libmes_SOURCES
|
||||||
|
lib/mes/abtod.c
|
||||||
|
lib/mes/dtoab.c
|
||||||
|
"
|
||||||
|
fi
|
||||||
|
|
||||||
|
libc_SOURCES="
|
||||||
|
$libmes_SOURCES
|
||||||
|
lib/mes/__assert_fail.c
|
||||||
|
lib/mes/__buffered_read.c
|
||||||
|
lib/mes/__mes_debug.c
|
||||||
|
lib/posix/execv.c
|
||||||
|
lib/posix/getcwd.c
|
||||||
|
lib/posix/getenv.c
|
||||||
|
lib/posix/isatty.c
|
||||||
|
lib/posix/open.c
|
||||||
|
lib/posix/buffered-read.c
|
||||||
|
lib/posix/setenv.c
|
||||||
|
lib/posix/wait.c
|
||||||
|
lib/stdio/fgetc.c
|
||||||
|
lib/stdio/fputc.c
|
||||||
|
lib/stdio/fputs.c
|
||||||
|
lib/stdio/getc.c
|
||||||
|
lib/stdio/getchar.c
|
||||||
|
lib/stdio/putc.c
|
||||||
|
lib/stdio/putchar.c
|
||||||
|
lib/stdio/ungetc.c
|
||||||
|
lib/stdlib/free.c
|
||||||
|
lib/stdlib/malloc.c
|
||||||
|
lib/stdlib/realloc.c
|
||||||
|
lib/string/memchr.c
|
||||||
|
lib/string/memcmp.c
|
||||||
|
lib/string/memcpy.c
|
||||||
|
lib/string/memmove.c
|
||||||
|
lib/string/memset.c
|
||||||
|
lib/string/strcmp.c
|
||||||
|
lib/string/strcpy.c
|
||||||
|
lib/string/strncmp.c
|
||||||
|
"
|
||||||
|
|
||||||
|
if test $mes_kernel = gnu; then
|
||||||
|
libc_SOURCES="$libc_SOURCES
|
||||||
|
lib/gnu/_open3.c
|
||||||
|
lib/gnu/_read.c
|
||||||
|
lib/gnu/dir-lookup.c
|
||||||
|
lib/gnu/fd-read.c
|
||||||
|
lib/gnu/io-read.c
|
||||||
|
lib/gnu/malloc.c
|
||||||
|
lib/gnu/vm-allocate.c
|
||||||
|
lib/stub/access.c
|
||||||
|
lib/stub/brk.c
|
||||||
|
lib/stub/chmod.c
|
||||||
|
lib/stub/clock_gettime.c
|
||||||
|
lib/stub/dup2.c
|
||||||
|
lib/stub/dup.c
|
||||||
|
lib/stub/execve.c
|
||||||
|
lib/stub/fork.c
|
||||||
|
lib/stub/_getcwd.c
|
||||||
|
lib/stub/gettimeofday.c
|
||||||
|
lib/stub/ioctl.c
|
||||||
|
lib/stub/time.c
|
||||||
|
lib/stub/unlink.c
|
||||||
|
lib/stub/waitpid.c
|
||||||
|
"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test $mes_kernel = linux; then
|
||||||
|
libc_SOURCES="$libc_SOURCES
|
||||||
|
lib/linux/access.c
|
||||||
|
lib/linux/brk.c
|
||||||
|
lib/linux/chmod.c
|
||||||
|
lib/linux/clock_gettime.c
|
||||||
|
lib/linux/dup.c
|
||||||
|
lib/linux/dup2.c
|
||||||
|
lib/linux/execve.c
|
||||||
|
lib/linux/fork.c
|
||||||
|
lib/linux/fsync.c
|
||||||
|
lib/linux/_getcwd.c
|
||||||
|
lib/linux/gettimeofday.c
|
||||||
|
lib/linux/ioctl.c
|
||||||
|
lib/linux/_open3.c
|
||||||
|
lib/linux/_read.c
|
||||||
|
lib/linux/time.c
|
||||||
|
lib/linux/unlink.c
|
||||||
|
lib/linux/waitpid.c
|
||||||
|
lib/linux/$mes_cpu-mes-$compiler/syscall.c
|
||||||
|
"
|
||||||
|
fi
|
||||||
|
|
||||||
|
libtcc1_SOURCES="
|
||||||
|
lib/libtcc1.c
|
||||||
|
"
|
||||||
|
|
||||||
|
libc_tcc_SOURCES="
|
||||||
|
$libc_SOURCES
|
||||||
|
lib/ctype/islower.c
|
||||||
|
lib/ctype/isupper.c
|
||||||
|
lib/ctype/tolower.c
|
||||||
|
lib/ctype/toupper.c
|
||||||
|
lib/mes/abtod.c
|
||||||
|
lib/mes/dtoab.c
|
||||||
|
lib/mes/search-path.c
|
||||||
|
lib/posix/execvp.c
|
||||||
|
lib/stdio/fclose.c
|
||||||
|
lib/stdio/fdopen.c
|
||||||
|
lib/stdio/ferror.c
|
||||||
|
lib/stdio/fflush.c
|
||||||
|
lib/stdio/fopen.c
|
||||||
|
lib/stdio/fprintf.c
|
||||||
|
lib/stdio/fread.c
|
||||||
|
lib/stdio/fseek.c
|
||||||
|
lib/stdio/ftell.c
|
||||||
|
lib/stdio/fwrite.c
|
||||||
|
lib/stdio/printf.c
|
||||||
|
lib/stdio/remove.c
|
||||||
|
lib/stdio/snprintf.c
|
||||||
|
lib/stdio/sprintf.c
|
||||||
|
lib/stdio/sscanf.c
|
||||||
|
lib/stdio/vfprintf.c
|
||||||
|
lib/stdio/vprintf.c
|
||||||
|
lib/stdio/vsnprintf.c
|
||||||
|
lib/stdio/vsprintf.c
|
||||||
|
lib/stdio/vsscanf.c
|
||||||
|
lib/stdlib/calloc.c
|
||||||
|
lib/stdlib/qsort.c
|
||||||
|
lib/stdlib/strtod.c
|
||||||
|
lib/stdlib/strtof.c
|
||||||
|
lib/stdlib/strtol.c
|
||||||
|
lib/stdlib/strtold.c
|
||||||
|
lib/stdlib/strtoll.c
|
||||||
|
lib/stdlib/strtoul.c
|
||||||
|
lib/stdlib/strtoull.c
|
||||||
|
lib/string/memmem.c
|
||||||
|
lib/string/strcat.c
|
||||||
|
lib/string/strchr.c
|
||||||
|
lib/string/strlwr.c
|
||||||
|
lib/string/strncpy.c
|
||||||
|
lib/string/strrchr.c
|
||||||
|
lib/string/strstr.c
|
||||||
|
lib/string/strupr.c
|
||||||
|
lib/stub/sigaction.c
|
||||||
|
lib/stub/ldexp.c
|
||||||
|
lib/stub/mprotect.c
|
||||||
|
lib/stub/localtime.c
|
||||||
|
lib/stub/sigemptyset.c
|
||||||
|
lib/$mes_cpu-mes-$compiler/setjmp.c
|
||||||
|
"
|
||||||
|
|
||||||
|
if test $mes_kernel = linux; then
|
||||||
|
libc_tcc_SOURCES="$libc_tcc_SOURCES
|
||||||
|
lib/linux/close.c
|
||||||
|
lib/linux/rmdir.c
|
||||||
|
lib/linux/stat.c
|
||||||
|
"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test $mes_kernel = gnu; then
|
||||||
|
libc_tcc_SOURCES="$libc_tcc_SOURCES
|
||||||
|
lib/stub/close.c
|
||||||
|
lib/stub/rmdir.c
|
||||||
|
lib/stub/stat.c
|
||||||
|
"
|
||||||
|
fi
|
||||||
|
|
||||||
|
libc_gnu_SOURCES="
|
||||||
|
$libc_tcc_SOURCES
|
||||||
|
lib/ctype/isalnum.c
|
||||||
|
lib/ctype/isalpha.c
|
||||||
|
lib/ctype/isascii.c
|
||||||
|
lib/ctype/iscntrl.c
|
||||||
|
lib/ctype/isgraph.c
|
||||||
|
lib/ctype/isprint.c
|
||||||
|
lib/ctype/ispunct.c
|
||||||
|
lib/dirent/__getdirentries.c
|
||||||
|
lib/dirent/closedir.c
|
||||||
|
lib/dirent/opendir.c
|
||||||
|
lib/dirent/readdir.c
|
||||||
|
lib/math/ceil.c
|
||||||
|
lib/math/fabs.c
|
||||||
|
lib/math/floor.c
|
||||||
|
lib/mes/fdgets.c
|
||||||
|
lib/posix/alarm.c
|
||||||
|
lib/posix/execl.c
|
||||||
|
lib/posix/execlp.c
|
||||||
|
lib/posix/mktemp.c
|
||||||
|
lib/posix/raise.c
|
||||||
|
lib/posix/sbrk.c
|
||||||
|
lib/posix/sleep.c
|
||||||
|
lib/posix/unsetenv.c
|
||||||
|
lib/stdio/clearerr.c
|
||||||
|
lib/stdio/feof.c
|
||||||
|
lib/stdio/fgets.c
|
||||||
|
lib/stdio/fileno.c
|
||||||
|
lib/stdio/freopen.c
|
||||||
|
lib/stdio/fscanf.c
|
||||||
|
lib/stdio/perror.c
|
||||||
|
lib/stdio/vfscanf.c
|
||||||
|
lib/stdlib/__exit.c
|
||||||
|
lib/stdlib/abort.c
|
||||||
|
lib/stdlib/abs.c
|
||||||
|
lib/stdlib/alloca.c
|
||||||
|
lib/stdlib/atexit.c
|
||||||
|
lib/stdlib/atof.c
|
||||||
|
lib/stdlib/atol.c
|
||||||
|
lib/stdlib/mbstowcs.c
|
||||||
|
lib/string/bcmp.c
|
||||||
|
lib/string/bcopy.c
|
||||||
|
lib/string/bzero.c
|
||||||
|
lib/string/index.c
|
||||||
|
lib/string/rindex.c
|
||||||
|
lib/string/strcspn.c
|
||||||
|
lib/string/strdup.c
|
||||||
|
lib/string/strerror.c
|
||||||
|
lib/string/strncat.c
|
||||||
|
lib/string/strpbrk.c
|
||||||
|
lib/string/strspn.c
|
||||||
|
lib/stub/__cleanup.c
|
||||||
|
lib/stub/atan2.c
|
||||||
|
lib/stub/bsearch.c
|
||||||
|
lib/stub/chown.c
|
||||||
|
lib/stub/cos.c
|
||||||
|
lib/stub/ctime.c
|
||||||
|
lib/stub/exp.c
|
||||||
|
lib/stub/fpurge.c
|
||||||
|
lib/stub/freadahead.c
|
||||||
|
lib/stub/frexp.c
|
||||||
|
lib/stub/getgrgid.c
|
||||||
|
lib/stub/getgrnam.c
|
||||||
|
lib/stub/getlogin.c
|
||||||
|
lib/stub/getpgid.c
|
||||||
|
lib/stub/getpgrp.c
|
||||||
|
lib/stub/getpwnam.c
|
||||||
|
lib/stub/getpwuid.c
|
||||||
|
lib/stub/gmtime.c
|
||||||
|
lib/stub/log.c
|
||||||
|
lib/stub/mktime.c
|
||||||
|
lib/stub/modf.c
|
||||||
|
lib/stub/pclose.c
|
||||||
|
lib/stub/popen.c
|
||||||
|
lib/stub/pow.c
|
||||||
|
lib/stub/rand.c
|
||||||
|
lib/stub/rewind.c
|
||||||
|
lib/stub/setbuf.c
|
||||||
|
lib/stub/setgrent.c
|
||||||
|
lib/stub/setlocale.c
|
||||||
|
lib/stub/setvbuf.c
|
||||||
|
lib/stub/sigaddset.c
|
||||||
|
lib/stub/sigblock.c
|
||||||
|
lib/stub/sigdelset.c
|
||||||
|
lib/stub/sigsetmask.c
|
||||||
|
lib/stub/sin.c
|
||||||
|
lib/stub/sqrt.c
|
||||||
|
lib/stub/strftime.c
|
||||||
|
lib/stub/sys_siglist.c
|
||||||
|
lib/stub/system.c
|
||||||
|
lib/stub/times.c
|
||||||
|
lib/stub/ttyname.c
|
||||||
|
lib/stub/umask.c
|
||||||
|
lib/stub/utime.c
|
||||||
|
"
|
||||||
|
|
||||||
|
if test $mes_kernel = linux; then
|
||||||
|
libc_gnu_SOURCES="$libc_gnu_SOURCES
|
||||||
|
lib/linux/chdir.c
|
||||||
|
lib/linux/fcntl.c
|
||||||
|
lib/linux/fstat.c
|
||||||
|
lib/linux/getdents.c
|
||||||
|
lib/linux/getegid.c
|
||||||
|
lib/linux/geteuid.c
|
||||||
|
lib/linux/getgid.c
|
||||||
|
lib/linux/getpid.c
|
||||||
|
lib/linux/getppid.c
|
||||||
|
lib/linux/getrusage.c
|
||||||
|
lib/linux/getuid.c
|
||||||
|
lib/linux/kill.c
|
||||||
|
lib/linux/link.c
|
||||||
|
lib/linux/lstat.c
|
||||||
|
lib/linux/mkdir.c
|
||||||
|
lib/linux/mknod.c
|
||||||
|
lib/linux/nanosleep.c
|
||||||
|
lib/linux/pipe.c
|
||||||
|
lib/linux/readlink.c
|
||||||
|
lib/linux/rename.c
|
||||||
|
lib/linux/setgid.c
|
||||||
|
lib/linux/settimer.c
|
||||||
|
lib/linux/setuid.c
|
||||||
|
lib/linux/signal.c
|
||||||
|
lib/linux/sigprogmask.c
|
||||||
|
lib/linux/symlink.c
|
||||||
|
"
|
||||||
|
fi
|
||||||
|
|
||||||
|
mes_SOURCES="
|
||||||
|
src/gc.c
|
||||||
|
src/hash.c
|
||||||
|
src/lib.c
|
||||||
|
src/math.c
|
||||||
|
src/mes.c
|
||||||
|
src/module.c
|
||||||
|
src/posix.c
|
||||||
|
src/reader.c
|
||||||
|
src/string.c
|
||||||
|
src/struct.c
|
||||||
|
src/vector.c
|
||||||
|
"
|
|
@ -0,0 +1,160 @@
|
||||||
|
# GNU Mes --- Maxwell Equations of Software
|
||||||
|
# Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
|
#
|
||||||
|
# This file is part of GNU Mes.
|
||||||
|
#
|
||||||
|
# GNU 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.
|
||||||
|
#
|
||||||
|
# GNU 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 GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
export PACKAGE
|
||||||
|
export PACKAGE_NAME
|
||||||
|
export PACKAGE_BUGREPORT
|
||||||
|
export VERSION
|
||||||
|
|
||||||
|
export abs_top_builddir
|
||||||
|
export abs_top_srcdir
|
||||||
|
export top_builddir
|
||||||
|
export config.make
|
||||||
|
export srcdest
|
||||||
|
export srcdir
|
||||||
|
|
||||||
|
export prefix
|
||||||
|
|
||||||
|
export datadir
|
||||||
|
export docdir
|
||||||
|
|
||||||
|
export bindir
|
||||||
|
export guile_site_ccache_dir
|
||||||
|
export guile_site_dir
|
||||||
|
export infodir
|
||||||
|
export libdir
|
||||||
|
export mandir
|
||||||
|
export moduledir
|
||||||
|
export sysconfdir
|
||||||
|
|
||||||
|
export bootstrap
|
||||||
|
export compiler
|
||||||
|
export courageous
|
||||||
|
export mes_system
|
||||||
|
export mes_cpu
|
||||||
|
export mes_bits
|
||||||
|
export mes_libc
|
||||||
|
export mes_kernel
|
||||||
|
|
||||||
|
ifdef V
|
||||||
|
export V
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifdef DESTDIR
|
||||||
|
export DESTDIR
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifdef CC
|
||||||
|
export CC
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifdef BLOOD_ELF
|
||||||
|
export BLOOD_ELF
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifdef DOT
|
||||||
|
export DOT
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifdef M1
|
||||||
|
export M1
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifdef MES
|
||||||
|
export MES
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifdef MES_FOR_BUILD
|
||||||
|
export MES_FOR_BUILD
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifdef MESCC
|
||||||
|
export MESCC
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifdef HEX2
|
||||||
|
export HEX2
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifdef HELP2MAN
|
||||||
|
export HELP2MAN
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifdef GUILE
|
||||||
|
export GUILE
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifdef GUILD
|
||||||
|
export GUILD
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifdef GUIX
|
||||||
|
export GUIX
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifdef PERL
|
||||||
|
export PERL
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifdef SCHEME
|
||||||
|
export SCHEME
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifdef SHELL
|
||||||
|
export SHELL
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifdef GUILE_LOAD_PATH
|
||||||
|
export GUILE_LOAD_PATH
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifdef GUILE_LOAD_COMPILED_PATH
|
||||||
|
export GUILE_LOAD_COMPILED_PATH
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifdef AM_CFLAGS
|
||||||
|
export AM_CFLAGS
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifdef AM_CPPFLAGS
|
||||||
|
export AM_CPPFLAGS
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifdef AM_LDFLAGS
|
||||||
|
export AM_LDFLAGS
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifdef CFLAGS
|
||||||
|
export CFLAGS
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifdef CPPFLAGS
|
||||||
|
export CPPFLAGS
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifdef LDFLAGS
|
||||||
|
export LDFLAGS
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifdef HEX2FLAGS
|
||||||
|
export HEX2FLAGS
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifdef M1FLAGS
|
||||||
|
export M1FLAGS
|
||||||
|
endif
|
|
@ -0,0 +1,510 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
# gendocs.sh -- generate a GNU manual in many formats. This script is
|
||||||
|
# mentioned in maintain.texi. See the help message below for usage details.
|
||||||
|
|
||||||
|
scriptversion=2018-03-06.19
|
||||||
|
|
||||||
|
# Copyright 2003-2018 Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# This program 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.
|
||||||
|
#
|
||||||
|
# This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
# Original author: Mohit Agarwal.
|
||||||
|
# Send bug reports and any other correspondence to bug-gnulib@gnu.org.
|
||||||
|
#
|
||||||
|
# The latest version of this script, and the companion template, is
|
||||||
|
# available from the Gnulib repository:
|
||||||
|
#
|
||||||
|
# https://git.savannah.gnu.org/cgit/gnulib.git/tree/build-aux/gendocs.sh
|
||||||
|
# https://git.savannah.gnu.org/cgit/gnulib.git/tree/doc/gendocs_template
|
||||||
|
|
||||||
|
# TODO:
|
||||||
|
# - image importing was only implemented for HTML generated by
|
||||||
|
# makeinfo. But it should be simple enough to adjust.
|
||||||
|
# - images are not imported in the source tarball. All the needed
|
||||||
|
# formats (PDF, PNG, etc.) should be included.
|
||||||
|
|
||||||
|
prog=`basename "$0"`
|
||||||
|
srcdir=`pwd`
|
||||||
|
|
||||||
|
scripturl="https://git.savannah.gnu.org/cgit/gnulib.git/plain/build-aux/gendocs.sh"
|
||||||
|
templateurl="https://git.savannah.gnu.org/cgit/gnulib.git/plain/doc/gendocs_template"
|
||||||
|
|
||||||
|
: ${SETLANG="env LANG= LC_MESSAGES= LC_ALL= LANGUAGE="}
|
||||||
|
: ${MAKEINFO="makeinfo"}
|
||||||
|
: ${TEXI2DVI="texi2dvi"}
|
||||||
|
: ${DOCBOOK2HTML="docbook2html"}
|
||||||
|
: ${DOCBOOK2PDF="docbook2pdf"}
|
||||||
|
: ${DOCBOOK2TXT="docbook2txt"}
|
||||||
|
: ${GENDOCS_TEMPLATE_DIR="."}
|
||||||
|
: ${PERL='perl'}
|
||||||
|
: ${TEXI2HTML="texi2html"}
|
||||||
|
unset CDPATH
|
||||||
|
unset use_texi2html
|
||||||
|
|
||||||
|
MANUAL_TITLE=
|
||||||
|
PACKAGE=
|
||||||
|
EMAIL=webmasters@gnu.org # please override with --email
|
||||||
|
commonarg= # passed to all makeinfo/texi2html invcations.
|
||||||
|
dirargs= # passed to all tools (-I dir).
|
||||||
|
dirs= # -I directories.
|
||||||
|
htmlarg="--css-ref=/software/gnulib/manual.css -c TOP_NODE_UP_URL=/manual"
|
||||||
|
default_htmlarg=true
|
||||||
|
infoarg=--no-split
|
||||||
|
generate_ascii=true
|
||||||
|
generate_html=true
|
||||||
|
generate_info=true
|
||||||
|
generate_tex=true
|
||||||
|
outdir=manual
|
||||||
|
source_extra=
|
||||||
|
split=node
|
||||||
|
srcfile=
|
||||||
|
texarg="-t @finalout"
|
||||||
|
|
||||||
|
version="gendocs.sh $scriptversion
|
||||||
|
|
||||||
|
Copyright 2018 Free Software Foundation, Inc.
|
||||||
|
There is NO warranty. You may redistribute this software
|
||||||
|
under the terms of the GNU General Public License.
|
||||||
|
For more information about these matters, see the files named COPYING."
|
||||||
|
|
||||||
|
usage="Usage: $prog [OPTION]... PACKAGE MANUAL-TITLE
|
||||||
|
|
||||||
|
Generate output in various formats from PACKAGE.texinfo (or .texi or
|
||||||
|
.txi) source. See the GNU Maintainers document for a more extensive
|
||||||
|
discussion:
|
||||||
|
https://www.gnu.org/prep/maintain_toc.html
|
||||||
|
|
||||||
|
Options:
|
||||||
|
--email ADR use ADR as contact in generated web pages; always give this.
|
||||||
|
|
||||||
|
-s SRCFILE read Texinfo from SRCFILE, instead of PACKAGE.{texinfo|texi|txi}
|
||||||
|
-o OUTDIR write files into OUTDIR, instead of manual/.
|
||||||
|
-I DIR append DIR to the Texinfo search path.
|
||||||
|
--common ARG pass ARG in all invocations.
|
||||||
|
--html ARG pass ARG to makeinfo or texi2html for HTML targets,
|
||||||
|
instead of '$htmlarg'.
|
||||||
|
--info ARG pass ARG to makeinfo for Info, instead of --no-split.
|
||||||
|
--no-ascii skip generating the plain text output.
|
||||||
|
--no-html skip generating the html output.
|
||||||
|
--no-info skip generating the info output.
|
||||||
|
--no-tex skip generating the dvi and pdf output.
|
||||||
|
--source ARG include ARG in tar archive of sources.
|
||||||
|
--split HOW make split HTML by node, section, chapter; default node.
|
||||||
|
--tex ARG pass ARG to texi2dvi for DVI and PDF, instead of -t @finalout.
|
||||||
|
|
||||||
|
--texi2html use texi2html to make HTML target, with all split versions.
|
||||||
|
--docbook convert through DocBook too (xml, txt, html, pdf).
|
||||||
|
|
||||||
|
--help display this help and exit successfully.
|
||||||
|
--version display version information and exit successfully.
|
||||||
|
|
||||||
|
Simple example: $prog --email bug-gnu-emacs@gnu.org emacs \"GNU Emacs Manual\"
|
||||||
|
|
||||||
|
Typical sequence:
|
||||||
|
cd PACKAGESOURCE/doc
|
||||||
|
wget \"$scripturl\"
|
||||||
|
wget \"$templateurl\"
|
||||||
|
$prog --email BUGLIST MANUAL \"GNU MANUAL - One-line description\"
|
||||||
|
|
||||||
|
Output will be in a new subdirectory \"manual\" (by default;
|
||||||
|
use -o OUTDIR to override). Move all the new files into your web CVS
|
||||||
|
tree, as explained in the Web Pages node of maintain.texi.
|
||||||
|
|
||||||
|
Please use the --email ADDRESS option so your own bug-reporting
|
||||||
|
address will be used in the generated HTML pages.
|
||||||
|
|
||||||
|
MANUAL-TITLE is included as part of the HTML <title> of the overall
|
||||||
|
manual/index.html file. It should include the name of the package being
|
||||||
|
documented. manual/index.html is created by substitution from the file
|
||||||
|
$GENDOCS_TEMPLATE_DIR/gendocs_template. (Feel free to modify the
|
||||||
|
generic template for your own purposes.)
|
||||||
|
|
||||||
|
If you have several manuals, you'll need to run this script several
|
||||||
|
times with different MANUAL values, specifying a different output
|
||||||
|
directory with -o each time. Then write (by hand) an overall index.html
|
||||||
|
with links to them all.
|
||||||
|
|
||||||
|
If a manual's Texinfo sources are spread across several directories,
|
||||||
|
first copy or symlink all Texinfo sources into a single directory.
|
||||||
|
(Part of the script's work is to make a tar.gz of the sources.)
|
||||||
|
|
||||||
|
As implied above, by default monolithic Info files are generated.
|
||||||
|
If you want split Info, or other Info options, use --info to override.
|
||||||
|
|
||||||
|
You can set the environment variables MAKEINFO, TEXI2DVI, TEXI2HTML,
|
||||||
|
and PERL to control the programs that get executed, and
|
||||||
|
GENDOCS_TEMPLATE_DIR to control where the gendocs_template file is
|
||||||
|
looked for. With --docbook, the environment variables DOCBOOK2HTML,
|
||||||
|
DOCBOOK2PDF, and DOCBOOK2TXT are also consulted.
|
||||||
|
|
||||||
|
By default, makeinfo and texi2dvi are run in the default (English)
|
||||||
|
locale, since that's the language of most Texinfo manuals. If you
|
||||||
|
happen to have a non-English manual and non-English web site, see the
|
||||||
|
SETLANG setting in the source.
|
||||||
|
|
||||||
|
Email bug reports or enhancement requests to bug-gnulib@gnu.org.
|
||||||
|
"
|
||||||
|
|
||||||
|
while test $# -gt 0; do
|
||||||
|
case $1 in
|
||||||
|
-s) shift; srcfile=$1;;
|
||||||
|
-o) shift; outdir=$1;;
|
||||||
|
-I) shift; dirargs="$dirargs -I '$1'"; dirs="$dirs $1";;
|
||||||
|
--common) shift; commonarg=$1;;
|
||||||
|
--docbook) docbook=yes;;
|
||||||
|
--email) shift; EMAIL=$1;;
|
||||||
|
--html) shift; default_htmlarg=false; htmlarg=$1;;
|
||||||
|
--info) shift; infoarg=$1;;
|
||||||
|
--no-ascii) generate_ascii=false;;
|
||||||
|
--no-html) generate_ascii=false;;
|
||||||
|
--no-info) generate_info=false;;
|
||||||
|
--no-tex) generate_tex=false;;
|
||||||
|
--source) shift; source_extra=$1;;
|
||||||
|
--split) shift; split=$1;;
|
||||||
|
--tex) shift; texarg=$1;;
|
||||||
|
--texi2html) use_texi2html=1;;
|
||||||
|
|
||||||
|
--help) echo "$usage"; exit 0;;
|
||||||
|
--version) echo "$version"; exit 0;;
|
||||||
|
-*)
|
||||||
|
echo "$0: Unknown option \`$1'." >&2
|
||||||
|
echo "$0: Try \`--help' for more information." >&2
|
||||||
|
exit 1;;
|
||||||
|
*)
|
||||||
|
if test -z "$PACKAGE"; then
|
||||||
|
PACKAGE=$1
|
||||||
|
elif test -z "$MANUAL_TITLE"; then
|
||||||
|
MANUAL_TITLE=$1
|
||||||
|
else
|
||||||
|
echo "$0: extra non-option argument \`$1'." >&2
|
||||||
|
exit 1
|
||||||
|
fi;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
# makeinfo uses the dirargs, but texi2dvi doesn't.
|
||||||
|
commonarg=" $dirargs $commonarg"
|
||||||
|
|
||||||
|
# For most of the following, the base name is just $PACKAGE
|
||||||
|
base=$PACKAGE
|
||||||
|
|
||||||
|
if $default_htmlarg && test -n "$use_texi2html"; then
|
||||||
|
# The legacy texi2html doesn't support TOP_NODE_UP_URL
|
||||||
|
htmlarg="--css-ref=/software/gnulib/manual.css"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -n "$srcfile"; then
|
||||||
|
# but here, we use the basename of $srcfile
|
||||||
|
base=`basename "$srcfile"`
|
||||||
|
case $base in
|
||||||
|
*.txi|*.texi|*.texinfo) base=`echo "$base"|sed 's/\.[texinfo]*$//'`;;
|
||||||
|
esac
|
||||||
|
PACKAGE=$base
|
||||||
|
elif test -s "$srcdir/$PACKAGE.texinfo"; then
|
||||||
|
srcfile=$srcdir/$PACKAGE.texinfo
|
||||||
|
elif test -s "$srcdir/$PACKAGE.texi"; then
|
||||||
|
srcfile=$srcdir/$PACKAGE.texi
|
||||||
|
elif test -s "$srcdir/$PACKAGE.txi"; then
|
||||||
|
srcfile=$srcdir/$PACKAGE.txi
|
||||||
|
else
|
||||||
|
echo "$0: cannot find .texinfo or .texi or .txi for $PACKAGE in $srcdir." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test ! -r $GENDOCS_TEMPLATE_DIR/gendocs_template; then
|
||||||
|
echo "$0: cannot read $GENDOCS_TEMPLATE_DIR/gendocs_template." >&2
|
||||||
|
echo "$0: it is available from $templateurl." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Function to return size of $1 in something resembling kilobytes.
|
||||||
|
calcsize()
|
||||||
|
{
|
||||||
|
size=`ls -ksl $1 | awk '{print $1}'`
|
||||||
|
echo $size
|
||||||
|
}
|
||||||
|
|
||||||
|
# copy_images OUTDIR HTML-FILE...
|
||||||
|
# -------------------------------
|
||||||
|
# Copy all the images needed by the HTML-FILEs into OUTDIR.
|
||||||
|
# Look for them in . and the -I directories; this is simpler than what
|
||||||
|
# makeinfo supports with -I, but hopefully it will suffice.
|
||||||
|
copy_images()
|
||||||
|
{
|
||||||
|
local odir
|
||||||
|
odir=$1
|
||||||
|
shift
|
||||||
|
$PERL -n -e "
|
||||||
|
BEGIN {
|
||||||
|
\$me = '$prog';
|
||||||
|
\$odir = '$odir';
|
||||||
|
@dirs = qw(. $dirs);
|
||||||
|
}
|
||||||
|
" -e '
|
||||||
|
/<img src="(.*?)"/g && ++$need{$1};
|
||||||
|
|
||||||
|
END {
|
||||||
|
#print "$me: @{[keys %need]}\n"; # for debugging, show images found.
|
||||||
|
FILE: for my $f (keys %need) {
|
||||||
|
for my $d (@dirs) {
|
||||||
|
if (-f "$d/$f") {
|
||||||
|
use File::Basename;
|
||||||
|
my $dest = dirname ("$odir/$f");
|
||||||
|
#
|
||||||
|
use File::Path;
|
||||||
|
-d $dest || mkpath ($dest)
|
||||||
|
|| die "$me: cannot mkdir $dest: $!\n";
|
||||||
|
#
|
||||||
|
use File::Copy;
|
||||||
|
copy ("$d/$f", $dest)
|
||||||
|
|| die "$me: cannot copy $d/$f to $dest: $!\n";
|
||||||
|
next FILE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
die "$me: $ARGV: cannot find image $f\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
' -- "$@" || exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
case $outdir in
|
||||||
|
/*) abs_outdir=$outdir;;
|
||||||
|
*) abs_outdir=$srcdir/$outdir;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
echo "Making output for $srcfile"
|
||||||
|
echo " in `pwd`"
|
||||||
|
mkdir -p "$outdir/"
|
||||||
|
|
||||||
|
#
|
||||||
|
if $generate_info; then
|
||||||
|
cmd="$SETLANG $MAKEINFO -o $PACKAGE.info $commonarg $infoarg \"$srcfile\""
|
||||||
|
echo "Generating info... ($cmd)"
|
||||||
|
rm -f $PACKAGE.info* # get rid of any strays
|
||||||
|
eval "$cmd"
|
||||||
|
tar czf "$outdir/$PACKAGE.info.tar.gz" $PACKAGE.info*
|
||||||
|
ls -l "$outdir/$PACKAGE.info.tar.gz"
|
||||||
|
info_tgz_size=`calcsize "$outdir/$PACKAGE.info.tar.gz"`
|
||||||
|
# do not mv the info files, there's no point in having them available
|
||||||
|
# separately on the web.
|
||||||
|
fi # end info
|
||||||
|
|
||||||
|
#
|
||||||
|
if $generate_tex; then
|
||||||
|
cmd="$SETLANG $TEXI2DVI $dirargs $texarg \"$srcfile\""
|
||||||
|
printf "\nGenerating dvi... ($cmd)\n"
|
||||||
|
eval "$cmd"
|
||||||
|
# compress/finish dvi:
|
||||||
|
gzip -f -9 $PACKAGE.dvi
|
||||||
|
dvi_gz_size=`calcsize $PACKAGE.dvi.gz`
|
||||||
|
mv $PACKAGE.dvi.gz "$outdir/"
|
||||||
|
ls -l "$outdir/$PACKAGE.dvi.gz"
|
||||||
|
|
||||||
|
cmd="$SETLANG $TEXI2DVI --pdf $dirargs $texarg \"$srcfile\""
|
||||||
|
printf "\nGenerating pdf... ($cmd)\n"
|
||||||
|
eval "$cmd"
|
||||||
|
pdf_size=`calcsize $PACKAGE.pdf`
|
||||||
|
mv $PACKAGE.pdf "$outdir/"
|
||||||
|
ls -l "$outdir/$PACKAGE.pdf"
|
||||||
|
fi # end tex (dvi + pdf)
|
||||||
|
|
||||||
|
#
|
||||||
|
if $generate_ascii; then
|
||||||
|
opt="-o $PACKAGE.txt --no-split --no-headers $commonarg"
|
||||||
|
cmd="$SETLANG $MAKEINFO $opt \"$srcfile\""
|
||||||
|
printf "\nGenerating ascii... ($cmd)\n"
|
||||||
|
eval "$cmd"
|
||||||
|
ascii_size=`calcsize $PACKAGE.txt`
|
||||||
|
gzip -f -9 -c $PACKAGE.txt >"$outdir/$PACKAGE.txt.gz"
|
||||||
|
ascii_gz_size=`calcsize "$outdir/$PACKAGE.txt.gz"`
|
||||||
|
mv $PACKAGE.txt "$outdir/"
|
||||||
|
ls -l "$outdir/$PACKAGE.txt" "$outdir/$PACKAGE.txt.gz"
|
||||||
|
fi
|
||||||
|
|
||||||
|
#
|
||||||
|
|
||||||
|
if $generate_html; then
|
||||||
|
# Split HTML at level $1. Used for texi2html.
|
||||||
|
html_split()
|
||||||
|
{
|
||||||
|
opt="--split=$1 --node-files $commonarg $htmlarg"
|
||||||
|
cmd="$SETLANG $TEXI2HTML --output $PACKAGE.html $opt \"$srcfile\""
|
||||||
|
printf "\nGenerating html by $1... ($cmd)\n"
|
||||||
|
eval "$cmd"
|
||||||
|
split_html_dir=$PACKAGE.html
|
||||||
|
(
|
||||||
|
cd ${split_html_dir} || exit 1
|
||||||
|
ln -sf ${PACKAGE}.html index.html
|
||||||
|
tar -czf "$abs_outdir/${PACKAGE}.html_$1.tar.gz" -- *.html
|
||||||
|
)
|
||||||
|
eval html_$1_tgz_size=`calcsize "$outdir/${PACKAGE}.html_$1.tar.gz"`
|
||||||
|
rm -f "$outdir"/html_$1/*.html
|
||||||
|
mkdir -p "$outdir/html_$1/"
|
||||||
|
mv ${split_html_dir}/*.html "$outdir/html_$1/"
|
||||||
|
rmdir ${split_html_dir}
|
||||||
|
}
|
||||||
|
|
||||||
|
if test -z "$use_texi2html"; then
|
||||||
|
opt="--no-split --html -o $PACKAGE.html $commonarg $htmlarg"
|
||||||
|
cmd="$SETLANG $MAKEINFO $opt \"$srcfile\""
|
||||||
|
printf "\nGenerating monolithic html... ($cmd)\n"
|
||||||
|
rm -rf $PACKAGE.html # in case a directory is left over
|
||||||
|
eval "$cmd"
|
||||||
|
html_mono_size=`calcsize $PACKAGE.html`
|
||||||
|
gzip -f -9 -c $PACKAGE.html >"$outdir/$PACKAGE.html.gz"
|
||||||
|
html_mono_gz_size=`calcsize "$outdir/$PACKAGE.html.gz"`
|
||||||
|
copy_images "$outdir/" $PACKAGE.html
|
||||||
|
mv $PACKAGE.html "$outdir/"
|
||||||
|
ls -l "$outdir/$PACKAGE.html" "$outdir/$PACKAGE.html.gz"
|
||||||
|
|
||||||
|
# Before Texinfo 5.0, makeinfo did not accept a --split=HOW option,
|
||||||
|
# it just always split by node. So if we're splitting by node anyway,
|
||||||
|
# leave it out.
|
||||||
|
if test "x$split" = xnode; then
|
||||||
|
split_arg=
|
||||||
|
else
|
||||||
|
split_arg=--split=$split
|
||||||
|
fi
|
||||||
|
#
|
||||||
|
opt="--html -o $PACKAGE.html $split_arg $commonarg $htmlarg"
|
||||||
|
cmd="$SETLANG $MAKEINFO $opt \"$srcfile\""
|
||||||
|
printf "\nGenerating html by $split... ($cmd)\n"
|
||||||
|
eval "$cmd"
|
||||||
|
split_html_dir=$PACKAGE.html
|
||||||
|
copy_images $split_html_dir/ $split_html_dir/*.html
|
||||||
|
(
|
||||||
|
cd $split_html_dir || exit 1
|
||||||
|
tar -czf "$abs_outdir/$PACKAGE.html_$split.tar.gz" -- *
|
||||||
|
)
|
||||||
|
eval \
|
||||||
|
html_${split}_tgz_size=`calcsize "$outdir/$PACKAGE.html_$split.tar.gz"`
|
||||||
|
rm -rf "$outdir/html_$split/"
|
||||||
|
mv $split_html_dir "$outdir/html_$split/"
|
||||||
|
du -s "$outdir/html_$split/"
|
||||||
|
ls -l "$outdir/$PACKAGE.html_$split.tar.gz"
|
||||||
|
|
||||||
|
else # use texi2html:
|
||||||
|
opt="--output $PACKAGE.html $commonarg $htmlarg"
|
||||||
|
cmd="$SETLANG $TEXI2HTML $opt \"$srcfile\""
|
||||||
|
printf "\nGenerating monolithic html with texi2html... ($cmd)\n"
|
||||||
|
rm -rf $PACKAGE.html # in case a directory is left over
|
||||||
|
eval "$cmd"
|
||||||
|
html_mono_size=`calcsize $PACKAGE.html`
|
||||||
|
gzip -f -9 -c $PACKAGE.html >"$outdir/$PACKAGE.html.gz"
|
||||||
|
html_mono_gz_size=`calcsize "$outdir/$PACKAGE.html.gz"`
|
||||||
|
mv $PACKAGE.html "$outdir/"
|
||||||
|
|
||||||
|
html_split node
|
||||||
|
html_split chapter
|
||||||
|
html_split section
|
||||||
|
fi
|
||||||
|
fi # end html
|
||||||
|
|
||||||
|
#
|
||||||
|
printf "\nMaking .tar.gz for sources...\n"
|
||||||
|
d=`dirname $srcfile`
|
||||||
|
(
|
||||||
|
cd "$d"
|
||||||
|
srcfiles=`ls -d *.texinfo *.texi *.txi *.eps $source_extra 2>/dev/null` || true
|
||||||
|
tar czfh "$abs_outdir/$PACKAGE.texi.tar.gz" $srcfiles
|
||||||
|
ls -l "$abs_outdir/$PACKAGE.texi.tar.gz"
|
||||||
|
)
|
||||||
|
texi_tgz_size=`calcsize "$outdir/$PACKAGE.texi.tar.gz"`
|
||||||
|
|
||||||
|
#
|
||||||
|
# Do everything again through docbook.
|
||||||
|
if test -n "$docbook"; then
|
||||||
|
opt="-o - --docbook $commonarg"
|
||||||
|
cmd="$SETLANG $MAKEINFO $opt \"$srcfile\" >${srcdir}/$PACKAGE-db.xml"
|
||||||
|
printf "\nGenerating docbook XML... ($cmd)\n"
|
||||||
|
eval "$cmd"
|
||||||
|
docbook_xml_size=`calcsize $PACKAGE-db.xml`
|
||||||
|
gzip -f -9 -c $PACKAGE-db.xml >"$outdir/$PACKAGE-db.xml.gz"
|
||||||
|
docbook_xml_gz_size=`calcsize "$outdir/$PACKAGE-db.xml.gz"`
|
||||||
|
mv $PACKAGE-db.xml "$outdir/"
|
||||||
|
|
||||||
|
split_html_db_dir=html_node_db
|
||||||
|
opt="$commonarg -o $split_html_db_dir"
|
||||||
|
cmd="$DOCBOOK2HTML $opt \"${outdir}/$PACKAGE-db.xml\""
|
||||||
|
printf "\nGenerating docbook HTML... ($cmd)\n"
|
||||||
|
eval "$cmd"
|
||||||
|
(
|
||||||
|
cd ${split_html_db_dir} || exit 1
|
||||||
|
tar -czf "$abs_outdir/${PACKAGE}.html_node_db.tar.gz" -- *.html
|
||||||
|
)
|
||||||
|
html_node_db_tgz_size=`calcsize "$outdir/${PACKAGE}.html_node_db.tar.gz"`
|
||||||
|
rm -f "$outdir"/html_node_db/*.html
|
||||||
|
mkdir -p "$outdir/html_node_db"
|
||||||
|
mv ${split_html_db_dir}/*.html "$outdir/html_node_db/"
|
||||||
|
rmdir ${split_html_db_dir}
|
||||||
|
|
||||||
|
cmd="$DOCBOOK2TXT \"${outdir}/$PACKAGE-db.xml\""
|
||||||
|
printf "\nGenerating docbook ASCII... ($cmd)\n"
|
||||||
|
eval "$cmd"
|
||||||
|
docbook_ascii_size=`calcsize $PACKAGE-db.txt`
|
||||||
|
mv $PACKAGE-db.txt "$outdir/"
|
||||||
|
|
||||||
|
cmd="$DOCBOOK2PDF \"${outdir}/$PACKAGE-db.xml\""
|
||||||
|
printf "\nGenerating docbook PDF... ($cmd)\n"
|
||||||
|
eval "$cmd"
|
||||||
|
docbook_pdf_size=`calcsize $PACKAGE-db.pdf`
|
||||||
|
mv $PACKAGE-db.pdf "$outdir/"
|
||||||
|
fi
|
||||||
|
|
||||||
|
#
|
||||||
|
printf "\nMaking index.html for $PACKAGE...\n"
|
||||||
|
if test -z "$use_texi2html"; then
|
||||||
|
CONDS="/%%IF *HTML_SECTION%%/,/%%ENDIF *HTML_SECTION%%/d;\
|
||||||
|
/%%IF *HTML_CHAPTER%%/,/%%ENDIF *HTML_CHAPTER%%/d"
|
||||||
|
else
|
||||||
|
# should take account of --split here.
|
||||||
|
CONDS="/%%ENDIF.*%%/d;/%%IF *HTML_SECTION%%/d;/%%IF *HTML_CHAPTER%%/d"
|
||||||
|
fi
|
||||||
|
|
||||||
|
curdate=`$SETLANG date '+%B %d, %Y'`
|
||||||
|
sed \
|
||||||
|
-e "s!%%TITLE%%!$MANUAL_TITLE!g" \
|
||||||
|
-e "s!%%EMAIL%%!$EMAIL!g" \
|
||||||
|
-e "s!%%PACKAGE%%!$PACKAGE!g" \
|
||||||
|
-e "s!%%DATE%%!$curdate!g" \
|
||||||
|
-e "s!%%HTML_MONO_SIZE%%!$html_mono_size!g" \
|
||||||
|
-e "s!%%HTML_MONO_GZ_SIZE%%!$html_mono_gz_size!g" \
|
||||||
|
-e "s!%%HTML_NODE_TGZ_SIZE%%!$html_node_tgz_size!g" \
|
||||||
|
-e "s!%%HTML_SECTION_TGZ_SIZE%%!$html_section_tgz_size!g" \
|
||||||
|
-e "s!%%HTML_CHAPTER_TGZ_SIZE%%!$html_chapter_tgz_size!g" \
|
||||||
|
-e "s!%%INFO_TGZ_SIZE%%!$info_tgz_size!g" \
|
||||||
|
-e "s!%%DVI_GZ_SIZE%%!$dvi_gz_size!g" \
|
||||||
|
-e "s!%%PDF_SIZE%%!$pdf_size!g" \
|
||||||
|
-e "s!%%ASCII_SIZE%%!$ascii_size!g" \
|
||||||
|
-e "s!%%ASCII_GZ_SIZE%%!$ascii_gz_size!g" \
|
||||||
|
-e "s!%%TEXI_TGZ_SIZE%%!$texi_tgz_size!g" \
|
||||||
|
-e "s!%%DOCBOOK_HTML_NODE_TGZ_SIZE%%!$html_node_db_tgz_size!g" \
|
||||||
|
-e "s!%%DOCBOOK_ASCII_SIZE%%!$docbook_ascii_size!g" \
|
||||||
|
-e "s!%%DOCBOOK_PDF_SIZE%%!$docbook_pdf_size!g" \
|
||||||
|
-e "s!%%DOCBOOK_XML_SIZE%%!$docbook_xml_size!g" \
|
||||||
|
-e "s!%%DOCBOOK_XML_GZ_SIZE%%!$docbook_xml_gz_size!g" \
|
||||||
|
-e "s,%%SCRIPTURL%%,$scripturl,g" \
|
||||||
|
-e "s!%%SCRIPTNAME%%!$prog!g" \
|
||||||
|
-e "$CONDS" \
|
||||||
|
$GENDOCS_TEMPLATE_DIR/gendocs_template >"$outdir/index.html"
|
||||||
|
|
||||||
|
echo "Done, see $outdir/ subdirectory for new files."
|
||||||
|
|
||||||
|
# Local variables:
|
||||||
|
# eval: (add-hook 'before-save-hook 'time-stamp)
|
||||||
|
# time-stamp-start: "scriptversion="
|
||||||
|
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||||
|
# time-stamp-end: "$"
|
||||||
|
# End:
|
|
@ -0,0 +1,499 @@
|
||||||
|
eval '(exit $?0)' && eval 'exec perl -wS "$0" "$@"'
|
||||||
|
& eval 'exec perl -wS "$0" $argv:q'
|
||||||
|
if 0;
|
||||||
|
# Convert git log output to ChangeLog format.
|
||||||
|
|
||||||
|
my $VERSION = '2019-12-08 20:13'; # UTC
|
||||||
|
# The definition above must lie within the first 8 lines in order
|
||||||
|
# for the Emacs time-stamp write hook (at end) to update it.
|
||||||
|
# If you change this file with Emacs, please let the write hook
|
||||||
|
# do its job. Otherwise, update this string manually.
|
||||||
|
|
||||||
|
# Copyright (C) 2008-2016 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
# This program 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.
|
||||||
|
|
||||||
|
# This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
# Written by Jim Meyering
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use Getopt::Long;
|
||||||
|
use POSIX qw(strftime);
|
||||||
|
|
||||||
|
(my $ME = $0) =~ s|.*/||;
|
||||||
|
|
||||||
|
# use File::Coda; # http://meyering.net/code/Coda/
|
||||||
|
END {
|
||||||
|
defined fileno STDOUT or return;
|
||||||
|
close STDOUT and return;
|
||||||
|
warn "$ME: failed to close standard output: $!\n";
|
||||||
|
$? ||= 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub usage ($)
|
||||||
|
{
|
||||||
|
my ($exit_code) = @_;
|
||||||
|
my $STREAM = ($exit_code == 0 ? *STDOUT : *STDERR);
|
||||||
|
if ($exit_code != 0)
|
||||||
|
{
|
||||||
|
print $STREAM "Try '$ME --help' for more information.\n";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print $STREAM <<EOF;
|
||||||
|
Usage: $ME [OPTIONS] [ARGS]
|
||||||
|
|
||||||
|
Convert git log output to ChangeLog format. If present, any ARGS
|
||||||
|
are passed to "git log". To avoid ARGS being parsed as options to
|
||||||
|
$ME, they may be preceded by '--'.
|
||||||
|
|
||||||
|
OPTIONS:
|
||||||
|
|
||||||
|
--amend=FILE FILE maps from an SHA1 to perl code (i.e., s/old/new/) that
|
||||||
|
makes a change to SHA1's commit log text or metadata.
|
||||||
|
--append-dot append a dot to the first line of each commit message if
|
||||||
|
there is no other punctuation or blank at the end.
|
||||||
|
--no-cluster never cluster commit messages under the same date/author
|
||||||
|
header; the default is to cluster adjacent commit messages
|
||||||
|
if their headers are the same and neither commit message
|
||||||
|
contains multiple paragraphs.
|
||||||
|
--srcdir=DIR the root of the source tree, from which the .git/
|
||||||
|
directory can be derived.
|
||||||
|
--since=DATE convert only the logs since DATE;
|
||||||
|
the default is to convert all log entries.
|
||||||
|
--until=DATE convert only the logs older than DATE.
|
||||||
|
--ignore-matching=PAT ignore commit messages whose first lines match PAT.
|
||||||
|
--ignore-line=PAT ignore lines of commit messages that match PAT.
|
||||||
|
--format=FMT set format string for commit subject and body;
|
||||||
|
see 'man git-log' for the list of format metacharacters;
|
||||||
|
the default is '%s%n%b%n'
|
||||||
|
--strip-tab remove one additional leading TAB from commit message lines.
|
||||||
|
--strip-cherry-pick remove data inserted by "git cherry-pick";
|
||||||
|
this includes the "cherry picked from commit ..." line,
|
||||||
|
and the possible final "Conflicts:" paragraph.
|
||||||
|
--help display this help and exit
|
||||||
|
--version output version information and exit
|
||||||
|
|
||||||
|
EXAMPLE:
|
||||||
|
|
||||||
|
$ME --since=2008-01-01 > ChangeLog
|
||||||
|
$ME -- -n 5 foo > last-5-commits-to-branch-foo
|
||||||
|
|
||||||
|
SPECIAL SYNTAX:
|
||||||
|
|
||||||
|
The following types of strings are interpreted specially when they appear
|
||||||
|
at the beginning of a log message line. They are not copied to the output.
|
||||||
|
|
||||||
|
Copyright-paperwork-exempt: Yes
|
||||||
|
Append the "(tiny change)" notation to the usual "date name email"
|
||||||
|
ChangeLog header to mark a change that does not require a copyright
|
||||||
|
assignment.
|
||||||
|
Co-authored-by: Joe User <user\@example.com>
|
||||||
|
List the specified name and email address on a second
|
||||||
|
ChangeLog header, denoting a co-author.
|
||||||
|
Signed-off-by: Joe User <user\@example.com>
|
||||||
|
These lines are simply elided.
|
||||||
|
|
||||||
|
In a FILE specified via --amend, comment lines (starting with "#") are ignored.
|
||||||
|
FILE must consist of <SHA,CODE+> pairs where SHA is a 40-byte SHA1 (alone on
|
||||||
|
a line) referring to a commit in the current project, and CODE refers to one
|
||||||
|
or more consecutive lines of Perl code. Pairs must be separated by one or
|
||||||
|
more blank line.
|
||||||
|
|
||||||
|
Here is sample input for use with --amend=FILE, from coreutils:
|
||||||
|
|
||||||
|
3a169f4c5d9159283548178668d2fae6fced3030
|
||||||
|
# fix typo in title:
|
||||||
|
s/all tile types/all file types/
|
||||||
|
|
||||||
|
1379ed974f1fa39b12e2ffab18b3f7a607082202
|
||||||
|
# Due to a bug in vc-dwim, I mis-attributed a patch by Paul to myself.
|
||||||
|
# Change the author to be Paul. Note the escaped "@":
|
||||||
|
s,Jim .*>,Paul Eggert <eggert\\\@cs.ucla.edu>,
|
||||||
|
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
exit $exit_code;
|
||||||
|
}
|
||||||
|
|
||||||
|
# If the string $S is a well-behaved file name, simply return it.
|
||||||
|
# If it contains white space, quotes, etc., quote it, and return the new string.
|
||||||
|
sub shell_quote($)
|
||||||
|
{
|
||||||
|
my ($s) = @_;
|
||||||
|
if ($s =~ m![^\w+/.,-]!)
|
||||||
|
{
|
||||||
|
# Convert each single quote to '\''
|
||||||
|
$s =~ s/\'/\'\\\'\'/g;
|
||||||
|
# Then single quote the string.
|
||||||
|
$s = "'$s'";
|
||||||
|
}
|
||||||
|
return $s;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub quoted_cmd(@)
|
||||||
|
{
|
||||||
|
return join (' ', map {shell_quote $_} @_);
|
||||||
|
}
|
||||||
|
|
||||||
|
# Parse file F.
|
||||||
|
# Comment lines (starting with "#") are ignored.
|
||||||
|
# F must consist of <SHA,CODE+> pairs where SHA is a 40-byte SHA1
|
||||||
|
# (alone on a line) referring to a commit in the current project, and
|
||||||
|
# CODE refers to one or more consecutive lines of Perl code.
|
||||||
|
# Pairs must be separated by one or more blank line.
|
||||||
|
sub parse_amend_file($)
|
||||||
|
{
|
||||||
|
my ($f) = @_;
|
||||||
|
|
||||||
|
open F, '<', $f
|
||||||
|
or die "$ME: $f: failed to open for reading: $!\n";
|
||||||
|
|
||||||
|
my $fail;
|
||||||
|
my $h = {};
|
||||||
|
my $in_code = 0;
|
||||||
|
my $sha;
|
||||||
|
while (defined (my $line = <F>))
|
||||||
|
{
|
||||||
|
$line =~ /^\#/
|
||||||
|
and next;
|
||||||
|
chomp $line;
|
||||||
|
$line eq ''
|
||||||
|
and $in_code = 0, next;
|
||||||
|
|
||||||
|
if (!$in_code)
|
||||||
|
{
|
||||||
|
$line =~ /^([0-9a-fA-F]{40})$/
|
||||||
|
or (warn "$ME: $f:$.: invalid line; expected an SHA1\n"),
|
||||||
|
$fail = 1, next;
|
||||||
|
$sha = lc $1;
|
||||||
|
$in_code = 1;
|
||||||
|
exists $h->{$sha}
|
||||||
|
and (warn "$ME: $f:$.: duplicate SHA1\n"),
|
||||||
|
$fail = 1, next;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$h->{$sha} ||= '';
|
||||||
|
$h->{$sha} .= "$line\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
close F;
|
||||||
|
|
||||||
|
$fail
|
||||||
|
and exit 1;
|
||||||
|
|
||||||
|
return $h;
|
||||||
|
}
|
||||||
|
|
||||||
|
# git_dir_option $SRCDIR
|
||||||
|
#
|
||||||
|
# From $SRCDIR, the --git-dir option to pass to git (none if $SRCDIR
|
||||||
|
# is undef). Return as a list (0 or 1 element).
|
||||||
|
sub git_dir_option($)
|
||||||
|
{
|
||||||
|
my ($srcdir) = @_;
|
||||||
|
my @res = ();
|
||||||
|
if (defined $srcdir)
|
||||||
|
{
|
||||||
|
my $qdir = shell_quote $srcdir;
|
||||||
|
my $cmd = "cd $qdir && git rev-parse --show-toplevel";
|
||||||
|
my $qcmd = shell_quote $cmd;
|
||||||
|
my $git_dir = qx($cmd);
|
||||||
|
defined $git_dir
|
||||||
|
or die "$ME: cannot run $qcmd: $!\n";
|
||||||
|
$? == 0
|
||||||
|
or die "$ME: $qcmd had unexpected exit code or signal ($?)\n";
|
||||||
|
chomp $git_dir;
|
||||||
|
push @res, "--git-dir=$git_dir/.git";
|
||||||
|
}
|
||||||
|
@res;
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
my $since_date;
|
||||||
|
my $until_date;
|
||||||
|
my $format_string = '%s%n%b%n';
|
||||||
|
my $amend_file;
|
||||||
|
my $append_dot = 0;
|
||||||
|
my $cluster = 1;
|
||||||
|
my $ignore_matching;
|
||||||
|
my $ignore_line;
|
||||||
|
my $strip_tab = 0;
|
||||||
|
my $strip_cherry_pick = 0;
|
||||||
|
my $srcdir;
|
||||||
|
GetOptions
|
||||||
|
(
|
||||||
|
help => sub { usage 0 },
|
||||||
|
version => sub { print "$ME version $VERSION\n"; exit },
|
||||||
|
'since=s' => \$since_date,
|
||||||
|
'until=s' => \$until_date,
|
||||||
|
'format=s' => \$format_string,
|
||||||
|
'amend=s' => \$amend_file,
|
||||||
|
'append-dot' => \$append_dot,
|
||||||
|
'cluster!' => \$cluster,
|
||||||
|
'ignore-matching=s' => \$ignore_matching,
|
||||||
|
'ignore-line=s' => \$ignore_line,
|
||||||
|
'strip-tab' => \$strip_tab,
|
||||||
|
'strip-cherry-pick' => \$strip_cherry_pick,
|
||||||
|
'srcdir=s' => \$srcdir,
|
||||||
|
) or usage 1;
|
||||||
|
|
||||||
|
defined $since_date
|
||||||
|
and unshift @ARGV, "--since=$since_date";
|
||||||
|
defined $until_date
|
||||||
|
and unshift @ARGV, "--until=$until_date";
|
||||||
|
|
||||||
|
# This is a hash that maps an SHA1 to perl code (i.e., s/old/new/)
|
||||||
|
# that makes a correction in the log or attribution of that commit.
|
||||||
|
my $amend_code = defined $amend_file ? parse_amend_file $amend_file : {};
|
||||||
|
|
||||||
|
my @cmd = ('git',
|
||||||
|
git_dir_option $srcdir,
|
||||||
|
qw(log --log-size),
|
||||||
|
'--pretty=format:%H:%ct %an <%ae>%n%n'.$format_string, @ARGV);
|
||||||
|
open PIPE, '-|', @cmd
|
||||||
|
or die ("$ME: failed to run '". quoted_cmd (@cmd) ."': $!\n"
|
||||||
|
. "(Is your Git too old? Version 1.5.1 or later is required.)\n");
|
||||||
|
|
||||||
|
my $prev_multi_paragraph;
|
||||||
|
my $prev_date_line = '';
|
||||||
|
my @prev_coauthors = ();
|
||||||
|
my @skipshas = ();
|
||||||
|
while (1)
|
||||||
|
{
|
||||||
|
defined (my $in = <PIPE>)
|
||||||
|
or last;
|
||||||
|
$in =~ /^log size (\d+)$/
|
||||||
|
or die "$ME:$.: Invalid line (expected log size):\n$in";
|
||||||
|
my $log_nbytes = $1;
|
||||||
|
|
||||||
|
my $log;
|
||||||
|
my $n_read = read PIPE, $log, $log_nbytes;
|
||||||
|
$n_read == $log_nbytes
|
||||||
|
or die "$ME:$.: unexpected EOF\n";
|
||||||
|
|
||||||
|
# Extract leading hash.
|
||||||
|
my ($sha, $rest) = split ':', $log, 2;
|
||||||
|
defined $sha
|
||||||
|
or die "$ME:$.: malformed log entry\n";
|
||||||
|
$sha =~ /^[0-9a-fA-F]{40}$/
|
||||||
|
or die "$ME:$.: invalid SHA1: $sha\n";
|
||||||
|
|
||||||
|
my $skipflag = 0;
|
||||||
|
if (@skipshas)
|
||||||
|
{
|
||||||
|
foreach(@skipshas)
|
||||||
|
{
|
||||||
|
if ($sha =~ /^$_/)
|
||||||
|
{
|
||||||
|
$skipflag = $_;
|
||||||
|
last;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# If this commit's log requires any transformation, do it now.
|
||||||
|
my $code = $amend_code->{$sha};
|
||||||
|
if (defined $code)
|
||||||
|
{
|
||||||
|
eval 'use Safe';
|
||||||
|
my $s = new Safe;
|
||||||
|
# Put the unpreprocessed entry into "$_".
|
||||||
|
$_ = $rest;
|
||||||
|
|
||||||
|
# Let $code operate on it, safely.
|
||||||
|
my $r = $s->reval("$code")
|
||||||
|
or die "$ME:$.:$sha: failed to eval \"$code\":\n$@\n";
|
||||||
|
|
||||||
|
# Note that we've used this entry.
|
||||||
|
delete $amend_code->{$sha};
|
||||||
|
|
||||||
|
# Update $rest upon success.
|
||||||
|
$rest = $_;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Remove lines inserted by "git cherry-pick".
|
||||||
|
if ($strip_cherry_pick)
|
||||||
|
{
|
||||||
|
$rest =~ s/^\s*Conflicts:\n.*//sm;
|
||||||
|
$rest =~ s/^\s*\(cherry picked from commit [\da-f]+\)\n//m;
|
||||||
|
}
|
||||||
|
|
||||||
|
my @line = split /[ \t]*\n/, $rest;
|
||||||
|
my $author_line = shift @line;
|
||||||
|
defined $author_line
|
||||||
|
or die "$ME:$.: unexpected EOF\n";
|
||||||
|
$author_line =~ /^(\d+) (.*>)$/
|
||||||
|
or die "$ME:$.: Invalid line "
|
||||||
|
. "(expected date/author/email):\n$author_line\n";
|
||||||
|
|
||||||
|
# Format 'Copyright-paperwork-exempt: Yes' as a standard ChangeLog
|
||||||
|
# `(tiny change)' annotation.
|
||||||
|
my $tiny = (grep (/^(?:Copyright-paperwork-exempt|Tiny-change):\s+[Yy]es$/, @line)
|
||||||
|
? ' (tiny change)' : '');
|
||||||
|
|
||||||
|
my $date_line = sprintf "%s %s$tiny\n",
|
||||||
|
strftime ("%Y-%m-%d", gmtime ($1)), $2;
|
||||||
|
|
||||||
|
my @coauthors = grep /^Co-authored-by:.*$/, @line;
|
||||||
|
# Omit meta-data lines we've already interpreted.
|
||||||
|
@line = grep !/^(?:Signed-off-by:[ ].*>$
|
||||||
|
|Co-authored-by:[ ]
|
||||||
|
|Copyright-paperwork-exempt:[ ]
|
||||||
|
|Tiny-change:[ ]
|
||||||
|
)/x, @line;
|
||||||
|
|
||||||
|
# Remove leading and trailing blank lines.
|
||||||
|
if (@line)
|
||||||
|
{
|
||||||
|
while ($line[0] =~ /^\s*$/) { shift @line; }
|
||||||
|
while ($line[$#line] =~ /^\s*$/) { pop @line; }
|
||||||
|
}
|
||||||
|
|
||||||
|
# Handle Emacs gitmerge.el "skipped" commits.
|
||||||
|
# Yes, this should be controlled by an option. So sue me.
|
||||||
|
if ( grep /^(; )?Merge from /, @line )
|
||||||
|
{
|
||||||
|
my $found = 0;
|
||||||
|
foreach (@line)
|
||||||
|
{
|
||||||
|
if (grep /^The following commit.*skipped:$/, $_)
|
||||||
|
{
|
||||||
|
$found = 1;
|
||||||
|
## Reset at each merge to reduce chance of false matches.
|
||||||
|
@skipshas = ();
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
if ($found && $_ =~ /^([0-9a-fA-F]{7,}) [^ ]/)
|
||||||
|
{
|
||||||
|
push ( @skipshas, $1 );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Ignore commits that match the --ignore-matching pattern, if specified.
|
||||||
|
if (defined $ignore_matching && @line && $line[0] =~ /$ignore_matching/)
|
||||||
|
{
|
||||||
|
$skipflag = 1;
|
||||||
|
}
|
||||||
|
elsif ($skipflag)
|
||||||
|
{
|
||||||
|
## Perhaps only warn if a pattern matches more than once?
|
||||||
|
warn "$ME: warning: skipping $sha due to $skipflag\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (! $skipflag)
|
||||||
|
{
|
||||||
|
if (defined $ignore_line && @line)
|
||||||
|
{
|
||||||
|
@line = grep ! /$ignore_line/, @line;
|
||||||
|
while ($line[$#line] =~ /^\s*$/) { pop @line; }
|
||||||
|
}
|
||||||
|
|
||||||
|
# Record whether there are two or more paragraphs.
|
||||||
|
my $multi_paragraph = grep /^\s*$/, @line;
|
||||||
|
|
||||||
|
# Format 'Co-authored-by: A U Thor <email@example.com>' lines in
|
||||||
|
# standard multi-author ChangeLog format.
|
||||||
|
for (@coauthors)
|
||||||
|
{
|
||||||
|
s/^Co-authored-by:\s*/\t /;
|
||||||
|
s/\s*</ </;
|
||||||
|
|
||||||
|
/<.*?@.*\..*>/
|
||||||
|
or warn "$ME: warning: missing email address for "
|
||||||
|
. substr ($_, 5) . "\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
# If clustering of commit messages has been disabled, if this header
|
||||||
|
# would be different from the previous date/name/etc. header,
|
||||||
|
# or if this or the previous entry consists of two or more paragraphs,
|
||||||
|
# then print the header.
|
||||||
|
if ( ! $cluster
|
||||||
|
|| $date_line ne $prev_date_line
|
||||||
|
|| "@coauthors" ne "@prev_coauthors"
|
||||||
|
|| $multi_paragraph
|
||||||
|
|| $prev_multi_paragraph)
|
||||||
|
{
|
||||||
|
$prev_date_line eq ''
|
||||||
|
or print "\n";
|
||||||
|
print $date_line;
|
||||||
|
@coauthors
|
||||||
|
and print join ("\n", @coauthors), "\n";
|
||||||
|
}
|
||||||
|
$prev_date_line = $date_line;
|
||||||
|
@prev_coauthors = @coauthors;
|
||||||
|
$prev_multi_paragraph = $multi_paragraph;
|
||||||
|
|
||||||
|
# If there were any lines
|
||||||
|
if (@line == 0)
|
||||||
|
{
|
||||||
|
warn "$ME: warning: empty commit message:\n $date_line\n";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ($append_dot)
|
||||||
|
{
|
||||||
|
# If the first line of the message has enough room, then
|
||||||
|
if (length $line[0] < 72)
|
||||||
|
{
|
||||||
|
# append a dot if there is no other punctuation or blank
|
||||||
|
# at the end.
|
||||||
|
$line[0] =~ /[[:punct:]\s]$/
|
||||||
|
or $line[0] .= '.';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Remove one additional leading TAB from each line.
|
||||||
|
$strip_tab
|
||||||
|
and map { s/^\t// } @line;
|
||||||
|
|
||||||
|
# Prefix each non-empty line with a TAB.
|
||||||
|
@line = map { length $_ ? "\t$_" : '' } @line;
|
||||||
|
|
||||||
|
print "\n", join ("\n", @line), "\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
defined ($in = <PIPE>)
|
||||||
|
or last;
|
||||||
|
$in ne "\n"
|
||||||
|
and die "$ME:$.: unexpected line:\n$in";
|
||||||
|
}
|
||||||
|
|
||||||
|
close PIPE
|
||||||
|
or die "$ME: error closing pipe from " . quoted_cmd (@cmd) . "\n";
|
||||||
|
# FIXME-someday: include $PROCESS_STATUS in the diagnostic
|
||||||
|
|
||||||
|
# Complain about any unused entry in the --amend=F specified file.
|
||||||
|
my $fail = 0;
|
||||||
|
foreach my $sha (keys %$amend_code)
|
||||||
|
{
|
||||||
|
warn "$ME:$amend_file: unused entry: $sha\n";
|
||||||
|
$fail = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
exit $fail;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Local Variables:
|
||||||
|
# mode: perl
|
||||||
|
# indent-tabs-mode: nil
|
||||||
|
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||||
|
# time-stamp-start: "my $VERSION = '"
|
||||||
|
# time-stamp-format: "%:y-%02m-%02d %02H:%02M"
|
||||||
|
# time-stamp-time-zone: "UTC0"
|
||||||
|
# time-stamp-end: "'; # UTC"
|
||||||
|
# End:
|
|
@ -0,0 +1,21 @@
|
||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
# GNU Mes --- Maxwell Equations of Software
|
||||||
|
# Copyright © 2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
|
#
|
||||||
|
# This file is part of GNU Mes.
|
||||||
|
#
|
||||||
|
# GNU 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.
|
||||||
|
#
|
||||||
|
# GNU 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 GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
for i in $(find . -name '*.c' -o -name '*.h' -o -name '*.i'); do indent $i --no-tabs --line-length 110 --honour-newlines; done
|
|
@ -0,0 +1,133 @@
|
||||||
|
#! @SHELL@
|
||||||
|
|
||||||
|
# GNU Mes --- Maxwell Equations of Software
|
||||||
|
# Copyright © 2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
|
#
|
||||||
|
# This file is part of GNU Mes.
|
||||||
|
#
|
||||||
|
# GNU 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.
|
||||||
|
#
|
||||||
|
# GNU 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 GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
. ./config.sh
|
||||||
|
|
||||||
|
v=
|
||||||
|
_v=
|
||||||
|
if test "$V" = 2; then
|
||||||
|
set -x
|
||||||
|
fi
|
||||||
|
if test -n "$V"; then
|
||||||
|
if test "$V" -gt 0; then
|
||||||
|
v=v
|
||||||
|
_v=-v
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
set -u
|
||||||
|
|
||||||
|
# Use bash or lose if pipes fail
|
||||||
|
if test -n "$BASHOPTS"; then
|
||||||
|
set -o pipefail
|
||||||
|
fi
|
||||||
|
|
||||||
|
DESTDIR=${DESTDIR-}
|
||||||
|
mkdir -p ${DESTDIR}${bindir}
|
||||||
|
cp $_v bin/mes ${DESTDIR}${bindir}/mes
|
||||||
|
if test -f bin/mes-gcc; then
|
||||||
|
cp $_v bin/mes-gcc ${DESTDIR}${bindir}/mes-gcc
|
||||||
|
fi
|
||||||
|
if test -f bin/mes-mescc; then
|
||||||
|
cp $_v bin/mes-mescc ${DESTDIR}${bindir}/mes-mescc
|
||||||
|
fi
|
||||||
|
cp $_v scripts/mesar ${DESTDIR}${bindir}/mesar
|
||||||
|
cp $_v scripts/mescc.scm ${DESTDIR}${bindir}/mescc.scm
|
||||||
|
cp $_v scripts/mescc ${DESTDIR}${bindir}/mescc
|
||||||
|
|
||||||
|
sed \
|
||||||
|
-e "s,^#! /bin/sh,#! ${SHELL}," \
|
||||||
|
scripts/diff.scm > ${DESTDIR}${bindir}/diff.scm
|
||||||
|
chmod +x ${DESTDIR}${bindir}/diff.scm
|
||||||
|
|
||||||
|
mkdir -p ${DESTDIR}${docdir}
|
||||||
|
|
||||||
|
if test -n "${PERL}"\
|
||||||
|
&& test -n "${GIT}"\
|
||||||
|
&& ${PERL} -v > /dev/null\
|
||||||
|
&& ! test -f .git-for-build; then
|
||||||
|
${PERL} ${srcdest}build-aux/gitlog-to-changelog --srcdir=. > ChangeLog+
|
||||||
|
fi
|
||||||
|
|
||||||
|
cp\
|
||||||
|
AUTHORS\
|
||||||
|
BOOTSTRAP\
|
||||||
|
COPYING\
|
||||||
|
HACKING\
|
||||||
|
NEWS\
|
||||||
|
README\
|
||||||
|
ROADMAP\
|
||||||
|
${DESTDIR}${docdir}
|
||||||
|
|
||||||
|
if test -f ChangeLog+; then
|
||||||
|
cp $_v ChangeLog+ ${DESTDIR}${docdir}/ChangeLog
|
||||||
|
rm -f ChangeLog+
|
||||||
|
else
|
||||||
|
cp $_v ChangeLog ${DESTDIR}${docdir}
|
||||||
|
fi
|
||||||
|
|
||||||
|
__exclude_go=
|
||||||
|
__exclude_scm=
|
||||||
|
if test -f module/mescc.go; then
|
||||||
|
__exclude_go=--exclude='*.go'
|
||||||
|
__exclude_scm=--exclude='*.scm'
|
||||||
|
fi
|
||||||
|
|
||||||
|
mkdir -p $DESTDIR$includedir
|
||||||
|
mkdir -p $DESTDIR$libdir
|
||||||
|
mkdir -p $DESTDIR$pkgdatadir
|
||||||
|
tar -cf- -C ${srcdir}/include . | tar -${v}xf- -C $DESTDIR$includedir
|
||||||
|
tar -cf- -C ${srcdir}/lib $mes_cpu-mes | tar -${v}xf- -C $DESTDIR$libdir
|
||||||
|
tar -cf- -C ${srcdir}/lib $mes_kernel/$mes_cpu-mes | tar -${v}xf- -C $DESTDIR$libdir
|
||||||
|
if test -z "$srcdest"; then
|
||||||
|
tar -cf- $__exclude_go module | tar -${v}xf- -C $DESTDIR$pkgdatadir
|
||||||
|
else
|
||||||
|
tar -cf- -C ${srcdest} module | tar -${v}xf- -C $DESTDIR$pkgdatadir
|
||||||
|
fi
|
||||||
|
tar -cf- -C ${srcdest}mes module | tar -${v}xf- -C $DESTDIR$pkgdatadir
|
||||||
|
if test -d gcc-lib/$mes_cpu-mes; then
|
||||||
|
tar -cf- -C gcc-lib/$mes_cpu-mes . | tar -${v}xf- -C $DESTDIR$libdir
|
||||||
|
fi
|
||||||
|
if test -d mescc-lib/$mes_cpu-mes; then
|
||||||
|
tar -cf- -C mescc-lib $mes_cpu-mes | tar -${v}xf- -C $DESTDIR$libdir
|
||||||
|
fi
|
||||||
|
|
||||||
|
mkdir -p ${DESTDIR}${guile_site_dir}
|
||||||
|
mkdir -p ${DESTDIR}${guile_site_ccache_dir}
|
||||||
|
tar -cf- -C ${srcdest}module $__exclude_go . | tar -${v}xf- -C ${DESTDIR}${guile_site_dir}
|
||||||
|
tar -cf- -C module $__exclude_scm . | tar -${v}xf- -C ${DESTDIR}${guile_site_ccache_dir}
|
||||||
|
|
||||||
|
if test -f doc/mes.info; then
|
||||||
|
mkdir -p ${DESTDIR}${infodir}
|
||||||
|
tar -cf- doc/mes.info* doc/images | tar -${v}xf- --strip-components=1 -C ${DESTDIR}${infodir}
|
||||||
|
install-info --info-dir=${DESTDIR}${infodir} doc/mes.info
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -f doc/mes.1; then
|
||||||
|
mkdir -p ${DESTDIR}${mandir}/man1
|
||||||
|
cp $_v doc/mes.1 ${DESTDIR}${mandir}/man1/
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -f doc/mescc.1; then
|
||||||
|
mkdir -p ${DESTDIR}${mandir}/man1
|
||||||
|
cp $_v doc/mescc.1 ${DESTDIR}${mandir}/man1/
|
||||||
|
fi
|
|
@ -0,0 +1,23 @@
|
||||||
|
;;; GNU Mes --- Maxwell Equations of Software
|
||||||
|
;;; Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
|
|
||||||
|
;;; This file is part of GNU Mes.
|
||||||
|
;;;
|
||||||
|
;;; GNU 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.
|
||||||
|
;;;
|
||||||
|
;;; GNU 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 GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
(use-modules (guix packages))
|
||||||
|
(define %source-dir (dirname (dirname (current-filename))))
|
||||||
|
(add-to-load-path (string-append %source-dir "/guix"))
|
||||||
|
(use-modules (git mes))
|
||||||
|
(packages->manifest (map cadr (package-direct-inputs mes)))
|
|
@ -0,0 +1,205 @@
|
||||||
|
#! /bin/sh
|
||||||
|
# -*-scheme-*-
|
||||||
|
exec ${GUILE-guile} --no-auto-compile -L $(dirname $0) -C $(dirname $0) -e '(mes-snarf)' -s "$0" "$@"
|
||||||
|
!#
|
||||||
|
|
||||||
|
;;; GNU Mes --- Maxwell Equations of Software
|
||||||
|
;;; Copyright © 2016,2017,2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
|
;;;
|
||||||
|
;;; mes-snarf.scm: This file is part of GNU Mes.
|
||||||
|
;;;
|
||||||
|
;;; GNU 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.
|
||||||
|
;;;
|
||||||
|
;;; GNU 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 GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
(define-module (mes-snarf)
|
||||||
|
#:use-module (srfi srfi-1)
|
||||||
|
#:use-module (srfi srfi-8)
|
||||||
|
#:use-module (srfi srfi-9)
|
||||||
|
#:use-module (srfi srfi-26)
|
||||||
|
#:use-module (ice-9 rdelim)
|
||||||
|
#:export (main))
|
||||||
|
|
||||||
|
(cond-expand
|
||||||
|
(mes
|
||||||
|
(define %scheme "mes"))
|
||||||
|
(guile-2
|
||||||
|
(define %scheme "guile")
|
||||||
|
(define-macro (mes-use-module . rest) #t))
|
||||||
|
(guile
|
||||||
|
(use-modules (ice-9 syncase))
|
||||||
|
(define %scheme "guile")
|
||||||
|
(define-macro (mes-use-module . rest) #t)))
|
||||||
|
|
||||||
|
(mes-use-module (mes guile))
|
||||||
|
(mes-use-module (srfi srfi-1))
|
||||||
|
(mes-use-module (srfi srfi-8))
|
||||||
|
(mes-use-module (srfi srfi-9))
|
||||||
|
(mes-use-module (srfi srfi-26))
|
||||||
|
|
||||||
|
(when (and=> (getenv "V") (lambda (v) (> (string->number v) 1)))
|
||||||
|
(format (current-error-port) "mes-snarf[~a]...\n" %scheme))
|
||||||
|
|
||||||
|
(define (char->char from to char)
|
||||||
|
(if (eq? char from) to char))
|
||||||
|
|
||||||
|
(define (string-replace-char string from to)
|
||||||
|
(string-map (cut char->char from to <>) string))
|
||||||
|
|
||||||
|
(define (string-replace-suffix string from to)
|
||||||
|
(if (string-suffix? from string)
|
||||||
|
(string-replace string to (- (string-length string) (string-length from)))
|
||||||
|
string))
|
||||||
|
|
||||||
|
(define (string-replace-string string from to)
|
||||||
|
(cond ((string-contains string from) => (lambda (i) (string-replace string to i (+ i (string-length from)))))
|
||||||
|
(else string)))
|
||||||
|
|
||||||
|
(define %gcc? #t)
|
||||||
|
|
||||||
|
(define-record-type <file> (make-file name content)
|
||||||
|
file?
|
||||||
|
(name file.name)
|
||||||
|
(content file.content))
|
||||||
|
|
||||||
|
(define-record-type <function> (make-function name formals annotation)
|
||||||
|
function?
|
||||||
|
(name function.name)
|
||||||
|
(formals function.formals)
|
||||||
|
(annotation function.annotation))
|
||||||
|
|
||||||
|
(define (function-scm-name f)
|
||||||
|
(or (assoc-ref (function.annotation f) 'name)
|
||||||
|
(let ((name ((compose
|
||||||
|
identity
|
||||||
|
(cut string-replace-char <> #\_ #\-)
|
||||||
|
(cut string-replace-string <> "_to_" "->")
|
||||||
|
(cut string-replace-suffix <> "_x" "!")
|
||||||
|
(cut string-replace-suffix <> "_x_" "!-")
|
||||||
|
(cut string-replace-suffix <> "_p" "?")
|
||||||
|
)
|
||||||
|
(function.name f))))
|
||||||
|
(if (not (string-suffix? "-" name)) name
|
||||||
|
(string-append "core:" (string-drop-right name 1))))))
|
||||||
|
|
||||||
|
(define %builtin-prefix% "scm_")
|
||||||
|
(define (function-builtin-name f)
|
||||||
|
(string-append %builtin-prefix% (function.name f)))
|
||||||
|
|
||||||
|
(define %cell-prefix% "cell_")
|
||||||
|
(define (function-cell-name f)
|
||||||
|
(string-append %cell-prefix% (function.name f)))
|
||||||
|
|
||||||
|
(define %start 1)
|
||||||
|
(define (symbol->header s i)
|
||||||
|
(string-append
|
||||||
|
(format #f "// CONSTANT ~a ~a\n" s i)
|
||||||
|
(format #f "#define ~a ~a\n" s i)))
|
||||||
|
|
||||||
|
(define (function->header f i)
|
||||||
|
(let* ((arity (or (assoc-ref (function.annotation f) 'arity)
|
||||||
|
(if (string-null? (function.formals f)) 0
|
||||||
|
(length (string-split (function.formals f) #\,)))))
|
||||||
|
(n (if (eq? arity 'n) -1 arity)))
|
||||||
|
(format #f "SCM ~a (~a);\n" (function.name f) (function.formals f))))
|
||||||
|
|
||||||
|
(define (function->source f i)
|
||||||
|
(let* ((arity (or (assoc-ref (function.annotation f) 'arity)
|
||||||
|
(if (string-null? (function.formals f)) 0
|
||||||
|
(length (string-split (function.formals f) #\,)))))
|
||||||
|
(n (if (eq? arity 'n) -1 arity)))
|
||||||
|
(format #f " a = init_builtin (builtin_type, ~s, ~a, &~a, a);\n" (function.name f) n (function.name f))))
|
||||||
|
|
||||||
|
(define (disjoin . predicates)
|
||||||
|
(lambda (. arguments)
|
||||||
|
(any (cut apply <> arguments) predicates)))
|
||||||
|
|
||||||
|
(define (snarf-symbols string)
|
||||||
|
(let* ((lines (string-split string #\newline))
|
||||||
|
(symbols (filter (cut string-prefix? " init_symbol (" <>) lines)))
|
||||||
|
(define (line->symbol line)
|
||||||
|
((compose
|
||||||
|
(lambda (s) (string-take s (string-index s #\,)))
|
||||||
|
(cut string-drop <> (string-length " init_symbol (")))
|
||||||
|
line))
|
||||||
|
(map line->symbol symbols)))
|
||||||
|
|
||||||
|
(define (string-split-string string sep)
|
||||||
|
(cond ((string-contains string sep) => (lambda (i) (list (string-take string i) (string-drop string (+ i (string-length sep))))))
|
||||||
|
(else (list string #f))))
|
||||||
|
|
||||||
|
(define (snarf-functions string)
|
||||||
|
(let ((lines (string-split string #\newline)))
|
||||||
|
(filter-map
|
||||||
|
(lambda (line previous)
|
||||||
|
(receive (function rest)
|
||||||
|
(apply values (string-split-string line " "))
|
||||||
|
(and function
|
||||||
|
(equal? (string-trim previous) "SCM")
|
||||||
|
(not (string-null? function))
|
||||||
|
(not (string-prefix? "#" function))
|
||||||
|
(not (string-prefix? "/" function))
|
||||||
|
rest
|
||||||
|
(receive (parameter-list annotation)
|
||||||
|
(apply values (string-split-string rest " ///"))
|
||||||
|
(let* ((parameters (string-drop parameter-list 1))
|
||||||
|
(parameters (string-drop-right parameters 1))
|
||||||
|
(formals (if (string-null? parameters) '()
|
||||||
|
(string-split parameters #\,)))
|
||||||
|
(formals (map string-trim formals)))
|
||||||
|
(and parameters
|
||||||
|
(let* ((non-SCM (filter (negate (cut string-prefix? "SCM" <>)) formals)))
|
||||||
|
(and (null? non-SCM)
|
||||||
|
(let ((annotation (and annotation (with-input-from-string annotation read))))
|
||||||
|
(make-function function parameters annotation))))))))))
|
||||||
|
lines (cons "\n" lines))))
|
||||||
|
|
||||||
|
(define (content? f)
|
||||||
|
((compose not string-null? file.content) f))
|
||||||
|
|
||||||
|
(define (internal? f)
|
||||||
|
((compose (cut assoc-ref <> 'internal) function.annotation) f))
|
||||||
|
|
||||||
|
(define (no-environment? f)
|
||||||
|
((compose (cut assoc-ref <> 'no-environment) function.annotation) f))
|
||||||
|
|
||||||
|
(define (generate-includes file-name)
|
||||||
|
(let* ((srcdest (or (getenv "srcdest") ""))
|
||||||
|
(string (with-input-from-file (string-append srcdest file-name) read-string))
|
||||||
|
(functions (snarf-functions string))
|
||||||
|
(functions (delete-duplicates functions (lambda (a b) (equal? (function.name a) (function.name b)))))
|
||||||
|
(functions (filter (negate internal?) functions))
|
||||||
|
(symbols (snarf-symbols string))
|
||||||
|
(base-name (basename file-name ".c"))
|
||||||
|
(dir (string-append (dirname file-name)))
|
||||||
|
(base-name (string-append dir "/" base-name))
|
||||||
|
(base-name (if %gcc? base-name
|
||||||
|
(string-append base-name ".mes")))
|
||||||
|
(header (make-file
|
||||||
|
(string-append base-name ".h")
|
||||||
|
(string-join (map function->header functions (iota (length functions) (+ %start (length symbols)))) "")))
|
||||||
|
(source (make-file
|
||||||
|
(string-append base-name ".i")
|
||||||
|
(string-join (map function->source (filter (negate no-environment?) functions) (iota (length functions) (+ (length symbols) %start))) "")))
|
||||||
|
(symbols.h (make-file
|
||||||
|
(string-append base-name ".symbols.h")
|
||||||
|
(string-join (map symbol->header symbols (iota (length symbols) %start)) ""))))
|
||||||
|
(list header source symbols.h)))
|
||||||
|
|
||||||
|
(define (file-write file)
|
||||||
|
(system* "mkdir" "-p" (dirname (file.name file)))
|
||||||
|
(with-output-to-file (file.name file) (lambda () (display (file.content file)))))
|
||||||
|
|
||||||
|
(define (main args)
|
||||||
|
(let* ((files (cdr args))
|
||||||
|
(files (append-map generate-includes files)))
|
||||||
|
(for-each file-write (filter content? files))))
|
|
@ -0,0 +1,54 @@
|
||||||
|
#! @BASH@
|
||||||
|
|
||||||
|
# GNU Mes --- Maxwell Equations of Software
|
||||||
|
# Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
|
#
|
||||||
|
# This file is part of GNU Mes.
|
||||||
|
#
|
||||||
|
# GNU 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.
|
||||||
|
#
|
||||||
|
# GNU 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 GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
abs_top_srcdir="@abs_top_srcdir@"
|
||||||
|
export abs_top_srcdir
|
||||||
|
abs_top_builddir="@abs_top_builddir@"
|
||||||
|
export abs_top_builddir
|
||||||
|
prefix=${prefix-@prefix@}
|
||||||
|
export prefix
|
||||||
|
program_prefix=${program_prefix-@program_prefix@}
|
||||||
|
|
||||||
|
MES_PREFIX=${MES_PREFIX-${abs_top_srcdir}}
|
||||||
|
export MES_PREFIX
|
||||||
|
|
||||||
|
GUILE_LOAD_COMPILED_PATH="$abs_top_builddir/scripts:$abs_top_builddir/module${GUILE_LOAD_COMPILED_PATH:+:}$GUILE_LOAD_COMPILED_PATH"
|
||||||
|
GUILE_LOAD_PATH="$abs_top_srcdir/module:$abs_top_srcdir/mes:$abs_top_srcdir/guix${GUILE_LOAD_PATH:+:}$GUILE_LOAD_PATH"
|
||||||
|
if [ -n "$srcdest" ]; then
|
||||||
|
GUILE_LOAD_PATH="${srcdest}module:${srcdest}mes:$GUILE_LOAD_PATH"
|
||||||
|
fi
|
||||||
|
export GUILE_LOAD_COMPILED_PATH GUILE_LOAD_PATH
|
||||||
|
|
||||||
|
PATH="$abs_top_builddir/scripts:$abs_top_builddir/scripts:$abs_top_builddir/bin:$abs_top_builddir/build-aux:$PATH"
|
||||||
|
export PATH
|
||||||
|
|
||||||
|
MES=${MES-${abs_top_builddir}/bin/${program_prefix}mes}
|
||||||
|
export MES
|
||||||
|
|
||||||
|
bindir=${abs_top_builddir}/scripts
|
||||||
|
export bindir
|
||||||
|
|
||||||
|
GUIX_PACKAGE_PATH="$abs_top_srcdir/guix${GUIX_PACKAGE_PATH:+:}$GUIX_PACKAGE_PATH"
|
||||||
|
export GUIX_PACKAGE_PATH
|
||||||
|
|
||||||
|
LANG=
|
||||||
|
LC_ALL=
|
||||||
|
|
||||||
|
exec "$@"
|
|
@ -0,0 +1,90 @@
|
||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
# GNU Mes --- Maxwell Equations of Software
|
||||||
|
# Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
|
#
|
||||||
|
# This file is part of GNU Mes.
|
||||||
|
#
|
||||||
|
# GNU 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.
|
||||||
|
#
|
||||||
|
# GNU 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 GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if [ -n "$BUILD_DEBUG" ]; then
|
||||||
|
set -x
|
||||||
|
fi
|
||||||
|
|
||||||
|
mkdir -p src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
|
||||||
|
for GUILE_EFFECTIVE_VERSION in 2.2 2.0; do
|
||||||
|
if sudo apt-get install --no-install-recommends guile-$GUILE_EFFECTIVE_VERSION-dev; then
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
guile_site_dir=/usr/local/share/guile/site/$GUILE_EFFECTIVE_VERSION
|
||||||
|
guile_site_ccache_dir=/usr/local/lib/guile/$GUILE_EFFECTIVE_VERSION/site-ccache
|
||||||
|
GUILE_LOAD_PATH=$guile_site_dir
|
||||||
|
GUILE_LOAD_COMPILED_PATH=$guile_site_ccache_dir
|
||||||
|
export GUILE_LOAD_PATH
|
||||||
|
export GUILE_LOAD_COMPILED_PATH
|
||||||
|
|
||||||
|
sudo apt-get install --no-install-recommends build-essential ca-certificates help2man texinfo
|
||||||
|
|
||||||
|
# Nice to have
|
||||||
|
sudo apt-get install --no-install-recommends gcc-i686-linux-gnu || true
|
||||||
|
|
||||||
|
echo checking for M1
|
||||||
|
if ! command -v M1; then
|
||||||
|
if sudo apt-get install mescc-tools; then
|
||||||
|
echo yay
|
||||||
|
else
|
||||||
|
wget -O mescc-tools-Release_0.5.1.tar.gz https://github.com/oriansj/mescc-tools/archive/Release_0.5.1.tar.gz
|
||||||
|
tar xf mescc-tools-Release_0.5.1.tar.gz
|
||||||
|
cd mescc-tools-Release_0.5.1
|
||||||
|
make
|
||||||
|
make check
|
||||||
|
sudo make install
|
||||||
|
cd ..
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo checking for Nyacc
|
||||||
|
if ! guile -c '(use-modules (nyacc lalr)) (display *nyacc-version*) (newline)'; then
|
||||||
|
if sudo apt-get install --no-install-recommends nyacc; then
|
||||||
|
echo yay
|
||||||
|
else
|
||||||
|
wget -O nyacc-v0.80.43.tar.gz https://gitlab.com/janneke/nyacc/-/archive/v0.80.43/nyacc-v0.80.43.tar.gz
|
||||||
|
tar xf nyacc-v0.80.43.tar.gz
|
||||||
|
cd nyacc-v0.80.43
|
||||||
|
./configure --prefix=/usr/local
|
||||||
|
make
|
||||||
|
make check
|
||||||
|
sudo make install
|
||||||
|
cd ..
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo checking for mes
|
||||||
|
if ! command -v mes; then
|
||||||
|
sudo apt-get install --no-install-recommends git
|
||||||
|
git clone git://git.savannah.gnu.org/mes.git
|
||||||
|
cd mes
|
||||||
|
git checkout wip-gnu
|
||||||
|
./configure
|
||||||
|
make
|
||||||
|
make check
|
||||||
|
make install
|
||||||
|
fi
|
|
@ -0,0 +1,36 @@
|
||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
# GNU Mes --- Maxwell Equations of Software
|
||||||
|
# Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
|
#
|
||||||
|
# This file is part of GNU Mes.
|
||||||
|
#
|
||||||
|
# GNU 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.
|
||||||
|
#
|
||||||
|
# GNU 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 GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
. ${srcdest}build-aux/config.sh
|
||||||
|
. ${srcdest}build-aux/trace.sh
|
||||||
|
|
||||||
|
trace "SNARF$snarf gc.c" ${srcdest}build-aux/mes-snarf.scm src/gc.c
|
||||||
|
trace "SNARF$snarf hash.c" ${srcdest}build-aux/mes-snarf.scm src/hash.c
|
||||||
|
trace "SNARF$snarf lib.c" ${srcdest}build-aux/mes-snarf.scm src/lib.c
|
||||||
|
trace "SNARF$snarf math.c" ${srcdest}build-aux/mes-snarf.scm src/math.c
|
||||||
|
trace "SNARF$snarf mes.c" ${srcdest}build-aux/mes-snarf.scm src/mes.c
|
||||||
|
trace "SNARF$snarf module.c" ${srcdest}build-aux/mes-snarf.scm src/module.c
|
||||||
|
trace "SNARF$snarf posix.c" ${srcdest}build-aux/mes-snarf.scm src/posix.c
|
||||||
|
trace "SNARF$snarf reader.c" ${srcdest}build-aux/mes-snarf.scm src/reader.c
|
||||||
|
trace "SNARF$snarf strings.c" ${srcdest}build-aux/mes-snarf.scm src/string.c
|
||||||
|
trace "SNARF$snarf struct.c" ${srcdest}build-aux/mes-snarf.scm src/struct.c
|
||||||
|
trace "SNARF$snarf vector.c" ${srcdest}build-aux/mes-snarf.scm src/vector.c
|
|
@ -0,0 +1,38 @@
|
||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
# GNU Mes --- Maxwell Equations of Software
|
||||||
|
# Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
|
#
|
||||||
|
# This file is part of GNU Mes.
|
||||||
|
#
|
||||||
|
# GNU 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.
|
||||||
|
#
|
||||||
|
# GNU 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 GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if [ "$V" = 2 ]; then
|
||||||
|
set -x
|
||||||
|
fi
|
||||||
|
|
||||||
|
t=${1-scaffold/boot/00-zero.scm}
|
||||||
|
b=$(basename "$t" .scm)
|
||||||
|
|
||||||
|
if [ "$(basename $MES)" = guile ]; then
|
||||||
|
$MES -L ${srcdest}module -C module -L . -c '(begin (use-modules (mes guile)) (include-from-path "'"$t"'"))'
|
||||||
|
elif [ -z "${b/5[0-9]-*/}" ]; then
|
||||||
|
cat "$t" | MES_BOOT=boot-00.scm $MES
|
||||||
|
elif [ -z "${b/6[0-9]-*/}" ]; then
|
||||||
|
cat "$t" | MES_BOOT=boot-01.scm $MES
|
||||||
|
else
|
||||||
|
MES_BOOT=$t $MES;
|
||||||
|
fi
|
|
@ -0,0 +1,85 @@
|
||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
# GNU Mes --- Maxwell Equations of Software
|
||||||
|
# Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
|
#
|
||||||
|
# This file is part of GNU Mes.
|
||||||
|
#
|
||||||
|
# GNU 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.
|
||||||
|
#
|
||||||
|
# GNU 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 GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if test -z "$config_sh"; then
|
||||||
|
. ./config.sh
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$V" = 2 ]; then
|
||||||
|
set -x
|
||||||
|
fi
|
||||||
|
|
||||||
|
t=${1-lib/tests/scaffold/t.c}
|
||||||
|
b=$(dirname "$t")/$(basename "$t" .c)
|
||||||
|
o="$b"
|
||||||
|
o=lib/tests/${b#*lib/tests/}
|
||||||
|
if [ "$o" = "$b" ]; then
|
||||||
|
o=./$(basename "$t" .c)
|
||||||
|
fi
|
||||||
|
|
||||||
|
rm -f "$o"
|
||||||
|
CC=${CC-gcc}
|
||||||
|
|
||||||
|
i=$(basename "$t" .c)
|
||||||
|
if [ -z "${i/[012][0-9]-*/}" ]; then
|
||||||
|
LIBS=
|
||||||
|
elif [ -z "${i/[34][0-9]-*/}" ]; then
|
||||||
|
LIBS='-l c-mini'
|
||||||
|
elif [ -z "${i/[78][0-9a-z]-*/}" ]; then
|
||||||
|
LIBS='-l c+tcc'
|
||||||
|
elif [ -z "${i/9[0-9a-z]-*/}" ]; then
|
||||||
|
LIBS='-l c+gnu'
|
||||||
|
else
|
||||||
|
LIBS='-l c'
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test $mes_kernel = gnu\
|
||||||
|
&& test -z "$LIBS"; then
|
||||||
|
LIBS="-l c-mini"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test $mes_libc = system; then
|
||||||
|
crt1=
|
||||||
|
LIBS='-l mes'
|
||||||
|
else
|
||||||
|
crt1=crt1.o
|
||||||
|
fi
|
||||||
|
|
||||||
|
$CC -g -c $AM_CPPFLAGS $CPPFLAGS $AM_CFLAGS $CFLAGS -o "$o".o "$t"
|
||||||
|
$CC -g $AM_CFLAGS $CFLAGS $AM_LDFLAGS $LDFLAGS -L . -o "$o" $crt1 "$o".o $LIBS
|
||||||
|
|
||||||
|
set +e
|
||||||
|
timeout 10 "$o" -s --long file0 file1 > "$o".1 2> "$o".2
|
||||||
|
r=$?
|
||||||
|
set -e
|
||||||
|
if [ -f "$b".exit ]; then
|
||||||
|
e=$(cat "$b".exit)
|
||||||
|
else
|
||||||
|
e=0
|
||||||
|
fi
|
||||||
|
[ $r = $e ] || exit 1
|
||||||
|
if [ -f "$b".stdout ]; then
|
||||||
|
$DIFF -ub "$b".stdout "$o".1
|
||||||
|
fi
|
||||||
|
if [ -f "$b".stderr ]; then
|
||||||
|
$DIFF -ub "$b".stderr "$o".2
|
||||||
|
fi
|
|
@ -0,0 +1,148 @@
|
||||||
|
#!/bin/sh
|
||||||
|
# test-driver - basic testsuite driver script.
|
||||||
|
|
||||||
|
scriptversion=2018-03-07.03; # UTC
|
||||||
|
|
||||||
|
# Copyright (C) 2011-2018 Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# This program 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 2, or (at your option)
|
||||||
|
# any later version.
|
||||||
|
#
|
||||||
|
# This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
# As a special exception to the GNU General Public License, if you
|
||||||
|
# distribute this file as part of a program that contains a
|
||||||
|
# configuration script generated by Autoconf, you may include it under
|
||||||
|
# the same distribution terms that you use for the rest of that program.
|
||||||
|
|
||||||
|
# This file is maintained in Automake, please report
|
||||||
|
# bugs to <bug-automake@gnu.org> or send patches to
|
||||||
|
# <automake-patches@gnu.org>.
|
||||||
|
|
||||||
|
# Make unconditional expansion of undefined variables an error. This
|
||||||
|
# helps a lot in preventing typo-related bugs.
|
||||||
|
set -u
|
||||||
|
|
||||||
|
usage_error ()
|
||||||
|
{
|
||||||
|
echo "$0: $*" >&2
|
||||||
|
print_usage >&2
|
||||||
|
exit 2
|
||||||
|
}
|
||||||
|
|
||||||
|
print_usage ()
|
||||||
|
{
|
||||||
|
cat <<END
|
||||||
|
Usage:
|
||||||
|
test-driver --test-name=NAME --log-file=PATH --trs-file=PATH
|
||||||
|
[--expect-failure={yes|no}] [--color-tests={yes|no}]
|
||||||
|
[--enable-hard-errors={yes|no}] [--]
|
||||||
|
TEST-SCRIPT [TEST-SCRIPT-ARGUMENTS]
|
||||||
|
The '--test-name', '--log-file' and '--trs-file' options are mandatory.
|
||||||
|
END
|
||||||
|
}
|
||||||
|
|
||||||
|
test_name= # Used for reporting.
|
||||||
|
log_file= # Where to save the output of the test script.
|
||||||
|
trs_file= # Where to save the metadata of the test run.
|
||||||
|
expect_failure=no
|
||||||
|
color_tests=no
|
||||||
|
enable_hard_errors=yes
|
||||||
|
while test $# -gt 0; do
|
||||||
|
case $1 in
|
||||||
|
--help) print_usage; exit $?;;
|
||||||
|
--version) echo "test-driver $scriptversion"; exit $?;;
|
||||||
|
--test-name) test_name=$2; shift;;
|
||||||
|
--log-file) log_file=$2; shift;;
|
||||||
|
--trs-file) trs_file=$2; shift;;
|
||||||
|
--color-tests) color_tests=$2; shift;;
|
||||||
|
--expect-failure) expect_failure=$2; shift;;
|
||||||
|
--enable-hard-errors) enable_hard_errors=$2; shift;;
|
||||||
|
--) shift; break;;
|
||||||
|
-*) usage_error "invalid option: '$1'";;
|
||||||
|
*) break;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
missing_opts=
|
||||||
|
test x"$test_name" = x && missing_opts="$missing_opts --test-name"
|
||||||
|
test x"$log_file" = x && missing_opts="$missing_opts --log-file"
|
||||||
|
test x"$trs_file" = x && missing_opts="$missing_opts --trs-file"
|
||||||
|
if test x"$missing_opts" != x; then
|
||||||
|
usage_error "the following mandatory options are missing:$missing_opts"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test $# -eq 0; then
|
||||||
|
usage_error "missing argument"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test $color_tests = yes; then
|
||||||
|
# Keep this in sync with 'lib/am/check.am:$(am__tty_colors)'.
|
||||||
|
red='[0;31m' # Red.
|
||||||
|
grn='[0;32m' # Green.
|
||||||
|
lgn='[1;32m' # Light green.
|
||||||
|
blu='[1;34m' # Blue.
|
||||||
|
mgn='[0;35m' # Magenta.
|
||||||
|
std='[m' # No color.
|
||||||
|
else
|
||||||
|
red= grn= lgn= blu= mgn= std=
|
||||||
|
fi
|
||||||
|
|
||||||
|
do_exit='rm -f $log_file $trs_file; (exit $st); exit $st'
|
||||||
|
trap "st=129; $do_exit" 1
|
||||||
|
trap "st=130; $do_exit" 2
|
||||||
|
trap "st=141; $do_exit" 13
|
||||||
|
trap "st=143; $do_exit" 15
|
||||||
|
|
||||||
|
# Test script is run here.
|
||||||
|
"$@" >$log_file 2>&1
|
||||||
|
estatus=$?
|
||||||
|
|
||||||
|
if test $enable_hard_errors = no && test $estatus -eq 99; then
|
||||||
|
tweaked_estatus=1
|
||||||
|
else
|
||||||
|
tweaked_estatus=$estatus
|
||||||
|
fi
|
||||||
|
|
||||||
|
case $tweaked_estatus:$expect_failure in
|
||||||
|
0:yes) col=$red res=XPASS recheck=yes gcopy=yes;;
|
||||||
|
0:*) col=$grn res=PASS recheck=no gcopy=no;;
|
||||||
|
77:*) col=$blu res=SKIP recheck=no gcopy=yes;;
|
||||||
|
99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;;
|
||||||
|
*:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;;
|
||||||
|
*:*) col=$red res=FAIL recheck=yes gcopy=yes;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# Report the test outcome and exit status in the logs, so that one can
|
||||||
|
# know whether the test passed or failed simply by looking at the '.log'
|
||||||
|
# file, without the need of also peaking into the corresponding '.trs'
|
||||||
|
# file (automake bug#11814).
|
||||||
|
echo "$res $test_name (exit status: $estatus)" >>$log_file
|
||||||
|
|
||||||
|
# Report outcome to console.
|
||||||
|
echo "${col}${res}${std}: $test_name"
|
||||||
|
|
||||||
|
# Register the test result, and other relevant metadata.
|
||||||
|
echo ":test-result: $res" > $trs_file
|
||||||
|
echo ":global-test-result: $res" >> $trs_file
|
||||||
|
echo ":recheck: $recheck" >> $trs_file
|
||||||
|
echo ":copy-in-global-log: $gcopy" >> $trs_file
|
||||||
|
|
||||||
|
# Local Variables:
|
||||||
|
# mode: shell-script
|
||||||
|
# sh-indentation: 2
|
||||||
|
# eval: (add-hook 'before-save-hook 'time-stamp)
|
||||||
|
# time-stamp-start: "scriptversion="
|
||||||
|
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||||
|
# time-stamp-time-zone: "UTC0"
|
||||||
|
# time-stamp-end: "; # UTC"
|
||||||
|
# End:
|
|
@ -0,0 +1,143 @@
|
||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
# GNU Mes --- Maxwell Equations of Software
|
||||||
|
# Copyright © 2011-2018 Free Software Foundation, Inc.
|
||||||
|
# Copyright © 2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
|
#
|
||||||
|
# This file is part of GNU Mes.
|
||||||
|
#
|
||||||
|
# GNU 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.
|
||||||
|
#
|
||||||
|
# GNU 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 GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
# Adapted from GNU Automake
|
||||||
|
|
||||||
|
TEST_SUITE_LOG=test-suite.log
|
||||||
|
dry_run=false
|
||||||
|
create_global_log=cat
|
||||||
|
subdir=$(basename $(pwd))
|
||||||
|
|
||||||
|
TEST_LOGS=
|
||||||
|
for t in $TESTS; do
|
||||||
|
b=$(dirname $t)/$(basename $t $test_ext)
|
||||||
|
TEST_LOGS="$TEST_LOGS $b.log"
|
||||||
|
if test -e $b.log \
|
||||||
|
&& test -e $b.trs\
|
||||||
|
&& ! $recheck; then
|
||||||
|
echo `grep :test-result $b.trs | cut -d' ' -f 2`: $b
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
d=$(dirname $t)
|
||||||
|
case " `echo $XFAIL_TESTS` " in
|
||||||
|
*[\ \ ]$t[\ \ ]*)
|
||||||
|
fail=yes;;
|
||||||
|
*)
|
||||||
|
fail=no;;
|
||||||
|
esac
|
||||||
|
mkdir -p $d
|
||||||
|
${SHELL} ${srcdest}build-aux/test-driver\
|
||||||
|
--test-name $t \
|
||||||
|
--log-file $b.log\
|
||||||
|
--trs-file $b.trs\
|
||||||
|
--color-tests $colors\
|
||||||
|
--enable-hard-errors no\
|
||||||
|
--expect-failure $fail\
|
||||||
|
-- $log_compiler\
|
||||||
|
${srcdest}$t
|
||||||
|
done
|
||||||
|
|
||||||
|
if test $colors = yes; then
|
||||||
|
red='[0;31m'
|
||||||
|
grn='[0;32m'
|
||||||
|
lgn='[1;32m'
|
||||||
|
blu='[1;34m'
|
||||||
|
mgn='[0;35m'
|
||||||
|
brg='[1m'
|
||||||
|
std='[m'
|
||||||
|
else
|
||||||
|
mgn= red= grn= lgn= blu= brg= std=
|
||||||
|
fi
|
||||||
|
bases="$TEST_LOGS"
|
||||||
|
bases=`for i in $bases; do echo $i; done | sed 's/\.log$//'`
|
||||||
|
bases=`echo $bases`
|
||||||
|
ws='[ ]'
|
||||||
|
results=`for b in $bases; do echo $b.trs; done`
|
||||||
|
test -n "$results" || results=/dev/null
|
||||||
|
all=` grep "^$ws*:test-result:" $results | wc -l`
|
||||||
|
pass=` grep "^$ws*:test-result:$ws*PASS" $results | wc -l`
|
||||||
|
fail=` grep "^$ws*:test-result:$ws*FAIL" $results | wc -l`
|
||||||
|
skip=` grep "^$ws*:test-result:$ws*SKIP" $results | wc -l`
|
||||||
|
xfail=`grep "^$ws*:test-result:$ws*XFAIL" $results | wc -l`
|
||||||
|
xpass=`grep "^$ws*:test-result:$ws*XPASS" $results | wc -l`
|
||||||
|
error=`grep "^$ws*:test-result:$ws*ERROR" $results | wc -l`
|
||||||
|
if test `expr $fail + $xpass + $error` -eq 0; then
|
||||||
|
success=true
|
||||||
|
else
|
||||||
|
success=false
|
||||||
|
fi
|
||||||
|
br='==================='; br=$br$br$br$br
|
||||||
|
result_count ()
|
||||||
|
{
|
||||||
|
if test x"$1" = x"--maybe-color"; then
|
||||||
|
maybe_colorize=yes
|
||||||
|
elif test x"$1" = x"--no-color"; then
|
||||||
|
maybe_colorize=no
|
||||||
|
else
|
||||||
|
echo "$@: invalid 'result_count' usage" >&2; exit 4
|
||||||
|
fi
|
||||||
|
shift
|
||||||
|
desc=$1 count=$2
|
||||||
|
if test $maybe_colorize = yes && test $count -gt 0; then
|
||||||
|
color_start=$3 color_end=$std
|
||||||
|
else
|
||||||
|
color_start= color_end=
|
||||||
|
fi
|
||||||
|
echo "${color_start}# $desc $count${color_end}"
|
||||||
|
}
|
||||||
|
create_testsuite_report ()
|
||||||
|
{
|
||||||
|
result_count $1 "TOTAL:" $all "$brg"
|
||||||
|
result_count $1 "PASS: " $pass "$grn"
|
||||||
|
result_count $1 "SKIP: " $skip "$blu"
|
||||||
|
result_count $1 "XFAIL:" $xfail "$lgn"
|
||||||
|
result_count $1 "FAIL: " $fail "$red"
|
||||||
|
result_count $1 "XPASS:" $xpass "$red"
|
||||||
|
result_count $1 "ERROR:" $error "$mgn"
|
||||||
|
}
|
||||||
|
{
|
||||||
|
echo "${PACKAGE}: ${subdir}/${TEST_SUITE_LOG}"
|
||||||
|
create_testsuite_report --no-color
|
||||||
|
echo
|
||||||
|
echo
|
||||||
|
for b in $bases; do echo $b; done\
|
||||||
|
| $create_global_log
|
||||||
|
} >${TEST_SUITE_LOG}.tmp || exit 1
|
||||||
|
mv ${TEST_SUITE_LOG}.tmp ${TEST_SUITE_LOG}
|
||||||
|
if $success; then
|
||||||
|
col="$grn"
|
||||||
|
else
|
||||||
|
col="$red"
|
||||||
|
test x"$V" = x0 || cat ${TEST_SUITE_LOG}
|
||||||
|
fi
|
||||||
|
echo "${col}$br${std}"
|
||||||
|
echo "${col}Testsuite summary for ${PACKAGE_NAME}${std}"
|
||||||
|
echo "${col}$br${std}"
|
||||||
|
create_testsuite_report --maybe-color
|
||||||
|
echo "$col$br$std"
|
||||||
|
if $success; then :; else
|
||||||
|
echo "${col}See ${subdir}/${TEST_SUITE_LOG}${std}"
|
||||||
|
if test -n "${PACKAGE_BUGREPORT}"; then
|
||||||
|
echo "${col}Please report to ${PACKAGE_BUGREPORT}${std}"
|
||||||
|
fi
|
||||||
|
echo "$col$br$std"
|
||||||
|
fi
|
||||||
|
$success || exit 1
|
|
@ -0,0 +1,49 @@
|
||||||
|
# GNU Mes --- Maxwell Equations of Software
|
||||||
|
# Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
|
#
|
||||||
|
# This file is part of GNU Mes.
|
||||||
|
#
|
||||||
|
# GNU 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.
|
||||||
|
#
|
||||||
|
# GNU 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 GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
LOG=
|
||||||
|
if [ -z "$V" -o "$V" = 0 ]; then
|
||||||
|
trace () {
|
||||||
|
echo " $1"
|
||||||
|
shift
|
||||||
|
echo "$@" >> build.log
|
||||||
|
eval "$@ $LOG"
|
||||||
|
cat .log 1>&2
|
||||||
|
cat .log >> build.log
|
||||||
|
}
|
||||||
|
LOG=" >.log 2>&1"
|
||||||
|
fi
|
||||||
|
if [ "$V" = 1 ]; then
|
||||||
|
trace () {
|
||||||
|
shift
|
||||||
|
echo "$@"
|
||||||
|
echo "$@" >> build.log
|
||||||
|
eval "$@ $LOG"
|
||||||
|
cat .log 1>&2
|
||||||
|
cat .log >> build.log
|
||||||
|
}
|
||||||
|
LOG=" >.log 2>&1"
|
||||||
|
fi
|
||||||
|
if [ "$V" = 2 ]; then
|
||||||
|
set -x
|
||||||
|
trace () {
|
||||||
|
shift
|
||||||
|
echo "$@" >> build.log
|
||||||
|
eval "$@"
|
||||||
|
}
|
||||||
|
fi
|
|
@ -0,0 +1,96 @@
|
||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
# GNU Mes --- Maxwell Equations of Software
|
||||||
|
# Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
|
#
|
||||||
|
# This file is part of GNU Mes.
|
||||||
|
#
|
||||||
|
# GNU 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.
|
||||||
|
#
|
||||||
|
# GNU 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 GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
#set -e
|
||||||
|
|
||||||
|
. ./config.sh
|
||||||
|
|
||||||
|
v=
|
||||||
|
_v=
|
||||||
|
if test "$V" = 2; then
|
||||||
|
set -x
|
||||||
|
fi
|
||||||
|
if test "$V" -gt 0; then
|
||||||
|
v=v
|
||||||
|
_v=-v
|
||||||
|
fi
|
||||||
|
|
||||||
|
set -u
|
||||||
|
|
||||||
|
rm ${DESTDIR}${bindir}/mes
|
||||||
|
rm ${DESTDIR}${bindir}/ar
|
||||||
|
rm ${DESTDIR}${bindir}/mescc
|
||||||
|
rm ${DESTDIR}${bindir}/mescc.scm
|
||||||
|
rm ${DESTDIR}${bindir}/diff.scm
|
||||||
|
rmdir ${DESTDIR}${bindir} || :
|
||||||
|
|
||||||
|
rm -r ${DESTDIR}${libdir}/$mes_cpu-mes
|
||||||
|
rm ${DESTDIR}${libdir}/libc-mini.a
|
||||||
|
rm ${DESTDIR}${libdir}/libmes.a
|
||||||
|
if cmp gcc-lib/libc.a ${DESTDIR}${libdir}/libc.a; then
|
||||||
|
rm ${DESTDIR}${libdir}/libc.a
|
||||||
|
fi
|
||||||
|
if cmp gcc-lib/libtcc1.a ${DESTDIR}${libdir}/libtcc1.a; then
|
||||||
|
rm ${DESTDIR}${libdir}/libtcc1.a
|
||||||
|
fi
|
||||||
|
rm ${DESTDIR}${libdir}/libc+tcc.a
|
||||||
|
rm ${DESTDIR}${libdir}/libc+gnu.a
|
||||||
|
|
||||||
|
rm -r ${DESTDIR}${includedir}/mes
|
||||||
|
rm $(grep -lr _MES_ ${DESTDIR}${includedir})
|
||||||
|
rmdir ${DESTDIR}${includedir}/linux/x86
|
||||||
|
rmdir ${DESTDIR}${includedir}/linux/x86_64
|
||||||
|
rmdir ${DESTDIR}${includedir}/linux
|
||||||
|
rmdir -p ${DESTDIR}${includedir}/sys
|
||||||
|
|
||||||
|
for i in\
|
||||||
|
AUTHORS\
|
||||||
|
BOOTSTRAP\
|
||||||
|
COPYING\
|
||||||
|
ChangeLog\
|
||||||
|
HACKING\
|
||||||
|
INSTALL\
|
||||||
|
NEWS\
|
||||||
|
README\
|
||||||
|
;do
|
||||||
|
rm ${DESTDIR}${docdir}/$i || :;
|
||||||
|
done
|
||||||
|
|
||||||
|
rm -r ${DESTDIR}${pkgdatadir}
|
||||||
|
rm -r ${DESTDIR}${guile_site_ccache_dir}/mes
|
||||||
|
rm -r ${DESTDIR}${guile_site_ccache_dir}/mescc
|
||||||
|
|
||||||
|
rm -r ${DESTDIR}${guile_site_dir}/mes
|
||||||
|
rm ${DESTDIR}${guile_site_dir}/mescc.scm
|
||||||
|
rm -r ${DESTDIR}${guile_site_dir}/mescc
|
||||||
|
|
||||||
|
rm ${DESTDIR}${infodir}/dir
|
||||||
|
rm ${DESTDIR}${infodir}/mes.info*
|
||||||
|
rm ${DESTDIR}${infodir}/images/gcc-mesboot*
|
||||||
|
rm ${DESTDIR}${infodir}/images/README
|
||||||
|
rm ${DESTDIR}${mandir}/man1/mes.1
|
||||||
|
rm ${DESTDIR}${mandir}/man1/mescc.1
|
||||||
|
|
||||||
|
rmdir -p ${DESTDIR}${docdir}
|
||||||
|
rmdir -p ${DESTDIR}${infodir}/images
|
||||||
|
rmdir -p ${DESTDIR}${guile_site_dir}
|
||||||
|
rmdir -p ${DESTDIR}${guile_site_ccache_dir}
|
||||||
|
rmdir -p ${DESTDIR}${mandir}/man1
|
||||||
|
true
|
|
@ -0,0 +1,715 @@
|
||||||
|
#! /bin/sh
|
||||||
|
# -*-scheme-*-
|
||||||
|
MES_ARENA=100000000 exec ${SCHEME-guile} -L . --no-auto-compile -e '(configure)' -s "$0" ${1+"$@"}
|
||||||
|
!#
|
||||||
|
|
||||||
|
;;; GNU Mes --- Maxwell Equations of Software
|
||||||
|
;;; Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
|
;;;
|
||||||
|
;;; configure: This file is part of GNU Mes.
|
||||||
|
;;;
|
||||||
|
;;; GNU 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.
|
||||||
|
;;;
|
||||||
|
;;; GNU 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 GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
(define-module (configure)
|
||||||
|
#:use-module (srfi srfi-1)
|
||||||
|
#:use-module (srfi srfi-9)
|
||||||
|
#:use-module (srfi srfi-9 gnu)
|
||||||
|
#:use-module (srfi srfi-26)
|
||||||
|
#:use-module (ice-9 getopt-long)
|
||||||
|
#:use-module (ice-9 optargs)
|
||||||
|
#:use-module (ice-9 popen)
|
||||||
|
#:use-module (ice-9 rdelim)
|
||||||
|
#:export (main))
|
||||||
|
|
||||||
|
(define *shell* "sh")
|
||||||
|
(define PACKAGE "mes")
|
||||||
|
(define PACKAGE-NAME "GNU Mes")
|
||||||
|
(define PACKAGE-BUGREPORT "bug-mes@gnu.org")
|
||||||
|
(define VERSION "0.22")
|
||||||
|
|
||||||
|
(cond-expand
|
||||||
|
(guile)
|
||||||
|
(mes (mes-use-module (srfi srfi-1))
|
||||||
|
(mes-use-module (srfi srfi-9))
|
||||||
|
(mes-use-module (srfi srfi-9 gnu))
|
||||||
|
(mes-use-module (srfi srfi-26))
|
||||||
|
(mes-use-module (mes getopt-long))
|
||||||
|
(mes-use-module (mes guile))
|
||||||
|
(mes-use-module (mes misc))
|
||||||
|
(mes-use-module (mes optargs))
|
||||||
|
(define %host-type "x86_64-unknown-linux-gnu")
|
||||||
|
(define OPEN_READ "r")
|
||||||
|
(define (canonicalize-path o)
|
||||||
|
(if (string-prefix? "/" o) o
|
||||||
|
(string-append (getcwd) "/" o)))
|
||||||
|
(define (sort lst less)
|
||||||
|
lst)
|
||||||
|
(define (close-pipe o) 0)
|
||||||
|
(define (open-pipe* OPEN_READ . commands)
|
||||||
|
(let ((fake-pipe ".pipe"))
|
||||||
|
(with-output-to-file fake-pipe
|
||||||
|
(lambda _
|
||||||
|
(let ((status (apply system* (append commands))))
|
||||||
|
(set! close-pipe (lambda _ status)))))
|
||||||
|
(open-input-file fake-pipe)))))
|
||||||
|
|
||||||
|
(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)))
|
||||||
|
|
||||||
|
;;; 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)))
|
||||||
|
|
||||||
|
(define %verbose? #f)
|
||||||
|
|
||||||
|
(define (verbose string . rest)
|
||||||
|
(if %verbose? (apply stderr (cons string rest))))
|
||||||
|
|
||||||
|
(define (gulp-pipe command)
|
||||||
|
(let* ((err (current-error-port))
|
||||||
|
(foo (set-current-error-port (open-output-file ".error")))
|
||||||
|
(port (open-pipe command "r"))
|
||||||
|
(output (read-string port))
|
||||||
|
(status (close-pipe port))
|
||||||
|
(error (with-input-from-file ".error" read-string)))
|
||||||
|
(when (file-exists? ".error")
|
||||||
|
(delete-file ".error"))
|
||||||
|
(set-current-error-port err)
|
||||||
|
(verbose "command[~a]: ~s => ~a [~a]\n" status command output error)
|
||||||
|
(if (not (zero? status)) ""
|
||||||
|
(string-trim-right (string-append output error)))))
|
||||||
|
|
||||||
|
(define (gulp-pipe* . command)
|
||||||
|
(gulp-pipe (string-join command)))
|
||||||
|
|
||||||
|
(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)))
|
||||||
|
|
||||||
|
(define (conjoin . predicates)
|
||||||
|
(lambda (. arguments)
|
||||||
|
(every (cut apply <> arguments) predicates)))
|
||||||
|
|
||||||
|
(define (char->char from to char)
|
||||||
|
(if (eq? char from) to char))
|
||||||
|
|
||||||
|
(define (string-replace-char string from to)
|
||||||
|
(string-map (cut char->char from to <>) string))
|
||||||
|
|
||||||
|
(define (string-replace-string string from to)
|
||||||
|
(cond ((string-contains string from)
|
||||||
|
=> (lambda (i) (string-replace string to i (+ i (string-length from)))))
|
||||||
|
(else string)))
|
||||||
|
|
||||||
|
(define (string-replace-string/all string from to)
|
||||||
|
(or (and=> (string-contains string from)
|
||||||
|
(lambda (i)
|
||||||
|
(string-append
|
||||||
|
(substring string 0 i)
|
||||||
|
to
|
||||||
|
(string-replace-string/all
|
||||||
|
(substring string (+ i (string-length from))) from to))))
|
||||||
|
string))
|
||||||
|
|
||||||
|
;;; Configure
|
||||||
|
|
||||||
|
(define-immutable-record-type <dependency>
|
||||||
|
(make-dependency name version-expected optional? version-option commands file-name data version-found)
|
||||||
|
dependency?
|
||||||
|
(name dependency-name)
|
||||||
|
(version-expected dependency-version-expected)
|
||||||
|
(optional? dependency-optional?)
|
||||||
|
(version-option dependency-version-option)
|
||||||
|
(commands dependency-commands)
|
||||||
|
(file-name dependency-file-name)
|
||||||
|
(data dependency-data)
|
||||||
|
(version-found dependency-version-found))
|
||||||
|
|
||||||
|
(define* (make-dep name #:key (version '()) optional? (version-option "--version") (commands (list name)) file-name data)
|
||||||
|
(let* ((env-var (getenv (name->shell-name name)))
|
||||||
|
(commands (if env-var (cons env-var commands) commands)))
|
||||||
|
(make-dependency name version optional? version-option commands file-name data #f)))
|
||||||
|
|
||||||
|
(define (find-dep name deps)
|
||||||
|
(find (compose (cut equal? <> name) dependency-name) deps))
|
||||||
|
|
||||||
|
(define (file-name name deps)
|
||||||
|
(and=> (find-dep name deps) dependency-file-name))
|
||||||
|
|
||||||
|
(define (variable-name dependency)
|
||||||
|
(and=>
|
||||||
|
(dependency-name dependency)
|
||||||
|
name->shell-name))
|
||||||
|
|
||||||
|
(define (name->shell-name name)
|
||||||
|
(string-upcase (string-replace-char name #\- #\_)))
|
||||||
|
|
||||||
|
(define (->string o)
|
||||||
|
(cond ((number? o) (number->string o))
|
||||||
|
((string? o) o)
|
||||||
|
(else (format #f "~a" o))))
|
||||||
|
|
||||||
|
(define (version->string version)
|
||||||
|
(and version (string-join (map ->string version) ".")))
|
||||||
|
|
||||||
|
(define (string->version string)
|
||||||
|
(let ((split (string-tokenize string
|
||||||
|
(char-set-adjoin char-set:digit #\.))))
|
||||||
|
(and (pair? split)
|
||||||
|
(let* ((version (sort split (lambda (a b)
|
||||||
|
(let ((len-a (length (string-split a #\.)))
|
||||||
|
(len-b (length (string-split b #\.))))
|
||||||
|
(cond ((> len-a len-b) #t)
|
||||||
|
((< len-a len-b) #f)
|
||||||
|
(else (> (string-length a) (string-length b))))))))
|
||||||
|
(version (car version))
|
||||||
|
(version (string-tokenize version
|
||||||
|
(char-set-complement (char-set #\.)))))
|
||||||
|
(map string->number version)))))
|
||||||
|
|
||||||
|
(define (check-program-version dependency)
|
||||||
|
(let ((name (dependency-name dependency))
|
||||||
|
(expected (dependency-version-expected dependency))
|
||||||
|
(version-option (dependency-version-option dependency))
|
||||||
|
(commands (dependency-commands dependency)))
|
||||||
|
(let loop ((commands commands))
|
||||||
|
(if (or (null? commands)
|
||||||
|
(not (car commands))) dependency
|
||||||
|
(let ((command (car commands)))
|
||||||
|
(stdout "checking for ~a~a... " (if (string-index command #\space) name command)
|
||||||
|
(if (null? expected) ""
|
||||||
|
(format #f " [~a]" (version->string expected))))
|
||||||
|
(let* ((output (gulp-pipe (string-append command " " (if version-option version-option ""))))
|
||||||
|
(actual (string->version output))
|
||||||
|
(pass? (and actual (tuple< expected actual)))
|
||||||
|
(dependency (set-field dependency (dependency-version-found) actual)))
|
||||||
|
(stdout "~a ~a\n" (if pass? (if (pair? actual) "" "yes")
|
||||||
|
(if actual " no, found" "no"))
|
||||||
|
(or (version->string actual) ""))
|
||||||
|
(if pass? (let ((file-name (or (PATH-search-path command)
|
||||||
|
(dependency-file-name dependency))))
|
||||||
|
(set-field dependency (dependency-file-name) file-name))
|
||||||
|
(loop (cdr commands)))))))))
|
||||||
|
|
||||||
|
(define (check-file dependency)
|
||||||
|
(stdout "checking for ~a... " (dependency-name dependency))
|
||||||
|
(let ((file-name (and (file-exists? (dependency-file-name dependency))
|
||||||
|
(dependency-file-name dependency))))
|
||||||
|
(stdout "~a\n" (or file-name ""))
|
||||||
|
(set-field dependency (dependency-file-name) file-name)))
|
||||||
|
|
||||||
|
(define* (check-header-c cc dependency #:optional (check check-preprocess-header-c))
|
||||||
|
(let ((name (dependency-name dependency)))
|
||||||
|
(stderr "checking for ~a..." name)
|
||||||
|
(let ((result (check cc name)))
|
||||||
|
(when (file-exists? ".config.c")
|
||||||
|
(delete-file ".config.c"))
|
||||||
|
(stderr " ~a\n" (if result "yes" "no"))
|
||||||
|
(if result (set-field dependency (dependency-file-name) name)
|
||||||
|
dependency))))
|
||||||
|
|
||||||
|
(define* (check-compile-c cc dependency #:optional (check check-compile-string-c))
|
||||||
|
(let ((name (dependency-name dependency)))
|
||||||
|
(stderr "checking for ~a..." name)
|
||||||
|
(let ((result (check cc (dependency-data dependency))))
|
||||||
|
(when (file-exists? ".config.c")
|
||||||
|
(delete-file ".config.c"))
|
||||||
|
(stderr " ~a\n" (if result "yes" "no"))
|
||||||
|
(if result (set-field dependency (dependency-file-name) name)
|
||||||
|
dependency))))
|
||||||
|
|
||||||
|
(define* (check-link-c cc dependency #:optional (check check-link-string-c))
|
||||||
|
(let ((name (dependency-name dependency)))
|
||||||
|
(stderr "checking for ~a..." name)
|
||||||
|
(let ((result (check cc (dependency-data dependency))))
|
||||||
|
(when (file-exists? ".config.c")
|
||||||
|
(delete-file ".config.c"))
|
||||||
|
(stderr " ~a\n" (if result "yes" "no"))
|
||||||
|
(if result (set-field dependency (dependency-file-name) name)
|
||||||
|
dependency))))
|
||||||
|
|
||||||
|
(define (cflags-list)
|
||||||
|
(let ((cflags (getenv "CFLAGS")))
|
||||||
|
(if cflags (list cflags)
|
||||||
|
'())))
|
||||||
|
|
||||||
|
(define (ldflags-list)
|
||||||
|
(let ((ldflags (getenv "LDFLAGS")))
|
||||||
|
(if ldflags (list ldflags)
|
||||||
|
'())))
|
||||||
|
|
||||||
|
(define (check-preprocess-header-c cc header)
|
||||||
|
(with-output-to-file ".config.c"
|
||||||
|
(cut format #t "#include \"~a\"" header))
|
||||||
|
(let ((test (lambda _ (apply system* `(,cc "-E" "-o" ".config.E" ,@(cflags-list) ".config.c")))))
|
||||||
|
(zero? (if %verbose? (test)
|
||||||
|
(with-error-to-file "/dev/null"
|
||||||
|
test)))))
|
||||||
|
|
||||||
|
(define (check-compile-string-c cc string)
|
||||||
|
(with-output-to-file ".config.c"
|
||||||
|
(cut display string))
|
||||||
|
(let ((test (lambda _ (apply system* `(,cc "-std=gnu99" "-c" "-o" ".config.o" ,@(cflags-list) ".config.c")))))
|
||||||
|
(zero? (if %verbose? (test)
|
||||||
|
(with-error-to-file "/dev/null"
|
||||||
|
test)))))
|
||||||
|
|
||||||
|
(define (check-link-string-c cc string)
|
||||||
|
(with-output-to-file ".config.c"
|
||||||
|
(cut display string))
|
||||||
|
(let ((test (lambda _ (apply system* `(,cc "-std=gnu99" "-o" ".config" ,@(cflags-list) ,@(ldflags-list) ".config.c")))))
|
||||||
|
(zero? (if %verbose? (test)
|
||||||
|
(with-error-to-file "/dev/null"
|
||||||
|
test)))))
|
||||||
|
|
||||||
|
(define (parse-opts args)
|
||||||
|
(let* ((option-spec
|
||||||
|
'((build (value #t))
|
||||||
|
(host (value #t))
|
||||||
|
|
||||||
|
(prefix (value #t))
|
||||||
|
(program-prefix (value #t))
|
||||||
|
(bindir (value #t))
|
||||||
|
(datadir (value #t))
|
||||||
|
(docdir (value #t))
|
||||||
|
(includedir (value #t))
|
||||||
|
(libdir (value #t))
|
||||||
|
(srcdir (value #t))
|
||||||
|
(sysconfdir (value #t))
|
||||||
|
|
||||||
|
(mes)
|
||||||
|
(help (single-char #\h))
|
||||||
|
(verbose (single-char #\v))
|
||||||
|
(with-bootstrap)
|
||||||
|
(with-cheating)
|
||||||
|
(with-courage)
|
||||||
|
(infodir (value #t))
|
||||||
|
(mandir (value #t))
|
||||||
|
(disable-colors)
|
||||||
|
(enable-colors)
|
||||||
|
(disable-silent-rules)
|
||||||
|
(enable-silent-rules)
|
||||||
|
(with-system-libc)
|
||||||
|
|
||||||
|
(enable-fast-install) ; Ignored for Guix
|
||||||
|
(mandir (value #t)) ; Ignored for Debian
|
||||||
|
(localstatedir (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
|
||||||
|
)))
|
||||||
|
|
||||||
|
(getopt-long args option-spec)))
|
||||||
|
|
||||||
|
(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:
|
||||||
|
-h, --help display this help
|
||||||
|
--build=BUILD configure for building on BUILD [guessed]
|
||||||
|
--colors no colorized output
|
||||||
|
--disable-silent-rules
|
||||||
|
verbose build output [V=1]
|
||||||
|
--host=HOST cross-compile to build programs to run on HOST [BUILD]
|
||||||
|
-v, --verbose be verbose
|
||||||
|
--with-bootstrap After building mes with CC, build mes with MesCC
|
||||||
|
--with-courage Assert that even if this platform is unsupported,
|
||||||
|
you will be courageous and port GNU Mes to it
|
||||||
|
(see \"Porting GNU Mes\" in the manual.)
|
||||||
|
--with-cheating cheat using Guile instead of Mes
|
||||||
|
--with-system-libc use system libc
|
||||||
|
|
||||||
|
Installation directories:
|
||||||
|
--prefix=DIR install in prefix DIR [~a]
|
||||||
|
|
||||||
|
--bindir=DIR user executables [PREFIX/bin]
|
||||||
|
--includedir=DIR C header files [PREFIX/include]
|
||||||
|
--infodir=DIR info documentation [PREFIX/share/info]
|
||||||
|
--libdir=DIR object code libraries [EPREFIX/lib]
|
||||||
|
--mandir=DIR man pages [PREFIX/share/man]
|
||||||
|
|
||||||
|
Program names:
|
||||||
|
--program-prefix=PREFIX prepend PREFIX to installed program names
|
||||||
|
--program-suffix=SUFFIX append SUFFIX to installed program names
|
||||||
|
|
||||||
|
Ignored for Guix:
|
||||||
|
--enable-fast-install
|
||||||
|
|
||||||
|
Ignored for Debian:
|
||||||
|
--disable-dependency-tracking
|
||||||
|
--disable-maintainer-mode
|
||||||
|
--libexecdir=DIR
|
||||||
|
--localstatedir=DIR
|
||||||
|
--runstatedir=DIR
|
||||||
|
|
||||||
|
Some influential environment variables:
|
||||||
|
CC C compiler command
|
||||||
|
CFLAGS C compiler flags
|
||||||
|
CPPFLAGS C preprocessor flags
|
||||||
|
LDFLAGS C linker flags
|
||||||
|
GUILE guile command
|
||||||
|
GUILD guild command
|
||||||
|
GUILE_LOAD_PATH guile load path; where to find Nyacc
|
||||||
|
MES_FOR_BUILD build system MES [can be mes or guile]
|
||||||
|
" PACKAGE VERSION (getenv "prefix")))
|
||||||
|
|
||||||
|
(define (main args)
|
||||||
|
(let* ((options (parse-opts args))
|
||||||
|
(build-type (option-ref options 'build %host-type))
|
||||||
|
(host-type (option-ref options 'host build-type))
|
||||||
|
|
||||||
|
(prefix "/usr/local")
|
||||||
|
(prefix (option-ref options 'prefix prefix))
|
||||||
|
(program-prefix (option-ref options 'program-prefix ""))
|
||||||
|
(program-suffix (option-ref options 'program-suffix ""))
|
||||||
|
(infodir (option-ref options 'infodir "${prefix}/share/info"))
|
||||||
|
(mandir (option-ref options 'mandir "${prefix}/share/man"))
|
||||||
|
(sysconfdir (option-ref options 'sysconfdir "${prefix}/etc"))
|
||||||
|
|
||||||
|
(bindir (option-ref options 'bindir "${prefix}/bin"))
|
||||||
|
(datadir (option-ref options 'datadir "${prefix}/share"))
|
||||||
|
(docdir (option-ref options 'docdir "${datadir}/doc/mes"))
|
||||||
|
(includedir (option-ref options 'includedir "${prefix}/include"))
|
||||||
|
(libdir (option-ref options 'libdir "${prefix}/lib"))
|
||||||
|
(pkgdatadir (string-append datadir "/mes"))
|
||||||
|
(guile-load-path (if (and (pair? %load-path) (equal? (car %load-path) ".")) (cdr %load-path)
|
||||||
|
%load-path))
|
||||||
|
(guile-effective-version (effective-version))
|
||||||
|
(guile-site-dir (if (equal? prefix ".") (canonicalize-path ".")
|
||||||
|
(string-append prefix "/share/guile/site/" guile-effective-version)))
|
||||||
|
(guile-site-ccache-dir (if (equal? prefix ".") (canonicalize-path ".")
|
||||||
|
(string-append prefix "/lib/guile/" guile-effective-version "/site-ccache")))
|
||||||
|
|
||||||
|
(srcdir (dirname (car (command-line))))
|
||||||
|
(srcdest (if (equal? srcdir ".") ""
|
||||||
|
(string-append srcdir "/")))
|
||||||
|
(abs-top-srcdir (canonicalize-path srcdir))
|
||||||
|
(abs-top-builddir (canonicalize-path (getcwd)))
|
||||||
|
(top-builddir (if (equal? srcdir ".") "."
|
||||||
|
abs-top-builddir))
|
||||||
|
|
||||||
|
(with-bootstrap? (option-ref options 'with-bootstrap #f))
|
||||||
|
(with-cheating? (option-ref options 'with-cheating #f))
|
||||||
|
(with-courage? (option-ref options 'with-courage #f))
|
||||||
|
(disable-colors? (option-ref options 'disable-colors #f))
|
||||||
|
(enable-colors? (option-ref options 'enable-colors #f))
|
||||||
|
(disable-silent-rules? (option-ref options 'disable-silent-rules #f))
|
||||||
|
(enable-silent-rules? (option-ref options 'enable-silent-rules #f))
|
||||||
|
(with-system-libc? (option-ref options 'with-system-libc #f))
|
||||||
|
(vars (filter (cut string-index <> #\=) (option-ref options '() '())))
|
||||||
|
(help? (option-ref options 'help #f))
|
||||||
|
(mes? (option-ref options 'mes #f)))
|
||||||
|
(when help?
|
||||||
|
(print-help)
|
||||||
|
(exit 0))
|
||||||
|
(set! %verbose? (option-ref options 'verbose #f))
|
||||||
|
(when %verbose?
|
||||||
|
(stderr "configure args=~s\n" args))
|
||||||
|
(for-each (lambda (v) (apply setenv (string-split v #\=))) vars)
|
||||||
|
(let* ((cross? (not (equal? host-type build-type)))
|
||||||
|
(gcc (if cross? (string-append host-type "-" "gcc") "gcc"))
|
||||||
|
(tcc (if cross? (string-append host-type "-" "tcc") "tcc"))
|
||||||
|
(mescc (if cross? (string-append host-type "-" "mescc") "mescc"))
|
||||||
|
(deps (fold (lambda (program results)
|
||||||
|
(cons (check-program-version program) results))
|
||||||
|
'()
|
||||||
|
(list (make-dep "hex2")
|
||||||
|
(make-dep "M1")
|
||||||
|
(make-dep "blood-elf")
|
||||||
|
(make-dep "diff" #:optional? #t)
|
||||||
|
(make-dep "guile" #:version '(2 0) #:commands '("guile-2.2" "guile-2.0" "guile-2" "guile") #:optional? #t)
|
||||||
|
(make-dep "mes" #:version '(0 20) #:optional? #t)
|
||||||
|
(make-dep "guix" #:version '() #:optional? #t)
|
||||||
|
(make-dep "ar" #:version '(2 10) #:optional? #t)
|
||||||
|
(make-dep "sh" #:optional? #t)
|
||||||
|
(make-dep "bash" #:version '(2 0) #:optional? #t)
|
||||||
|
(make-dep "guild" #:version '(2 0) #:commands '("guild" "guile-tools" "true"))
|
||||||
|
(make-dep "CC" #:commands `(,(getenv "CC")) #:optional? #t)
|
||||||
|
(make-dep "CC-v" #:commands `(,(getenv "CC")) #:optional? #t #:version-option "-v")
|
||||||
|
(make-dep "cc" #:commands '("cc") #:optional? #t)
|
||||||
|
(make-dep "gcc" #:commands `(,gcc "gcc") #:optional? #t)
|
||||||
|
(make-dep "mescc" #:commands `(,mescc "mescc") #:optional? #t)
|
||||||
|
(make-dep "tcc" #:commands `(,tcc "tcc") #:optional? #t #:version-option "-v")
|
||||||
|
(make-dep "cc-v" #:commands '("cc") #:optional? #t #:version-option "-v")
|
||||||
|
(make-dep "make" #:optional? #t #:commands '("gmake" "make"))
|
||||||
|
(make-dep "makeinfo" #:version '(6) #:optional? #t)
|
||||||
|
(make-dep "dot" #:version-option "-V" #:optional? #t)
|
||||||
|
(make-dep "help2man" #:version '(1 47) #:optional? #t)
|
||||||
|
(make-dep "perl" #:version '(5) #:optional? #t))))
|
||||||
|
(guile (file-name "guile" deps))
|
||||||
|
(deps (if guile (cons (check-program-version (make-dep "nyacc" #:version '(0 99 0) #:commands (list (string-append guile " -c '(use-modules (nyacc lalr)) (display *nyacc-version*)'")) #:file-name #t #:version-option #f))
|
||||||
|
deps)
|
||||||
|
deps))
|
||||||
|
(guile (or guile "guile"))
|
||||||
|
(cc (or (file-name "CC" deps)
|
||||||
|
(file-name "CC-v" deps)
|
||||||
|
(file-name "tcc" deps)
|
||||||
|
(file-name "gcc" deps)
|
||||||
|
(file-name "cc" deps)
|
||||||
|
(file-name "cc-v" deps)
|
||||||
|
(file-name "mescc" deps)))
|
||||||
|
(deps (if cc
|
||||||
|
(cons* (check-header-c cc (make-dep "limits.h"))
|
||||||
|
(check-header-c cc (make-dep "stdio.h" #:optional? #t))
|
||||||
|
deps)
|
||||||
|
deps))
|
||||||
|
(missing (filter (conjoin (negate dependency-file-name)
|
||||||
|
(negate dependency-optional?)) deps))
|
||||||
|
(deps (if cc
|
||||||
|
(cons (check-compile-c cc (make-dep "cc is GNU C" #:data "#if !defined (__GNUC__)
|
||||||
|
#error no gnuc
|
||||||
|
#endif
|
||||||
|
"))
|
||||||
|
deps)
|
||||||
|
deps))
|
||||||
|
(gcc? (file-name "cc is GNU C" deps))
|
||||||
|
(deps (if cc
|
||||||
|
(cons (check-compile-c cc (make-dep "cc is Mes C" #:data "#if !defined (__MESC__)
|
||||||
|
#error no mesc
|
||||||
|
#endif
|
||||||
|
"))
|
||||||
|
deps)
|
||||||
|
deps))
|
||||||
|
(mesc? (file-name "cc is MES C" deps))
|
||||||
|
(deps (if cc
|
||||||
|
(cons (check-compile-c cc (make-dep "cc is Tiny C" #:data "#if !defined (__TINYC__)
|
||||||
|
#error no tinycc
|
||||||
|
#endif
|
||||||
|
"))
|
||||||
|
deps)
|
||||||
|
deps))
|
||||||
|
(tcc? (file-name "cc is Tiny C" deps))
|
||||||
|
(deps (if cc
|
||||||
|
(cons (check-link-c cc (make-dep "whether cc can create executables" #:data "int main () {return 0;}"))
|
||||||
|
deps)
|
||||||
|
deps))
|
||||||
|
(system-libc? (and with-system-libc? (file-name "if cc can create executables" deps)))
|
||||||
|
(host-type (or (and cc (let ((dump (gulp-pipe* cc "-dumpmachine")))
|
||||||
|
(and (not (string-null? dump)) dump))) host-type))
|
||||||
|
(host-type-list (string-split host-type #\-))
|
||||||
|
(mes-cpu (car host-type-list))
|
||||||
|
(mes-cpu (cond ((member mes-cpu '("i386" "i486" "i586" "i686")) "x86")
|
||||||
|
((member mes-cpu '("arm" "armv4" "armv7l")) "arm")
|
||||||
|
(else mes-cpu)))
|
||||||
|
(mes-bits (if (member mes-cpu '("x86_64")) "64"
|
||||||
|
"32"))
|
||||||
|
(mes-libc (if system-libc? "system" "mes"))
|
||||||
|
(mes-kernel (car (filter
|
||||||
|
(compose not
|
||||||
|
(cut member <> '("pc" "portbld" "unknown")))
|
||||||
|
(cdr host-type-list))))
|
||||||
|
(mes-kernel (if (string-prefix? "freebsd" mes-kernel) "freebsd" mes-kernel))
|
||||||
|
(mes-compiler (cond (gcc? "gcc") (tcc? "gcc") (else "mescc")))
|
||||||
|
(mes-system (string-join (list mes-cpu mes-kernel "mes") "-"))
|
||||||
|
(bash (or (and (file-exists? "/bin/bash") "/bin/bash")
|
||||||
|
(file-name "bash" deps)
|
||||||
|
""))
|
||||||
|
(shell (or (and (file-exists? "/bin/bash") "/bin/bash")
|
||||||
|
(file-name "bash" deps)
|
||||||
|
(and (file-exists? "/bin/sh") "/bin/sh")
|
||||||
|
(file-name "sh" deps)
|
||||||
|
"sh"))
|
||||||
|
(hex2 (file-name "hex2" deps))
|
||||||
|
(numbered-arch? (begin
|
||||||
|
(stdout "checking for stage0 architecture flag... ")
|
||||||
|
(let ((numbered? (and hex2 (string-contains (gulp-pipe (string-append hex2 " --help 2>&1" )) "--Architecture 12345"))))
|
||||||
|
(stdout (if numbered? "numbered\n" "named\n"))
|
||||||
|
numbered?))))
|
||||||
|
|
||||||
|
(define* (substitute file-name pairs
|
||||||
|
#:key (target (if (string-suffix? ".in" file-name)
|
||||||
|
(string-drop-right file-name 3) file-name)))
|
||||||
|
(system* "mkdir" "-p" (dirname target))
|
||||||
|
(with-output-to-file target
|
||||||
|
(lambda _
|
||||||
|
(let ((in (open-input-file file-name)))
|
||||||
|
(let loop ((line (read-line in 'concat)))
|
||||||
|
(when (not (eof-object? line))
|
||||||
|
(display (fold (lambda (o result)
|
||||||
|
(string-replace-string/all result (car o) (cdr o)))
|
||||||
|
line pairs))
|
||||||
|
(loop (read-line in 'concat))))))))
|
||||||
|
|
||||||
|
(when (and (not (member mes-system '("arm-linux-mes"
|
||||||
|
"x86-linux-mes"
|
||||||
|
"x86_64-linux-mes")))
|
||||||
|
(not with-courage?))
|
||||||
|
(stderr "platform not supported: ~a
|
||||||
|
See \"Porting GNU Mes\" in the manual, or try --with-courage\n" mes-system)
|
||||||
|
(exit 1))
|
||||||
|
(when (pair? missing)
|
||||||
|
(stderr "\nMissing dependencies: ~a\n" (string-join (map dependency-name missing)))
|
||||||
|
(exit 1))
|
||||||
|
(let ((pairs `(("@PACKAGE@" . ,PACKAGE)
|
||||||
|
("@PACKAGE_NAME@" . ,PACKAGE-NAME)
|
||||||
|
("@PACKAGE_BUGREPORT@" . ,PACKAGE-BUGREPORT)
|
||||||
|
("@VERSION@" . ,VERSION)
|
||||||
|
|
||||||
|
("@build@" . ,build-type)
|
||||||
|
("@host@" . ,host-type)
|
||||||
|
|
||||||
|
("@bootstrap@" . ,(if with-bootstrap? "true" "false"))
|
||||||
|
("@courageous@" . ,(if with-courage? "true" "false"))
|
||||||
|
("@compiler@" . ,mes-compiler)
|
||||||
|
("@mes_bits@" . ,mes-bits)
|
||||||
|
("@mes_kernel@" . ,mes-kernel)
|
||||||
|
("@mes_cpu@" . ,mes-cpu)
|
||||||
|
("@mes_libc@" . ,mes-libc)
|
||||||
|
("@mes_system@" . ,mes-system)
|
||||||
|
|
||||||
|
("@abs_top_srcdir@" . ,abs-top-srcdir)
|
||||||
|
("@abs_top_builddir@" . ,abs-top-builddir)
|
||||||
|
("@top_builddir@" . ,top-builddir)
|
||||||
|
|
||||||
|
("@srcdest@" . ,srcdest)
|
||||||
|
("@srcdir@" . ,srcdir)
|
||||||
|
|
||||||
|
("@prefix@" . ,prefix)
|
||||||
|
("@program_prefix@" . ,program-prefix)
|
||||||
|
("@bindir@" . ,bindir)
|
||||||
|
("@datadir@" . ,datadir)
|
||||||
|
("@pkgdatadir@" . ,pkgdatadir)
|
||||||
|
("@docdir@" . ,docdir)
|
||||||
|
("@guile_site_ccache_dir@" . ,guile-site-ccache-dir)
|
||||||
|
("@guile_site_dir@" . ,guile-site-dir)
|
||||||
|
("@infodir@" . ,infodir)
|
||||||
|
("@includedir@" . ,includedir)
|
||||||
|
("@libdir@" . ,libdir)
|
||||||
|
("@mandir@" . ,mandir)
|
||||||
|
("@sysconfdir@" . ,sysconfdir)
|
||||||
|
|
||||||
|
("@colors@" . ,(if disable-colors? "no" "yes"))
|
||||||
|
("@V@" . ,(if disable-silent-rules? "1" "0"))
|
||||||
|
|
||||||
|
("@AR@" . ,(or (file-name "ar" deps) ""))
|
||||||
|
("@BASH@" . ,bash)
|
||||||
|
("@CC@" . ,cc)
|
||||||
|
("@DIFF@" . ,(or (file-name "diff" deps) (string-append abs-top-builddir "/pre-inst-env diff.scm")))
|
||||||
|
("@DOT@" . ,(or (file-name "dot" deps) ""))
|
||||||
|
("@GIT@" . ,(or (file-name "git" deps) ""))
|
||||||
|
("@GUILE@" . ,guile)
|
||||||
|
("@GUILE_EFFECTIVE_VERSION@" . ,(effective-version))
|
||||||
|
("@GUILE_LOAD_PATH@" . ,(string-join guile-load-path ":"))
|
||||||
|
("@GUIX@" . ,(or (file-name "guix" deps) ""))
|
||||||
|
("@HELP2MAN@" . ,(or (file-name "help2man" deps) ""))
|
||||||
|
("@MAKEINFO@" . ,(or (file-name "makeinfo" deps) ""))
|
||||||
|
("@MES_FOR_BUILD@" . ,(or (file-name "mes" deps)
|
||||||
|
guile))
|
||||||
|
("@PERL@" . ,(or (file-name "perl" deps) ""))
|
||||||
|
("#SCHEME=\"@SCHEME@\"" . ,(if with-cheating? (string-append "\nSCHEME=\"" guile "\"") ""))
|
||||||
|
("@SCHEME@" . ,(if with-cheating? guile ""))
|
||||||
|
("@SHELL@" . ,shell)
|
||||||
|
|
||||||
|
("@CFLAGS@" . ,(or (getenv "CFLAGS") "-static -g"))
|
||||||
|
("@CPPFLAGS@" . ,(or (getenv "CPPFLAGS") ""))
|
||||||
|
("@LDFLAGS@" . ,(or (getenv "LDFLAGS") "-static -g"))
|
||||||
|
("@HEX2FLAGS@" . ,(or (getenv "HEX2FLAGS") ""))
|
||||||
|
("@M1FLAGS@" . ,(or (getenv "M1FLAGS") ""))
|
||||||
|
("@numbered_arch@" . ,(if numbered-arch? "true" "false"))
|
||||||
|
|
||||||
|
,@(map
|
||||||
|
(lambda (o)
|
||||||
|
(cons (string-append "@" (variable-name o) "@") (or (format #f "~a" (dependency-file-name o)) "")))
|
||||||
|
deps))))
|
||||||
|
|
||||||
|
(unless cc
|
||||||
|
(format (current-error-port) "must supply a C compiler")
|
||||||
|
(exit 2))
|
||||||
|
(for-each (lambda (o)
|
||||||
|
(let* ((src (string-append srcdest o))
|
||||||
|
(target (string-drop-right o 3))
|
||||||
|
(target (if (not (string-prefix? "build-aux/" target)) target
|
||||||
|
(string-drop target (string-length "build-aux/")))))
|
||||||
|
(substitute src pairs #:target target)))
|
||||||
|
'(
|
||||||
|
"build-aux/GNUmakefile.in"
|
||||||
|
"build-aux/config.sh.in"
|
||||||
|
"build-aux/build.sh.in"
|
||||||
|
"build-aux/check.sh.in"
|
||||||
|
"build-aux/install.sh.in"
|
||||||
|
"build-aux/pre-inst-env.in"
|
||||||
|
"build-aux/uninstall.sh.in"
|
||||||
|
"scripts/mesar.in"
|
||||||
|
"scripts/mescc.scm.in"
|
||||||
|
"scripts/mescc.in"
|
||||||
|
))
|
||||||
|
(chmod "pre-inst-env" #o755)
|
||||||
|
(chmod "scripts/mesar" #o755)
|
||||||
|
(chmod "scripts/mescc" #o755)
|
||||||
|
(chmod "scripts/mescc.scm" #o755)
|
||||||
|
(chmod "build.sh" #o755)
|
||||||
|
(chmod "check.sh" #o755)
|
||||||
|
(chmod "install.sh" #o755)
|
||||||
|
(chmod "uninstall.sh" #o755)
|
||||||
|
|
||||||
|
(system* "mkdir" "-p" "include/mes")
|
||||||
|
(let ((pkgdatadir (gulp-pipe* "sh" "-c" (string-append "prefix=" prefix
|
||||||
|
";datadir=" datadir
|
||||||
|
";echo ${datadir}/mes"))))
|
||||||
|
(with-output-to-file "include/mes/config.h"
|
||||||
|
(lambda _
|
||||||
|
(if system-libc?
|
||||||
|
(display "#define SYSTEM_LIBC 1
|
||||||
|
")
|
||||||
|
(display "#undef SYSTEM_LIBC
|
||||||
|
"))
|
||||||
|
(display (string-append "
|
||||||
|
#define MES_VERSION \"" VERSION "\"
|
||||||
|
")))))
|
||||||
|
(substitute (string-append srcdest "build-aux/config.make.in") pairs #:target ".config.make"))
|
||||||
|
|
||||||
|
(let ((make (and=> (file-name "make" deps) basename)))
|
||||||
|
(display (string-append "
|
||||||
|
GNU Mes is configured for
|
||||||
|
compiler: " mes-compiler "
|
||||||
|
cpu: " mes-cpu "
|
||||||
|
bits: " mes-bits "
|
||||||
|
libc: " mes-libc "
|
||||||
|
kernel: " mes-kernel "
|
||||||
|
system: " mes-system "
|
||||||
|
tools: " (if numbered-arch? "numbered" "named") " arch
|
||||||
|
bootstrap: " (if with-bootstrap? "yes" "no") "
|
||||||
|
courageous: " (if with-courage? "yes" "no") "
|
||||||
|
|
||||||
|
Run:
|
||||||
|
" (or make "./build.sh") " to build mes
|
||||||
|
" (or make "./build.sh") " help for help on other targets\n"))))))
|
|
@ -0,0 +1,280 @@
|
||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
# GNU Mes --- Maxwell Equations of Software
|
||||||
|
# Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
|
#
|
||||||
|
# This file is part of GNU Mes.
|
||||||
|
#
|
||||||
|
# GNU 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.
|
||||||
|
#
|
||||||
|
# GNU 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 GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
VERSION=0.22
|
||||||
|
srcdir=${srcdir-$(dirname $0)}
|
||||||
|
srcdest=
|
||||||
|
if test "$srcdir" != "."; then
|
||||||
|
srcdest=$srcdir/
|
||||||
|
fi
|
||||||
|
. ${srcdest}build-aux/trace.sh
|
||||||
|
|
||||||
|
# parse arguments
|
||||||
|
while [ $# -gt 0 ]; do
|
||||||
|
case $1 in
|
||||||
|
(--with-courage)
|
||||||
|
courageous=true
|
||||||
|
;;
|
||||||
|
(--with-system-libc)
|
||||||
|
mes_libc=system
|
||||||
|
;;
|
||||||
|
(--build=*)
|
||||||
|
build=${1#--build=}
|
||||||
|
host=${host-$build}
|
||||||
|
;;
|
||||||
|
(--host=*)
|
||||||
|
host=${1#--host=}
|
||||||
|
;;
|
||||||
|
(--prefix=*)
|
||||||
|
prefix=${1#--prefix=}
|
||||||
|
;;
|
||||||
|
(--program-prefix=*)
|
||||||
|
program_prefix=${1#--program-prefix=}
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
prefix=${prefix-/usr/local}
|
||||||
|
mes_libc=${mes_libc-mes}
|
||||||
|
courageous=${courageous-false}
|
||||||
|
|
||||||
|
BASH=${BASH-$(command -v bash || command -v sh)}
|
||||||
|
BLOOD_ELF=${BLOOD_ELF-$(command -v blood-elf)}
|
||||||
|
CC=${CC-$(command -v gcc)} || true
|
||||||
|
CFLAGS=${CFLAGS-}
|
||||||
|
CPPFLAGS=${CPPFLAGS-}
|
||||||
|
DIFF=${DIFF-$(command -v diff || echo $PWD/pre-inst-env diff.scm)}
|
||||||
|
GUILD=${GUILD-$(command -v guild)} || true
|
||||||
|
GUILE_TOOLS=${GUILE_TOOLS-$(command -v guile-tools)} || true
|
||||||
|
if test ! "$GUILD"; then
|
||||||
|
if test "$GUILE_TOOLS"; then
|
||||||
|
GUILD=$GUILE_TOOLS
|
||||||
|
else
|
||||||
|
GUILD=true
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
GUILE=${GUILE-$(command -v guile)} || true
|
||||||
|
HEX2=${HEX2-$(command -v hex2)}
|
||||||
|
LDPFLAGS=${LDFLAGS-}
|
||||||
|
M1=${M1-$(command -v M1)}
|
||||||
|
MES_FOR_BUILD=${MES_FOR_BUILD-$(command -v mes || command -v guile || echo mes)}
|
||||||
|
GIT=${GIT-$(command -v git)} || true
|
||||||
|
PERL=${PERL-$(command -v perl)} || true
|
||||||
|
SHELL=${BASH-$SHELL}
|
||||||
|
|
||||||
|
if test "$srcdir" = .; then
|
||||||
|
top_builddir=.
|
||||||
|
else
|
||||||
|
srcdest=${srcdest}
|
||||||
|
top_builddir=$PWD
|
||||||
|
fi
|
||||||
|
abs_top_srcdir=${abs_top_srcdir-$(cd ${srcdir} && pwd)}
|
||||||
|
abs_top_builddir=$PWD
|
||||||
|
|
||||||
|
if test -z "$GUILE" -o "$GUILE" = true; then
|
||||||
|
GUILE_EFFECTIVE_VERSION=${GUILE_EFFECTIVE_VERSION-2.2}
|
||||||
|
else
|
||||||
|
GUILE_EFFECTIVE_VERSION=${GUILE_EFFECTIVE_VERSION-$(guile -c '(display (effective-version))')}
|
||||||
|
fi
|
||||||
|
|
||||||
|
numbered_arch=false
|
||||||
|
mes_tools=named
|
||||||
|
if ( $HEX2 --help 2>&1 ) | grep -q "\-\-Architecture 12345"; then
|
||||||
|
numbered_arch=true
|
||||||
|
mes_tools=numbered
|
||||||
|
fi
|
||||||
|
|
||||||
|
bindir=$(eval echo ${bindir-$prefix/bin})
|
||||||
|
datadir=$(eval echo ${datadir-$prefix/share})
|
||||||
|
docdir=$(eval echo ${docdir-$datadir/doc/mes})
|
||||||
|
infodir=$(eval echo ${infodir-$datadir/info})
|
||||||
|
includedir=$(eval echo ${includedir-$prefix/include})
|
||||||
|
libdir=$(eval echo ${libdir-$prefix/lib})
|
||||||
|
pkgdatadir=$(eval echo ${pkgdatadir-$datadir/mes})
|
||||||
|
mandir=$(eval echo ${mandir-$datadir/man})
|
||||||
|
guile_site_dir=$(eval echo ${guile_site_dir-$prefix/share/guile/site/$GUILE_EFFECTIVE_VERSION})
|
||||||
|
guile_site_ccache_dir=$(eval echo ${guile_site_ccache_dir-$prefix/lib/guile/$GUILE_EFFECTIVE_VERSION/site-ccache})
|
||||||
|
|
||||||
|
subst () {
|
||||||
|
echo "creating $2"
|
||||||
|
sed \
|
||||||
|
-e s,"@PACKAGE@,$PACKAGE,"\
|
||||||
|
-e s,"@PACKAGE_NAME@,$PACKAGE_NAME,"\
|
||||||
|
-e s,"@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,"\
|
||||||
|
-e s,"@VERSION@,$VERSION,"\
|
||||||
|
-e s,"@bootstrap@,true,"\
|
||||||
|
-e s,"@build@,$build,"\
|
||||||
|
-e s,"@host@,$host,"\
|
||||||
|
-e s,"@compiler@,$compiler,"\
|
||||||
|
-e s,"@courageous@,$courageous,"\
|
||||||
|
-e s,"@mes_bits@,$mes_bits,"\
|
||||||
|
-e s,"@mes_kernel@,$mes_kernel,"\
|
||||||
|
-e s,"@mes_cpu@,$mes_cpu,"\
|
||||||
|
-e s,"@mes_libc@,$mes_libc,"\
|
||||||
|
-e s,"@mes_system@,$mes_system,"\
|
||||||
|
-e s,"@abs_top_srcdir@,$abs_top_srcdir,"\
|
||||||
|
-e s,"@abs_top_builddir@,$abs_top_builddir,"\
|
||||||
|
-e s,"@top_builddir@,$top_builddir,"\
|
||||||
|
-e s,"@srcdest@,$srcdest,"\
|
||||||
|
-e s,"@srcdir@,$srcdir,"\
|
||||||
|
-e s,"@prefix@,$prefix,"\
|
||||||
|
-e s,"@program_prefix@,$program_prefix,"\
|
||||||
|
-e s,"@bindir@,$bindir,"\
|
||||||
|
-e s,"@datadir@,$datadir,"\
|
||||||
|
-e s,"@docdir@,$docdir,"\
|
||||||
|
-e s,"@guile_site_dir@,$guile_site_dir,"\
|
||||||
|
-e s,"@guile_site_ccache_dir@,$guile_site_ccache_dir,"\
|
||||||
|
-e s,"@infodir@,$infodir,"\
|
||||||
|
-e s,"@includedir@,$includedir,"\
|
||||||
|
-e s,"@libdir@,$libdir,"\
|
||||||
|
-e s,"@mandir@,$mandir,"\
|
||||||
|
-e s,"@pkgdatadir@,$pkgdatadir,"\
|
||||||
|
-e s,"@sysconfdir@,$sysconfdir,"\
|
||||||
|
-e s,"@GUILE_EFFECTIVE_VERSION@,$GUILE_EFFECTIVE_VERSION,"\
|
||||||
|
-e s,"@GUILE_LOAD_PATH@,$GUILE_LOAD_PATH,"\
|
||||||
|
-e s,"@V@,$V,"\
|
||||||
|
-e s,"@AR@,$AR,"\
|
||||||
|
-e s,"@BASH@,$BASH,"\
|
||||||
|
-e s,"@BLOOD_ELF@,$BLOOD_ELF,"\
|
||||||
|
-e s,"@CC@,$CC,"\
|
||||||
|
-e s,"@DIFF@,$DIFF,"\
|
||||||
|
-e s,"@GIT@,$GIT,"\
|
||||||
|
-e s,"@GUILD@,$GUILD,"\
|
||||||
|
-e s,"@GUILE@,$GUILE,"\
|
||||||
|
-e s,"@PERL@,$PERL,"\
|
||||||
|
-e s,"@CFLAGS@,$CFLAGS,"\
|
||||||
|
-e s,"@HEX2@,$HEX2,"\
|
||||||
|
-e s,"@HEX2FLAGS@,$HEX2FLAGS,"\
|
||||||
|
-e s,"@M1@,$M1,"\
|
||||||
|
-e s,"@M1FLAGS@,$M1FLAGS,"\
|
||||||
|
-e s,"@MES_FOR_BUILD@,$MES_FOR_BUILD,"\
|
||||||
|
-e s,"@numbered_arch@,$numbered_arch,"\
|
||||||
|
-e s,"@SHELL@,$SHELL,"\
|
||||||
|
$1 > $2
|
||||||
|
}
|
||||||
|
|
||||||
|
host=${host-$($CC -dumpmachine 2>/dev/null)}
|
||||||
|
if test -z "$host$host_type"; then
|
||||||
|
mes_cpu=${arch-$(get_machine || uname -m)}
|
||||||
|
else
|
||||||
|
mes_cpu=${host%%-*}
|
||||||
|
fi
|
||||||
|
if test "$mes_cpu" = i386\
|
||||||
|
|| test "$mes_cpu" = i486\
|
||||||
|
|| test "$mes_cpu" = i586\
|
||||||
|
|| test "$mes_cpu" = i686; then
|
||||||
|
mes_cpu=x86
|
||||||
|
fi
|
||||||
|
if test "$mes_cpu" = armv4\
|
||||||
|
|| test "$arch" = armv7l; then
|
||||||
|
mes_cpu=arm
|
||||||
|
fi
|
||||||
|
if test "$mes_cpu" = amd64; then
|
||||||
|
mes_cpu=x86_64
|
||||||
|
fi
|
||||||
|
|
||||||
|
case "$host" in
|
||||||
|
*linux-gnu|*linux)
|
||||||
|
mes_kernel=linux;;
|
||||||
|
*gnu)
|
||||||
|
mes_kernel=gnu;;
|
||||||
|
*freebsd*)
|
||||||
|
mes_kernel=frreebsd;;
|
||||||
|
*)
|
||||||
|
mes_kernel=linux;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
case "$mes_cpu" in
|
||||||
|
x86_64)
|
||||||
|
mes_bits=64;;
|
||||||
|
*)
|
||||||
|
mes_bits=32;;
|
||||||
|
esac
|
||||||
|
#
|
||||||
|
if $CC --version | grep gcc; then
|
||||||
|
compiler=gcc
|
||||||
|
elif $CC --version | grep tcc; then
|
||||||
|
compiler=gcc
|
||||||
|
else
|
||||||
|
compiler=mescc
|
||||||
|
AR=${AR-$PWD/scripts/mesar}
|
||||||
|
fi
|
||||||
|
|
||||||
|
AR=${AR-$(command -v ar)} || true
|
||||||
|
|
||||||
|
mes_system=$mes_cpu-$mes_kernel-mes
|
||||||
|
|
||||||
|
mkdir -p scripts
|
||||||
|
subst ${srcdest}build-aux/GNUmakefile.in GNUmakefile
|
||||||
|
subst ${srcdest}build-aux/config.sh.in config.sh
|
||||||
|
subst ${srcdest}build-aux/bootstrap.sh.in bootstrap.sh
|
||||||
|
chmod +x bootstrap.sh
|
||||||
|
subst ${srcdest}build-aux/build.sh.in build.sh
|
||||||
|
chmod +x build.sh
|
||||||
|
subst ${srcdest}build-aux/check.sh.in check.sh
|
||||||
|
chmod +x check.sh
|
||||||
|
subst ${srcdest}build-aux/install.sh.in install.sh
|
||||||
|
chmod +x install.sh
|
||||||
|
subst ${srcdest}build-aux/pre-inst-env.in pre-inst-env
|
||||||
|
chmod +x pre-inst-env
|
||||||
|
subst ${srcdest}scripts/mesar.in scripts/mesar
|
||||||
|
chmod +x scripts/mesar
|
||||||
|
subst ${srcdest}scripts/mescc.scm.in scripts/mescc.scm
|
||||||
|
chmod +x scripts/mescc.scm
|
||||||
|
subst ${srcdest}scripts/mescc.in scripts/mescc
|
||||||
|
chmod +x scripts/mescc
|
||||||
|
subst ${srcdest}build-aux/uninstall.sh.in uninstall.sh
|
||||||
|
chmod +x uninstall.sh
|
||||||
|
|
||||||
|
mkdir -p include/mes
|
||||||
|
rm -f include/mes/config.h
|
||||||
|
if test $mes_libc = system; then
|
||||||
|
cat >> include/mes/config.h <<EOF
|
||||||
|
#define SYSTEM_LIBC 1
|
||||||
|
EOF
|
||||||
|
else
|
||||||
|
cat >> include/mes/config.h <<EOF
|
||||||
|
#undef SYSTEM_LIBC
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
cat >> include/mes/config.h <<EOF
|
||||||
|
#define MES_VERSION "$VERSION"
|
||||||
|
EOF
|
||||||
|
|
||||||
|
cat <<EOF
|
||||||
|
GNU Mes is configured for
|
||||||
|
compiler: $compiler
|
||||||
|
cpu: $mes_cpu
|
||||||
|
bits: $mes_bits
|
||||||
|
libc: $mes_libc
|
||||||
|
kernel: $mes_kernel
|
||||||
|
system: $mes_system
|
||||||
|
tools: $mes_tools arch
|
||||||
|
courageous: $courageous
|
||||||
|
bootstrap: yes
|
||||||
|
|
||||||
|
Run:
|
||||||
|
sh bootstrap.sh to bootstrap build mes
|
||||||
|
sh check.sh to check mes
|
||||||
|
sh install.sh to install mes
|
||||||
|
EOF
|
|
@ -0,0 +1,45 @@
|
||||||
|
Subject: on bootstrapping: introducing Mes
|
||||||
|
Date: Sun, 19 Jun 2016 13:08:02 +0200
|
||||||
|
|
||||||
|
Hi,
|
||||||
|
|
||||||
|
I have a minimal LISP-1.5-resembling interpreter in C that now can
|
||||||
|
also interpret itself
|
||||||
|
|
||||||
|
https://gitlab.com/janneke/mes
|
||||||
|
|
||||||
|
It was inspired by the seemingly often ignored bootstrapping question
|
||||||
|
made so painfully visible by GuixSD and by OriansJ with their self
|
||||||
|
hosting hex assembler project.
|
||||||
|
|
||||||
|
As a next step after a hex assembler I was thinking of getting Scheme up
|
||||||
|
and running and use that to create a tiny C compiler, probably using
|
||||||
|
PEG. For that I think we need define-syntax, which I had a peek at and
|
||||||
|
still scares the all-sorts-of-things out of me :-)
|
||||||
|
|
||||||
|
I searched for minimal Lisp/Scheme to get that going and found an
|
||||||
|
article called the Maxwell Equations of Software 1) with a pointer to
|
||||||
|
the 1962 LISP 1.5 paper by John McCarthy 2).
|
||||||
|
|
||||||
|
First I `implemented' Mes/LISP-1.5: the bottom half of page 13 and the
|
||||||
|
necessary helper procedures defined on pages 8-12 using Guile, removing
|
||||||
|
all but the primitives needed to run LISP-1.5/Mes (I think): car, cdr,
|
||||||
|
cond, cons, define, eq?, '()/nil, null?, pair? and quote. I cheated
|
||||||
|
with read, and with display and newline for debugging.
|
||||||
|
|
||||||
|
Then I translated the program into C and got rid of read by using
|
||||||
|
getchar/ungetchar.
|
||||||
|
|
||||||
|
It's been great fun and now I'm kind of stuck a bit at the point of
|
||||||
|
implementing macros. I have a simplistic version in C but want to
|
||||||
|
remove that again --I like the idea of having the absolute minimal LISP
|
||||||
|
interpreter in C-- and only introduce macros after having bootstrapped
|
||||||
|
into the LISP/Mes domain.
|
||||||
|
|
||||||
|
Greetings,
|
||||||
|
Jan
|
||||||
|
|
||||||
|
1) http://www.michaelnielsen.org/ddi/lisp-as-the-maxwells-equations-of-software/
|
||||||
|
2)
|
||||||
|
http://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf
|
||||||
|
|
|
@ -0,0 +1,96 @@
|
||||||
|
Subject: Mes 0.10 released
|
||||||
|
|
||||||
|
I am pleased to announce the release of Mes 0.10, representing 82
|
||||||
|
commits over 6 weeks. Mescc now compiles a bootstrappable-modified
|
||||||
|
TinyCC into a mes-tcc that in turn can successfully compile a trivial
|
||||||
|
C program.
|
||||||
|
|
||||||
|
* About
|
||||||
|
|
||||||
|
Mes[0] aims to create full source bootstrapping for GuixSD[1] as
|
||||||
|
part of the bootstrappable builds[2] project.
|
||||||
|
|
||||||
|
It currently consists of a mutual self-hosting [close to Guile-]
|
||||||
|
Scheme interpreter prototype in C and a Nyacc-based C compiler in
|
||||||
|
[Guile] Scheme. This C prototype will be rewritten in stage0[3]
|
||||||
|
M1 assembly (or possibly stage2 slow-LISP, or ...).
|
||||||
|
|
||||||
|
The Scheme interpreter prototype (mes.c) has a Garbage Collector,
|
||||||
|
a library of loadable Scheme modules-- notably Dominique Boucher's
|
||||||
|
LALR[4], Pre-R6RS portable syntax-case[5] with R7RS ellipsis, Matt
|
||||||
|
Wette's Nyacc[6], Guile's PEG[7] --and test suite just barely
|
||||||
|
enough to support a simple REPL (repl.mes) and simple C-compiler
|
||||||
|
(mescc.mes).
|
||||||
|
|
||||||
|
The simple C compiler can compile a modified TinyCC[8] that is
|
||||||
|
starting to work! A gcc-compiled tcc is known[9] to compile GCC.
|
||||||
|
|
||||||
|
Mes is inspired by The Maxwell Equations of Software: LISP-1.5[10]
|
||||||
|
-- John McCarthy page 13, GNU Guix's source/binary packaging
|
||||||
|
transparency and Jeremiah Orians's stage0 ~300 byte self-hosting
|
||||||
|
hex assembler.
|
||||||
|
|
||||||
|
* Download
|
||||||
|
|
||||||
|
git clone https://gitlab.com/janneke/mes
|
||||||
|
|
||||||
|
wget https://gitlab.com/janneke/mes/repository/archive.tar.gz?ref=v0.10 -O mes-0.10.tar.gz
|
||||||
|
|
||||||
|
Mes runs from the source tree and can also be built, packaged and
|
||||||
|
installed in Guix[SD] by the usual
|
||||||
|
|
||||||
|
guix package -f guix.scm
|
||||||
|
|
||||||
|
* Changes in 0.10 since 0.9
|
||||||
|
** Core
|
||||||
|
*** 2 new functions
|
||||||
|
logand, lognot.
|
||||||
|
** Mescc
|
||||||
|
*** Mes now includes M1 sources for full source bootstrapping up to tcc.
|
||||||
|
*** Mescc now depends on Nyacc 0.81.0.
|
||||||
|
*** Mescc now compiles a mes-tcc that compiles a trivial C to a running a.out.
|
||||||
|
*** Mescc now supports several (as used my tinycc) struct by value assignments.
|
||||||
|
*** Mescc now has _start in a separate crt1.c.
|
||||||
|
*** Mescc now supports initializer arithmetic.
|
||||||
|
*** Mescc now supports arrays of struct of arbitrary size.
|
||||||
|
*** Mescc now supports pointer arithmetic.
|
||||||
|
*** Mescc now defines __i386__, __linux__.
|
||||||
|
*** Mescc now supports --*p, ++*p.
|
||||||
|
*** Mescc now supports int foo[bar] = {baz,...}.
|
||||||
|
*** Mescc now supports \x00 in strings in M1.
|
||||||
|
*** Mescc now supports complex enum expressions. Thanks, rain1!
|
||||||
|
*** Mescc now supports short.
|
||||||
|
*** Mescc now supports foo.bar = foo.baz = bla.
|
||||||
|
*** Mescc now supports foo = bar < baz and comparison permutations.
|
||||||
|
*** Mescc now supports (anonymous) structs in unions.
|
||||||
|
*** Mescc now writes M1 strings if possible.
|
||||||
|
**** 2 improved mlibc functions
|
||||||
|
malloc, realloc.
|
||||||
|
**** 13 new mlibc functions
|
||||||
|
fclose, fgetc, fprintf, fwrite, memcpy, memmove, memset, snprintf, strcat,
|
||||||
|
strchr, strrchr, strtoull, vnsprintf.
|
||||||
|
**** 15 new tinycc-support tests
|
||||||
|
76-pointer-arithmetic.c, 77-pointer-assign.c, 78-union-struct.c,
|
||||||
|
79-int-array.c, 7a-struct-char-array.c, 7b-struct-int-array.c,
|
||||||
|
7c-dynarray.c, 7d-cast-char.c, 7e-struct-array-access.c,
|
||||||
|
7f-struct-pointer-arithmetic.c, 7g-struct-byte-word-field.c,
|
||||||
|
7h-struct-assign.c, 7i-struct-struct.c, 7j-strtoull.c,
|
||||||
|
7k-for-each-elem.c.
|
||||||
|
** Noteworthy bug fixes
|
||||||
|
*** Mescc has many fixes for foo.bar[baz], foo[bar].baz with ./-> permutations.
|
||||||
|
*** Many bugs and limitations in mescc have been fixed and removed.
|
||||||
|
|
||||||
|
Greetings,
|
||||||
|
janneke
|
||||||
|
|
||||||
|
[0] https://gitlab.com/janneke/mes
|
||||||
|
[1] https://www.gnu.org/software/guix
|
||||||
|
[2] http://bootstrappable.org
|
||||||
|
[3] https://github.com/oriansj/stage0
|
||||||
|
[4] https://github.com/schemeway/lalr-scm
|
||||||
|
[5] https://www.cs.indiana.edu/chezscheme/syntax-case/old-psyntax.html
|
||||||
|
[6] https://www.nongnu.org/nyacc/
|
||||||
|
[7] https://www.gnu.org/software/guile/docs/master/guile.html/PEG-Parsing.html
|
||||||
|
[8] https://gitlab.com/janneke/tinycc
|
||||||
|
[9] https://lists.gnu.org/archive/html/tinycc-devel/2017-05/msg00103.html
|
||||||
|
[10] http://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf
|
|
@ -0,0 +1,70 @@
|
||||||
|
Subject: Mes 0.11 released
|
||||||
|
|
||||||
|
I am pleased to announce the release of Mes 0.11, representing 16
|
||||||
|
commits over 10 weeks. MesCC now compiles a less heavily patched
|
||||||
|
TinyCC into a mes-tcc that in turn passes 41/69 of mescc's C tests.
|
||||||
|
|
||||||
|
When mes-tcc passes all 69 tests, this almost-full-source-bootstrapped
|
||||||
|
version of TinyCC should be able to compile itself. An unpatched, GNU
|
||||||
|
Gcc-compiled tcc is known to compile GNU Gcc.
|
||||||
|
|
||||||
|
* About
|
||||||
|
|
||||||
|
Mes[0] aims to create full source bootstrapping for GuixSD[1] as
|
||||||
|
part of the bootstrappable builds[2] project.
|
||||||
|
|
||||||
|
It currently consists of a mutual self-hosting [close to Guile-]
|
||||||
|
Scheme interpreter prototype in C and a Nyacc-based C compiler in
|
||||||
|
[Guile] Scheme. This C prototype will be rewritten in stage0[3]
|
||||||
|
M1 assembly (or compiled by M2-Planet or stage2 slow-LISP, or ...).
|
||||||
|
|
||||||
|
The Scheme interpreter prototype (mes.c) has a Garbage Collector,
|
||||||
|
a library of loadable Scheme modules-- notably Dominique Boucher's
|
||||||
|
LALR[4], Pre-R6RS portable syntax-case[5] with R7RS ellipsis, Matt
|
||||||
|
Wette's Nyacc[6], Guile's PEG[7] --and test suite just barely
|
||||||
|
enough to support a simple REPL (repl.mes) and simple C-compiler
|
||||||
|
MesCC (mescc.mes).
|
||||||
|
|
||||||
|
MesCC can compile a modified TinyCC[8] that is close to being
|
||||||
|
self-hosting. A GNU Gcc-compiled tcc is known[9] to compile GCC.
|
||||||
|
|
||||||
|
Mes is inspired by The Maxwell Equations of Software: LISP-1.5[10]
|
||||||
|
-- John McCarthy page 13, GNU Guix's source/binary packaging
|
||||||
|
transparency and Jeremiah Orians's stage0 ~300 byte self-hosting
|
||||||
|
hex assembler.
|
||||||
|
|
||||||
|
* Download
|
||||||
|
|
||||||
|
git clone https://gitlab.com/janneke/mes
|
||||||
|
|
||||||
|
wget https://gitlab.com/janneke/mes/repository/archive.tar.gz?ref=v0.11 -O mes-0.11.tar.gz
|
||||||
|
|
||||||
|
Mes runs from the source tree and can also be built, packaged and
|
||||||
|
installed in Guix[SD] by the usual
|
||||||
|
|
||||||
|
guix package -f guix.scm
|
||||||
|
|
||||||
|
* Changes in 0.11 since 0.10
|
||||||
|
** MesCC
|
||||||
|
*** MesCC now compiles a mes-tcc that passes 41/69 of mescc's C tests.
|
||||||
|
*** MesCC's libc can now be compiled with tcc (syscall support: write).
|
||||||
|
*** MesCC now compiles a less-patched tcc: -214/+458 lines [WAS: -333/+747].
|
||||||
|
*** MesCC now supports empty for.
|
||||||
|
*** MesCC has been greatly refactored, 500/3000 lines have been removed.
|
||||||
|
*** MesCC now supports complex [struct] by value assign foo.bar, foo->bar, foo[bar].
|
||||||
|
*** MesCC now depends on Nyacc 0.82.4.
|
||||||
|
|
||||||
|
Greetings,
|
||||||
|
janneke
|
||||||
|
|
||||||
|
[0] https://gitlab.com/janneke/mes
|
||||||
|
[1] https://www.gnu.org/software/guix
|
||||||
|
[2] http://bootstrappable.org
|
||||||
|
[3] https://github.com/oriansj/stage0
|
||||||
|
[4] https://github.com/schemeway/lalr-scm
|
||||||
|
[5] https://www.cs.indiana.edu/chezscheme/syntax-case/old-psyntax.html
|
||||||
|
[6] https://www.nongnu.org/nyacc/
|
||||||
|
[7] https://www.gnu.org/software/guile/docs/master/guile.html/PEG-Parsing.html
|
||||||
|
[8] https://gitlab.com/janneke/tinycc
|
||||||
|
[9] https://lists.gnu.org/archive/html/tinycc-devel/2017-05/msg00103.html
|
||||||
|
[10] http://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf
|
|
@ -0,0 +1,97 @@
|
||||||
|
Subject: Mes 0.12 released
|
||||||
|
|
||||||
|
I am pleased to announce the release of Mes 0.12, representing 120
|
||||||
|
commits over 20 weeks. MesCC is prototyped running on Guile and can
|
||||||
|
now run on Mes. Performance of Mes running MesCC has been improved by
|
||||||
|
a factor of 100; mes.c (~3000 LOC) now compiles in ~4min. Many fixes
|
||||||
|
and enhancements make that now also TinyCC parses (~1.5h) and compiles
|
||||||
|
(~20min) with Mes+MesCC (Guile+MesCC takes ~2min).
|
||||||
|
|
||||||
|
Special thanks go to Ricardo Wurmus for sharing the recursive macro
|
||||||
|
expand perspective and starting work on that, to Han-Wen Nienhuys for
|
||||||
|
his sharp `Ah, so you skipped SICP chapter 3' remark and to rain1 for
|
||||||
|
their continuous help on #bootstrapping and their `let's only expand
|
||||||
|
global variables' insight.
|
||||||
|
|
||||||
|
* About
|
||||||
|
|
||||||
|
Mes[0] aims to create full source bootstrapping for GuixSD[1] as
|
||||||
|
part of the bootstrappable builds[2] project.
|
||||||
|
|
||||||
|
It currently consists of a mutual self-hosting [close to Guile-]
|
||||||
|
Scheme interpreter prototype in C and a Nyacc-based C compiler in
|
||||||
|
[Guile] Scheme. This C prototype will be simplified to be
|
||||||
|
transpiled by M2-Planet[3].
|
||||||
|
|
||||||
|
The Scheme interpreter prototype (mes.c) has a Garbage Collector,
|
||||||
|
a library of loadable Scheme modules-- notably Dominique Boucher's
|
||||||
|
LALR[4], pre-R6RS portable syntax-case[5] with R7RS ellipsis, Matt
|
||||||
|
Wette's Nyacc[6], Guile's PEG[7] --and test suite just barely
|
||||||
|
enough to support a simple REPL (repl.mes) and simple C-compiler
|
||||||
|
MesCC (mescc.mes).
|
||||||
|
|
||||||
|
MesCC can compile a modified TinyCC[8] that is close to being
|
||||||
|
self-hosting. A GNU Gcc-compiled tcc is known[9] to compile GCC.
|
||||||
|
|
||||||
|
Mes is inspired by The Maxwell Equations of Software: LISP-1.5[10]
|
||||||
|
-- John McCarthy page 13, GNU Guix's source/binary packaging
|
||||||
|
transparency and Jeremiah Orians's stage0[11] ~300 byte self-hosting
|
||||||
|
hex assembler.
|
||||||
|
|
||||||
|
* Download
|
||||||
|
|
||||||
|
git clone https://gitlab.com/janneke/mes
|
||||||
|
|
||||||
|
wget https://gitlab.com/janneke/mes/repository/archive.tar.gz?ref=v0.12 -O mes-0.12.tar.gz
|
||||||
|
|
||||||
|
Mes runs from the source tree and can also be built, packaged and
|
||||||
|
installed in Guix[SD] by the usual
|
||||||
|
|
||||||
|
guix package -f guix.scm
|
||||||
|
|
||||||
|
* Changes in 0.12 since 0.11
|
||||||
|
** Core
|
||||||
|
*** Mes can now run Nyacc (0.80.42) to compile itself in ~4min (~3000 LOC).
|
||||||
|
*** Mes now recursively expands global variables per top level statement.
|
||||||
|
*** Mes now recursively expands macros per top level statement.
|
||||||
|
*** Mes now boots from MES_BOOT (default: module/mes/boot-0.scm).
|
||||||
|
*** Mes now has a full Scheme reader in C again.
|
||||||
|
This gives a 10x-20x performance improvement and increases the
|
||||||
|
bootstrap footprint by 160 LOC.
|
||||||
|
*** Mes reader now supports older abbreviated character forms
|
||||||
|
#\bel, #\bs, #\ht and #\vt.
|
||||||
|
*** 3 new functions
|
||||||
|
equal2?, memq, core:write.
|
||||||
|
** Language
|
||||||
|
*** Mes now has an incremental Scheme semantics test suite with 71 small tests.
|
||||||
|
*** Variable names can now have ticks.
|
||||||
|
*** Mes now evaluates expresions of COND only once.
|
||||||
|
*** srfi-9 records have been reimplemented.
|
||||||
|
*** #\page is now whitespace.
|
||||||
|
*** #<eof> is no longer a character.
|
||||||
|
*** 2 new macros
|
||||||
|
define-macro*, with-fluids.
|
||||||
|
*** 9 new functions
|
||||||
|
dirname, last, reverse-list->string, setenv, string-drop-right,
|
||||||
|
string-fold, string-fold-right, string-null?, write.
|
||||||
|
** MesCC
|
||||||
|
**** 9 new functions
|
||||||
|
chmod, getopt_long, ferror, itoab, longjmp, qsort, setenv, setjmp, strtol.
|
||||||
|
**** 2 new header files
|
||||||
|
endian.h, sys/signal.h.
|
||||||
|
|
||||||
|
Greetings,
|
||||||
|
janneke
|
||||||
|
|
||||||
|
[0] https://gitlab.com/janneke/mes
|
||||||
|
[1] https://www.gnu.org/software/guix
|
||||||
|
[2] http://bootstrappable.org
|
||||||
|
[3] https://github.com/oriansj/m2-planet
|
||||||
|
[4] https://github.com/schemeway/lalr-scm
|
||||||
|
[5] https://www.cs.indiana.edu/chezscheme/syntax-case/old-psyntax.html
|
||||||
|
[6] https://www.nongnu.org/nyacc/
|
||||||
|
[7] https://www.gnu.org/software/guile/docs/master/guile.html/PEG-Parsing.html
|
||||||
|
[8] https://gitlab.com/janneke/tinycc
|
||||||
|
[9] https://lists.gnu.org/archive/html/tinycc-devel/2017-05/msg00103.html
|
||||||
|
[10] http://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf
|
||||||
|
[11] https://github.com/oriansj/stage0
|
|
@ -0,0 +1,81 @@
|
||||||
|
Subject: Mes 0.13 released
|
||||||
|
|
||||||
|
I am pleased to announce the release of Mes 0.13, representing 45
|
||||||
|
commits over 3 weeks. MesCC can now compile a functional tcc when
|
||||||
|
running on Mes (in ~1h45') or on Guile (in ~3min).
|
||||||
|
|
||||||
|
This means that we are getting very close to a full source bootstrap
|
||||||
|
of tcc: it is now built without gcc, glibc or guile; using only
|
||||||
|
MesCC-tools and Mes sources and corresponding ascii/binary seeds.
|
||||||
|
|
||||||
|
* About
|
||||||
|
|
||||||
|
Mes[0] aims to help create full source bootstrapping for GuixSD[1]
|
||||||
|
as part of the bootstrappable builds[2] project.
|
||||||
|
|
||||||
|
It currently consists of a mutual self-hosting Scheme interpreter
|
||||||
|
prototype in C and a Nyacc-based C compiler in Scheme. This C
|
||||||
|
prototype is being simplified to be transpiled by M2-Planet[3].
|
||||||
|
|
||||||
|
The Scheme interpreter prototype (mes.c) has a Garbage Collector,
|
||||||
|
a library of loadable Scheme modules-- notably Dominique Boucher's
|
||||||
|
LALR[4], pre-R6RS portable syntax-case[5] with R7RS ellipsis, Matt
|
||||||
|
Wette's Nyacc[6], Guile's PEG[7] --and test suite just barely
|
||||||
|
enough to support a simple REPL (repl.mes) and simple C-compiler
|
||||||
|
MesCC.
|
||||||
|
|
||||||
|
Mes+MesCC can compile a modified TinyCC[8] that is close to being
|
||||||
|
self-hosting. A GNU Gcc-compiled tcc is known[9] to compile GCC.
|
||||||
|
|
||||||
|
Mes is inspired by The Maxwell Equations of Software: LISP-1.5[10]
|
||||||
|
-- John McCarthy page 13, GNU Guix's source/binary packaging
|
||||||
|
transparency and Jeremiah Orians's stage0[11] ~300 byte self-hosting
|
||||||
|
hex assembler.
|
||||||
|
|
||||||
|
* Download
|
||||||
|
|
||||||
|
git clone https://gitlab.com/janneke/mes
|
||||||
|
|
||||||
|
wget https://gitlab.com/janneke/mes/-/archive/v0.13/mes-0.13.tar.gz
|
||||||
|
|
||||||
|
Mes runs from the source tree and can also be built, packaged and
|
||||||
|
installed in Guix[SD] by the usual
|
||||||
|
|
||||||
|
guix package -f guix.scm
|
||||||
|
|
||||||
|
* Changes in 0.13 since 0.12
|
||||||
|
** Core
|
||||||
|
*** Bootstrapped Mes+MesCC can now compile a patched tcc in ~2h30' (~25,000 LOC).
|
||||||
|
*** MesCC scripts for Mes and Guile are now merged; executable is: `mescc'.
|
||||||
|
*** Mes now uses only one arena for stop-and-copy; doubles available size.
|
||||||
|
*** Mes now has a Guile-like command-line interface (mes.repl has been removed).
|
||||||
|
*** Mes now boots into a full Scheme by default.
|
||||||
|
*** Mes can now be compiled (MES_MINI=1) to boot into a minimal Scheme (~2000 cells).
|
||||||
|
*** Mes now creates less garbage in the reader and in
|
||||||
|
append2, append_reverse, reverse, reverse!, vector-for-each, vector-to-list, vector-map.
|
||||||
|
*** 5 new functions
|
||||||
|
append-reverse, chmod, ioctl, isatty, isspace, last_pair, reverse!.
|
||||||
|
** Language
|
||||||
|
*** 3 new functions
|
||||||
|
char-whitespace?, chmod, isatty?
|
||||||
|
** Noteworthy bug fixes
|
||||||
|
*** Two bugs in the jam scraper/garbage collector have been fixed.
|
||||||
|
*** equal2_p now uses tail call elimination.
|
||||||
|
*** Escaped characters in strings are now read and write'd correctly.
|
||||||
|
*** The repl now expands macros again.
|
||||||
|
|
||||||
|
Greetings,
|
||||||
|
janneke
|
||||||
|
|
||||||
|
[0] https://gitlab.com/janneke/mes
|
||||||
|
[1] https://www.gnu.org/software/guix
|
||||||
|
[2] http://bootstrappable.org
|
||||||
|
[3] https://github.com/oriansj/m2-planet
|
||||||
|
[4] https://github.com/schemeway/lalr-scm
|
||||||
|
[5] https://www.cs.indiana.edu/chezscheme/syntax-case/old-psyntax.html
|
||||||
|
[6] https://www.nongnu.org/nyacc/
|
||||||
|
[7] https://www.gnu.org/software/guile/docs/master/guile.html/PEG-Parsing.html
|
||||||
|
[8] https://gitlab.com/janneke/tinycc
|
||||||
|
[9] https://lists.gnu.org/archive/html/tinycc-devel/2017-05/msg00103.html
|
||||||
|
[10] http://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf
|
||||||
|
[11] https://github.com/oriansj/stage0
|
|
@ -0,0 +1,101 @@
|
||||||
|
Subject: Mes 0.14 released
|
||||||
|
|
||||||
|
I am pleased to announce the release of Mes 0.14, representing 98
|
||||||
|
commits over 4 weeks. Mes+MesCC now compiles a self-hosting TinyCC
|
||||||
|
that has only been slightly patched.
|
||||||
|
|
||||||
|
This means that we can now build a tcc that depends only on a 1MB
|
||||||
|
ASCII M1 seed. GuixSD currently uses a ~250MB binary seed to build
|
||||||
|
gcc.
|
||||||
|
|
||||||
|
Next targets are: build gcc using this almost full-source bootstrapped
|
||||||
|
tcc, and reduce the 1MB ASCII M1 seed to ~100KB of M2 source, which is
|
||||||
|
a restricted subset of C.
|
||||||
|
|
||||||
|
Packages are available from Guix's wip-bootstrap branch.
|
||||||
|
|
||||||
|
* About
|
||||||
|
|
||||||
|
Mes[0] aims to help create full source bootstrapping for GuixSD[1]
|
||||||
|
as part of the bootstrappable builds[2] project.
|
||||||
|
|
||||||
|
It currently consists of a mutual self-hosting Scheme interpreter
|
||||||
|
prototype in C and a Nyacc-based C compiler in Scheme. This C
|
||||||
|
prototype is being simplified to be transpiled by M2-Planet[3].
|
||||||
|
|
||||||
|
The Scheme interpreter prototype (mes.c) has a Garbage Collector,
|
||||||
|
a library of loadable Scheme modules-- notably Dominique Boucher's
|
||||||
|
LALR[4], pre-R6RS portable syntax-case[5] with R7RS ellipsis, Matt
|
||||||
|
Wette's Nyacc[6], Guile's PEG[7] --and test suite just barely
|
||||||
|
enough to support a simple REPL (repl.mes) and simple C-compiler
|
||||||
|
MesCC.
|
||||||
|
|
||||||
|
Mes+MesCC can compile an only slightly patched TinyCC[8] that is
|
||||||
|
self-hosting. A GNU Gcc-compiled tcc is known[9] to compile GCC.
|
||||||
|
|
||||||
|
Mes is inspired by The Maxwell Equations of Software: LISP-1.5[10]
|
||||||
|
-- John McCarthy page 13, GNU Guix's source/binary packaging
|
||||||
|
transparency and Jeremiah Orians's stage0[11] ~300 byte self-hosting
|
||||||
|
hex assembler.
|
||||||
|
|
||||||
|
* Download
|
||||||
|
|
||||||
|
git clone https://gitlab.com/janneke/mes
|
||||||
|
|
||||||
|
wget https://gitlab.com/janneke/mes/-/archive/v0.14/mes-0.14.tar.gz
|
||||||
|
|
||||||
|
Mes runs from the source tree and can also be built, packaged and
|
||||||
|
installed in Guix[SD] by the usual
|
||||||
|
|
||||||
|
guix package -f guix.scm
|
||||||
|
|
||||||
|
* Changes in 0.14 since 0.13
|
||||||
|
** Core
|
||||||
|
*** Bootstrapped Mes+MesCC now compiles a tcc that is self-hosting and only slightly patched.
|
||||||
|
*** The reader now supports binary numbers (previously: read as decimal).
|
||||||
|
*** String port support has been moved to C.
|
||||||
|
*** The build has been simplified, the Make-in-Scheme experiment has been removed.
|
||||||
|
*** 2 new functions
|
||||||
|
chmod, logxor.
|
||||||
|
** Language
|
||||||
|
*** Mes now supports define-immutable-record-type and single set-field from srfi-9 gnu.
|
||||||
|
*** 12 new functions
|
||||||
|
basename, chmod, const, delete-duplicates, logxor, string-contains,
|
||||||
|
string-map, string-replace, string-trim, string-trim-both,
|
||||||
|
string-trim-right, unfold.
|
||||||
|
** MesCC
|
||||||
|
*** MesCC now supports standalone usage of nestedly defined enums, structs and unions.
|
||||||
|
*** MesCC now supports comparison of unsigned and promotion of signed/unsigned -> unsigned.
|
||||||
|
*** MesCC now supports sign extension for char, short.
|
||||||
|
*** MesCC now has stubbing for floats; compiling works, data is fu.
|
||||||
|
*** MesCC now has full suport for switch case, e.g. with default as first clause.
|
||||||
|
*** MesCC now supports destruction of casted expressions: ((struct foo*)p)->bar.
|
||||||
|
*** MesCC now has full support for pre/post, e.g.: (foo--)->bar and permutations.
|
||||||
|
*** MesCC now supports sizeof any expression or type.
|
||||||
|
*** MesCC now supports initialization of anonymous unions.
|
||||||
|
*** MesCC now supports bit fields.
|
||||||
|
*** MesCC now supports valued functions in expressions: destruction and dereferencing.
|
||||||
|
*** MesCC now supports function-static variables.
|
||||||
|
*** MesCC now supports initializer lists in structs and unions.
|
||||||
|
*** MesCC now has full support for heterogeneous variable declarations, e.g.: char p, *x = "foo", buf[3];
|
||||||
|
**** 4 new functions
|
||||||
|
__lshrdi3, __ashldi3, __ashrdi3, strncpy.
|
||||||
|
**** 9 new mlibc stubs
|
||||||
|
__fixdfdi, __fixsfdi, __fixunsxfdi, __fixxfdi, __floatundixf, ldexp,
|
||||||
|
strtod, strtof, strtold.
|
||||||
|
|
||||||
|
Greetings,
|
||||||
|
janneke
|
||||||
|
|
||||||
|
[0] https://gitlab.com/janneke/mes
|
||||||
|
[1] https://www.gnu.org/software/guix
|
||||||
|
[2] http://bootstrappable.org
|
||||||
|
[3] https://github.com/oriansj/m2-planet
|
||||||
|
[4] https://github.com/schemeway/lalr-scm
|
||||||
|
[5] https://www.cs.indiana.edu/chezscheme/syntax-case/old-psyntax.html
|
||||||
|
[6] https://www.nongnu.org/nyacc/
|
||||||
|
[7] https://www.gnu.org/software/guile/docs/master/guile.html/PEG-Parsing.html
|
||||||
|
[8] https://gitlab.com/janneke/tinycc
|
||||||
|
[9] https://lists.gnu.org/archive/html/tinycc-devel/2017-05/msg00103.html
|
||||||
|
[10] http://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf
|
||||||
|
[11] https://github.com/oriansj/stage0
|
|
@ -0,0 +1,106 @@
|
||||||
|
Subject: Mes 0.15 released
|
||||||
|
|
||||||
|
I am pleased to announce the release of Mes 0.15, representing 45
|
||||||
|
commits over 3 weeks. The GNU toolchain is getting bootstrapped!
|
||||||
|
|
||||||
|
As of 0.14, Mes+MesCC compiles a self-hosting TinyCC. Using the 0.15
|
||||||
|
Mes C library, this TinyCC can build the GNU tools triplet:
|
||||||
|
binutils-2.14, gcc-2.95.3, glibc-2.2.5.
|
||||||
|
|
||||||
|
This means that we can build a GNU toolchain that depends only on a
|
||||||
|
critical 1MB ASCII M1 seed. GuixSD currently uses a ~250MB binary
|
||||||
|
seed to build gcc.
|
||||||
|
|
||||||
|
Next targets are: upstream the Mes bootstrap to GuixSD, build a
|
||||||
|
Gcc-4.7 and Glibc-2.23, bootstrap utilities like bison, flex, grep,
|
||||||
|
sed..., replace GuixSD's bootstrap for x86 and reduce the 1MB ASCII M1
|
||||||
|
seed to ~5000 LOC/~100KB of M2 source, which is a restricted subset of
|
||||||
|
C.
|
||||||
|
|
||||||
|
Packages are available from Guix's wip-bootstrap branch.
|
||||||
|
|
||||||
|
* About
|
||||||
|
|
||||||
|
Mes[0] aims to help create full source bootstrapping for GuixSD[1]
|
||||||
|
as part of the bootstrappable builds[2] project.
|
||||||
|
|
||||||
|
It currently consists of a mutual self-hosting Scheme interpreter
|
||||||
|
prototype in C and a Nyacc-based C compiler in Scheme. This C
|
||||||
|
prototype is being simplified to be transpiled by M2-Planet[3].
|
||||||
|
|
||||||
|
The Scheme interpreter prototype (mes.c) has a Garbage Collector,
|
||||||
|
a library of loadable Scheme modules-- notably Dominique Boucher's
|
||||||
|
LALR[4], pre-R6RS portable syntax-case[5] with R7RS ellipsis, Matt
|
||||||
|
Wette's Nyacc[6], Guile's PEG[7] --and test suite just barely
|
||||||
|
enough to support a simple REPL (repl.mes) and simple C-compiler
|
||||||
|
MesCC.
|
||||||
|
|
||||||
|
Mes+MesCC can compile an only slightly patched TinyCC[8] that is
|
||||||
|
self-hosting. Using the Mes C library, this tcc can now build the
|
||||||
|
GNU tools triplet: binutils-2.14, gcc-2.95.3, glibc-2.2.5.
|
||||||
|
|
||||||
|
Mes is inspired by The Maxwell Equations of Software: LISP-1.5[9]
|
||||||
|
-- John McCarthy page 13, GNU Guix's source/binary packaging
|
||||||
|
transparency and Jeremiah Orians's stage0[10] ~300 byte self-hosting
|
||||||
|
hex assembler.
|
||||||
|
|
||||||
|
* Download
|
||||||
|
|
||||||
|
git clone https://gitlab.com/janneke/mes
|
||||||
|
|
||||||
|
wget https://gitlab.com/janneke/mes/-/archive/v0.15/mes-0.15.tar.gz
|
||||||
|
|
||||||
|
Mes runs from the source tree and can also be built, packaged and
|
||||||
|
installed in Guix[SD] by the usual
|
||||||
|
|
||||||
|
guix package -f guix.scm
|
||||||
|
|
||||||
|
* Changes in 0.15 since 0.14
|
||||||
|
** Core
|
||||||
|
*** Support fork, exec, waitpid.
|
||||||
|
*** Boot-0 loading has been refactored.
|
||||||
|
*** MesCC now has out of the box Geiser support.
|
||||||
|
** Language
|
||||||
|
*** 2 new functions
|
||||||
|
drop, drop-right.
|
||||||
|
** MesCC
|
||||||
|
*** MesCC and Mes Lib C can now build binutils-2.30, gcc-2.95.3 and glibc-2.2.5.
|
||||||
|
*** MesCC now provides dummy crti.o, crtn.o so that tcc needs not be patched for those.
|
||||||
|
*** Mes Lib C now supports compiling glibc-2.2.25.
|
||||||
|
*** Mes Lib C now supports compiling gcc-2.95.3
|
||||||
|
*** Mes Lib C now supports compiling binutils-2.30.
|
||||||
|
*** Mes Lib C now supports compiling m4-1.4.
|
||||||
|
*** Mes Lib C has been split into archs: gcc, x86-mes-gcc and x86-mes.
|
||||||
|
*** MesCC now has a posixy command line interface.
|
||||||
|
**** 70 new functions
|
||||||
|
abs, access, alarm, alloca, atexit, atol, bcmp, bcopy, brk, bzero,
|
||||||
|
chmod, clearerr, close, dup, dup2, execve, fabs, fcntl, fdgets, feof,
|
||||||
|
fgets, fileno, fork, freopen, fscanf, fstat, fsync, getcwd, getgid,
|
||||||
|
getpid, getrusage, getuid, index, ioctl, isalnum, isalpha, isascii,
|
||||||
|
iscntrl, isprint, ispunct, kill, link, lseek, lstat, mkdir, mktemp,
|
||||||
|
nanosleep, open, perror, pipe, raise, read, rename, rindex, rmdir,
|
||||||
|
sbrk, sbrk, setitimer, signal, sleep, stat, strcspn, strdup, strerror,
|
||||||
|
strncat, strpbrk, strspn, unlink, unsetenv, waitpid.
|
||||||
|
**** 23 new stubs
|
||||||
|
abort, atof, bsearch, bsearch, chown, ctime, fpurge, freadahead,
|
||||||
|
frexp, getpwnam, gmtime, mbstowcs, pclose, popen, rewind, setbuf,
|
||||||
|
sigsetmask, strftime, sys_siglist, system, times, umask, utime.
|
||||||
|
**** 10 new C tests
|
||||||
|
51-strcmp.c, 70-printf.c, 87-sscanf.c, 90-strpbrk.c, 91-fseek.c,
|
||||||
|
92-stat.c, 93-fread-fwrite.c, 94-unsetenv.c, 95-signal.c, 96-strto.c.
|
||||||
|
|
||||||
|
|
||||||
|
Greetings,
|
||||||
|
janneke
|
||||||
|
|
||||||
|
[0] https://gitlab.com/janneke/mes
|
||||||
|
[1] https://www.gnu.org/software/guix
|
||||||
|
[2] http://bootstrappable.org
|
||||||
|
[3] https://github.com/oriansj/m2-planet
|
||||||
|
[4] https://github.com/schemeway/lalr-scm
|
||||||
|
[5] https://www.cs.indiana.edu/chezscheme/syntax-case/old-psyntax.html
|
||||||
|
[6] https://www.nongnu.org/nyacc/
|
||||||
|
[7] https://www.gnu.org/software/guile/docs/master/guile.html/PEG-Parsing.html
|
||||||
|
[8] https://gitlab.com/janneke/tinycc
|
||||||
|
[9] http://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf
|
||||||
|
[10] https://github.com/oriansj/stage0
|
|
@ -0,0 +1,100 @@
|
||||||
|
Subject: Mes 0.16 released
|
||||||
|
|
||||||
|
I am pleased to announce the release of Mes 0.16, representing 27
|
||||||
|
commits over 2 weeks.
|
||||||
|
|
||||||
|
A most annoying ELF header bug was fixed that suddenly had all Mes
|
||||||
|
binaries segfault before entering `_start' on Linux 4.17 and later.
|
||||||
|
|
||||||
|
We now have binutils-2.20.1 and gcc-4.1.0, both compiled with
|
||||||
|
gcc-2.95.3 and glibc-2.2.5.
|
||||||
|
|
||||||
|
This reduced-binary-seed bootstrap still depends on these bootstrap
|
||||||
|
binaries: BOOTSTRAP-GUILE, flex, bash, bzip2, coreutils, diffutils,
|
||||||
|
gawk, grep, gzip, make, sed, tar, on the small binary seeds:
|
||||||
|
tinycc-seed, mescc-seed and on the mes.M1 ASCII seed.
|
||||||
|
|
||||||
|
Next targets:
|
||||||
|
|
||||||
|
- build a Gcc 4.7 and Glibc 2.23
|
||||||
|
- upstream the x86 Mes bootstrap to GuixSD
|
||||||
|
- reduce the 1MB ASCII M1 seed to ~5000 LOC/~100KB of M2 source
|
||||||
|
- revive Gash: a posix shell for Guile to reduce the bootstrap binary
|
||||||
|
dependencies
|
||||||
|
- and/or otherwise reduce the bootstrap binary dependencies
|
||||||
|
|
||||||
|
Packages are available from Guix's wip-bootstrap branch.
|
||||||
|
|
||||||
|
* About
|
||||||
|
|
||||||
|
Mes[0] aims to help create full source bootstrapping for GuixSD[1] as
|
||||||
|
part of the bootstrappable builds[2] effort.
|
||||||
|
|
||||||
|
It currently consists of a mutual self-hosting Scheme interpreter
|
||||||
|
prototype written in C and a Nyacc-based C compiler written in Scheme.
|
||||||
|
This C prototype is being simplified[3] to be transpiled by M2-Planet[4].
|
||||||
|
|
||||||
|
The Scheme interpreter prototype (mes.c) has a Garbage Collector, a
|
||||||
|
library of loadable Scheme modules-- notably Dominique Boucher's LALR[5],
|
||||||
|
Pre-R6RS portable syntax-case[6] with R7RS ellipsis, Matt Wette's Nyacc[7],
|
||||||
|
Guile's PEG[8] --and test suite just barely enough to support a simple
|
||||||
|
REPL and simple C-compiler: MesCC.
|
||||||
|
|
||||||
|
Mes+MesCC can compile an only lighty patched TinyCC[9] that is
|
||||||
|
self-hosting. Using this tcc and the Mes C library we now have a
|
||||||
|
reduced-binary-seed bootstrap for the gnutools triplet: glibc-2.2.5,
|
||||||
|
binutils-2.20.1, gcc-4.1.0.
|
||||||
|
|
||||||
|
Mes is inspired by The Maxwell Equations of Software: LISP-1.5[10] --
|
||||||
|
John McCarthy page 13, GNU Guix's source/binary packaging transparency
|
||||||
|
and Jeremiah Orians's stage0[11] ~500 byte self-hosting hex assembler.
|
||||||
|
|
||||||
|
* Download
|
||||||
|
|
||||||
|
git clone https://gitlab.com/janneke/mes
|
||||||
|
|
||||||
|
wget https://gitlab.com/janneke/mes/-/archive/v0.16/mes-0.16.tar.gz
|
||||||
|
|
||||||
|
Mes runs from the source tree and can also be built, packaged and
|
||||||
|
installed in Guix[SD] by the usual
|
||||||
|
|
||||||
|
guix package -f guix.scm
|
||||||
|
|
||||||
|
* Get informed, get involved
|
||||||
|
|
||||||
|
Join #bootstrappable on irc.freenode.net.
|
||||||
|
|
||||||
|
* Changes in 0.16 since 0.15
|
||||||
|
** Core
|
||||||
|
*** Support building with tcc, including Mes Lib C in-line assembly.
|
||||||
|
*** core:execl now supports 1000 arguments.
|
||||||
|
** MesCC
|
||||||
|
*** Mes Lib C now bootstraps glibc-2.2.5, binutils-2.20.1, gcc-4.1.0.
|
||||||
|
*** MesCC binaries now run on Linux 4.17 too, i.e. survive Linus' new `sane mmap limits.'
|
||||||
|
*** MesCC now runs with mescc-tools 0.5 (no = in long options).
|
||||||
|
**** 3 new C test
|
||||||
|
88-strrchrc, 97-fopen.c, 98-fopen.c.
|
||||||
|
** Noteworthy bug fixes
|
||||||
|
*** strrchr now stops when it reaches start of string.
|
||||||
|
*** fopen now return 0 upon failure. Supports binutils' hack: fd=-2 means `cached'.
|
||||||
|
*** vfprintf, vsprintf now support precision and width on integers strings better.
|
||||||
|
*** fread now produces ungetc'd chars too.
|
||||||
|
*** memcmp now supports comparing 0 bytes, supporting binutils.
|
||||||
|
|
||||||
|
*** The unused ELF header data section, identical to the text section, has been removed.
|
||||||
|
|
||||||
|
Greetings,
|
||||||
|
janneke
|
||||||
|
|
||||||
|
[0] https://gitlab.com/janneke/mes
|
||||||
|
[1] https://www.gnu.org/software/guix
|
||||||
|
[2] http://bootstrappable.org
|
||||||
|
[3] https://github.com/oriansj/mes-m2
|
||||||
|
[4] https://github.com/oriansj/m2-planet
|
||||||
|
[5] https://github.com/schemeway/lalr-scm
|
||||||
|
[6] https://www.cs.indiana.edu/chezscheme/syntax-case/old-psyntax.html
|
||||||
|
[7] https://www.nongnu.org/nyacc
|
||||||
|
[8] https://www.gnu.org/software/guile/docs/master/guile.html/PEG-Parsing.html
|
||||||
|
[9] https://gitlab.com/janneke/tinycc
|
||||||
|
[10] http://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf
|
||||||
|
[11] https://github.com/oriansj/stage0
|
|
@ -0,0 +1,113 @@
|
||||||
|
Subject: GNU Mes 0.17 released
|
||||||
|
|
||||||
|
<#secure method=pgpmime mode=sign>
|
||||||
|
We are delighted to announce the release of GNU Mes 0.17, representing
|
||||||
|
64 commits over 6 weeks.
|
||||||
|
|
||||||
|
Mes is now an official GNU package and we have bootstrapped gcc-4.7.4
|
||||||
|
for x86-linux with a reduced binary seed (i.e., without regular toolchain).
|
||||||
|
|
||||||
|
Next targets:
|
||||||
|
|
||||||
|
- upstream the x86 Mes bootstrap to GuixSD
|
||||||
|
- create a x86_64 Mes C Lib, see if that is is enough to bootstrap x86_64
|
||||||
|
- reduce the 1MB ASCII M1 seed to ~5000 LOC/~100KB of M2 source
|
||||||
|
- create a plan for Geesh and Gash and use them to reduce the
|
||||||
|
bootstrap binary dependencies
|
||||||
|
- and/or otherwise reduce the bootstrap binary dependencies
|
||||||
|
|
||||||
|
Packages are available from Guix's wip-bootstrap branch.
|
||||||
|
|
||||||
|
* About
|
||||||
|
|
||||||
|
GNU Mes[0] aims to help create full source bootstrapping for GNU/Linux
|
||||||
|
distributions such as GuixSD[1] as part of the bootstrappable builds[2]
|
||||||
|
effort.
|
||||||
|
|
||||||
|
It consists of a mutual self-hosting Scheme interpreter written in
|
||||||
|
~5,000 LOC of simple C and a Nyacc-based C compiler written in Scheme.
|
||||||
|
This mes.c is being simplified[3] to be transpiled by M2-Planet[4].
|
||||||
|
|
||||||
|
The Scheme interpreter (mes.c) has a Garbage Collector, a library of
|
||||||
|
loadable Scheme modules-- notably Dominique Boucher's LALR[5],
|
||||||
|
Pre-R6RS portable syntax-case[6] with R7RS ellipsis, Matt Wette's
|
||||||
|
Nyacc[7] --and test suite just barely enough to support a simple REPL
|
||||||
|
and simple C-compiler: MesCC.
|
||||||
|
|
||||||
|
Mes+MesCC can compile an only lightly patched TinyCC[8] that is
|
||||||
|
self-hosting. Using this tcc and the Mes C library we now have a
|
||||||
|
reduced-binary-seed bootstrap for the gnutools triplet: glibc-2.2.5,
|
||||||
|
binutils-2.20.1, gcc-4.7.4.
|
||||||
|
|
||||||
|
Mes is inspired by The Maxwell Equations of Software: LISP-1.5[9] --
|
||||||
|
John McCarthy page 13, GNU Guix's source/binary packaging transparency
|
||||||
|
and Jeremiah Orians's stage0[10] ~500 byte self-hosting hex assembler.
|
||||||
|
|
||||||
|
* Download
|
||||||
|
|
||||||
|
git clone git://git.savannah.gnu.org/mes.git
|
||||||
|
|
||||||
|
Here are the compressed sources and a GPG detached signature[*]:
|
||||||
|
https://ftp.gnu.org/gnu/mes/mes-0.17.tar.gz
|
||||||
|
https://ftp.gnu.org/gnu/mes/mes-0.17.tar.gz.sig
|
||||||
|
|
||||||
|
Use a mirror for higher download bandwidth:
|
||||||
|
https://www.gnu.org/order/ftp.html
|
||||||
|
|
||||||
|
Here are the MD5 and SHA1 checksums:
|
||||||
|
|
||||||
|
93ca82612e203fd667dfbdfb83c06549 mes-0.17.tar.gz
|
||||||
|
d38ec93ab6dc2c92a5c5e96fef7f9295972772c2 mes-0.17.tar.gz
|
||||||
|
|
||||||
|
[*] Use a .sig file to verify that the corresponding file (without the
|
||||||
|
.sig suffix) is intact. First, be sure to download both the .sig file
|
||||||
|
and the corresponding tarball. Then, run a command like this:
|
||||||
|
|
||||||
|
gpg --verify mes-0.17.tar.gz.sig
|
||||||
|
|
||||||
|
If that command fails because you don't have the required public key,
|
||||||
|
then run this command to import it:
|
||||||
|
|
||||||
|
gpg --keyserver keys.gnupg.net --recv-keys 1A858392E331EAFDB8C27FFBF3C1A0D9C1D65273
|
||||||
|
|
||||||
|
and rerun the 'gpg --verify' command.
|
||||||
|
|
||||||
|
Mes runs from the source tree and can also be built, packaged and
|
||||||
|
installed in Guix[SD] from a git checkout by running
|
||||||
|
|
||||||
|
guix package -f .guix.scm
|
||||||
|
|
||||||
|
* Get informed, get involved
|
||||||
|
|
||||||
|
Join #bootstrappable on irc.freenode.net.
|
||||||
|
|
||||||
|
* Changes in 0.17 since 0.16.1
|
||||||
|
** Core
|
||||||
|
*** GNU Mes is now an official GNU package.
|
||||||
|
*** MesCC is now installed as a regular Guile package.
|
||||||
|
*** Support --srcdir build.
|
||||||
|
*** Support all standard GNU make targets.
|
||||||
|
** MesCC
|
||||||
|
*** Mes C Lib now bootstraps glibc-2.2.5, binutils-2.20.1, gcc-4.7.4.
|
||||||
|
* Changes in 0.16.1 since 0.16
|
||||||
|
** Core
|
||||||
|
*** Mes now builds out of the box on Debian buster/testing.
|
||||||
|
*** Mes now comes with a generic build recipe: build-aux/setup-mes.sh.
|
||||||
|
*** Mes now comes with INFO documentation.
|
||||||
|
** MesCC
|
||||||
|
*** MesCC now exits if spawning BLOOD_ELF, M1, or HEX2 fails.
|
||||||
|
|
||||||
|
Greetings,
|
||||||
|
janneke
|
||||||
|
|
||||||
|
[0] https://www.gnu.org/software/mes
|
||||||
|
[1] https://www.gnu.org/software/guix
|
||||||
|
[2] http://bootstrappable.org
|
||||||
|
[3] https://github.com/oriansj/mes-m2
|
||||||
|
[4] https://github.com/oriansj/m2-planet
|
||||||
|
[5] https://github.com/schemeway/lalr-scm
|
||||||
|
[6] https://www.cs.indiana.edu/chezscheme/syntax-case/old-psyntax.html
|
||||||
|
[7] https://www.nongnu.org/nyacc
|
||||||
|
[8] https://gitlab.com/janneke/tinycc
|
||||||
|
[9] http://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf
|
||||||
|
[10] https://github.com/oriansj/stage0
|
|
@ -0,0 +1,133 @@
|
||||||
|
|
||||||
|
Subject: GNU Mes 0.18 released
|
||||||
|
|
||||||
|
<#secure method=pgpmime mode=sign>
|
||||||
|
We are pleased to announce the release of GNU Mes 0.18, representing
|
||||||
|
83 commits over 8 weeks.
|
||||||
|
|
||||||
|
Mes is now bringing a Reduced Binary Seed bootstrap to GuixSD; the
|
||||||
|
size of bootstrap binaries has been halved and no regular toolchain
|
||||||
|
binaries are used as binary seeds (i686-linux and x86_64-linux only).
|
||||||
|
|
||||||
|
MesCC has been refactored to use an abstracted assembly language and
|
||||||
|
can now (cross-)build x86_64 binaries.
|
||||||
|
|
||||||
|
Next targets:
|
||||||
|
|
||||||
|
- reduce the 1MB ASCII M1 seed to ~5000 LOC/~100KB of M2 source
|
||||||
|
- revive Gash/Geesh and use it to decimate the remaining bootstrap
|
||||||
|
binary seeds
|
||||||
|
- and/or otherwise reduce the bootstrap binaries
|
||||||
|
- ARM, the Hurd?
|
||||||
|
|
||||||
|
Packages are available from Guix's core-updates-next branch.
|
||||||
|
|
||||||
|
* About
|
||||||
|
|
||||||
|
GNU Mes[0] brings a Reduced Binary Seed bootstrap[1] to GuixSD[2] and
|
||||||
|
potentially to any other interested GNU/Linux distribution, and aims
|
||||||
|
to help create a full source bootstrap as part of the
|
||||||
|
bootstrappable builds[3] effort.
|
||||||
|
|
||||||
|
It consists of a mutual self-hosting Scheme interpreter written in
|
||||||
|
~5,000 LOC of simple C and a Nyacc-based C compiler written in Scheme.
|
||||||
|
This mes.c is being simplified[4] to be transpiled by M2-Planet[5].
|
||||||
|
|
||||||
|
The Scheme interpreter (mes.c) has a Garbage Collector, a library of
|
||||||
|
loadable Scheme modules-- notably Dominique Boucher's LALR[6], Pre-R6RS
|
||||||
|
[portable syntax-case[7] with R7RS ellipsis, Matt Wette's Nyacc[8] --and test
|
||||||
|
suite just barely enough to support a simple REPL and simple
|
||||||
|
C-compiler: MesCC.
|
||||||
|
|
||||||
|
Mes+MesCC can compile an only lightly patched TinyCC[9] that is
|
||||||
|
self-hosting. Using this tcc and the Mes C library we now have a
|
||||||
|
Reduced Binary Seed bootstrap for the gnutools triplet: glibc-2.2.5,
|
||||||
|
binutils-2.20.1, gcc-2.95.3. This is enough to bootstrap GuixSD for
|
||||||
|
i686-linux and x86_64-linux.
|
||||||
|
|
||||||
|
Mes is inspired by The Maxwell Equations of Software: LISP-1.5[10] -- John
|
||||||
|
McCarthy page 13, GNU Guix's source/binary packaging transparency and
|
||||||
|
Jeremiah Orians's stage0[11] ~500 byte self-hosting hex assembler.
|
||||||
|
|
||||||
|
* Download
|
||||||
|
|
||||||
|
git clone git://git.savannah.gnu.org/mes.git
|
||||||
|
|
||||||
|
Here are the compressed sources and a GPG detached signature[*]:
|
||||||
|
https://ftp.gnu.org/gnu/mes/mes-0.18.tar.gz
|
||||||
|
https://ftp.gnu.org/gnu/mes/mes-0.18.tar.gz.sig
|
||||||
|
|
||||||
|
Use a mirror for higher download bandwidth:
|
||||||
|
https://ftpmirror.gnu.org/mes/mes-0.18.tar.gz
|
||||||
|
https://ftpmirror.gnu.org/mes/mes-0.18.tar.gz.sig
|
||||||
|
|
||||||
|
Here are the MD5 and SHA1 checksums:
|
||||||
|
|
||||||
|
f9f901f175fbc8a5a3d90c9c551ccc8c mes-0.18.tar.gz
|
||||||
|
4f7612731a745ebb806548186453d55e0d0bf217 mes-0.18.tar.gz
|
||||||
|
|
||||||
|
[*] Use a .sig file to verify that the corresponding file (without the
|
||||||
|
.sig suffix) is intact. First, be sure to download both the .sig file
|
||||||
|
and the corresponding tarball. Then, run a command like this:
|
||||||
|
|
||||||
|
gpg --verify mes-0.18.tar.gz.sig
|
||||||
|
|
||||||
|
If that command fails because you don't have the required public key,
|
||||||
|
then run this command to import it:
|
||||||
|
|
||||||
|
gpg --keyserver keys.gnupg.net --recv-keys 1A858392E331EAFDB8C27FFBF3C1A0D9C1D65273
|
||||||
|
|
||||||
|
and rerun the 'gpg --verify' command.
|
||||||
|
|
||||||
|
Mes runs from the source tree and can also be built, packaged and
|
||||||
|
installed in Guix[SD] from a git checkout by running
|
||||||
|
|
||||||
|
guix package -f .guix.scm
|
||||||
|
|
||||||
|
* Get informed, get involved
|
||||||
|
|
||||||
|
Join #bootstrappable on irc.freenode.net.
|
||||||
|
|
||||||
|
* Changes in 0.18 since 0.17.1
|
||||||
|
** Core
|
||||||
|
*** Mes/MesCC now supports x86_64.
|
||||||
|
*** Mes/MesCC now brings a Reduced Binary Seed bootstrap to GuixSD.
|
||||||
|
** Language
|
||||||
|
*** fold-right now supports 3 lists.
|
||||||
|
** MesCC
|
||||||
|
*** MesCC now supports x86_64 (also as cross build), using -m 64.
|
||||||
|
*** Mes C Library now has better support for bootstrapping gcc-3.0.
|
||||||
|
*** Mes C test suite now has 178 tests; 74 tests were added.
|
||||||
|
*** MesCC has been refactored to support use an abstracted assembly language.
|
||||||
|
*** MesCC now uses Nyacc 0.86.0.
|
||||||
|
** Noteworthy bug fixes
|
||||||
|
*** scaffold/tests/7s-struct-short.c has been fixed.
|
||||||
|
* Changes in 0.17.1 since 0.17
|
||||||
|
** MesCC
|
||||||
|
*** Mes C Library has now been exploded into a separate C file per function.
|
||||||
|
*** Mes C Library now bootstraps glibc-2.16.0, binutils-2.20.1, gcc-4.7.4.
|
||||||
|
*** Mes C Library now supports compiling make-3.82.
|
||||||
|
*** Mes C Library now supports compiling diffutils-2.7.
|
||||||
|
*** Mes C Library now supports x86_64.
|
||||||
|
**** 7 new functions
|
||||||
|
chdir, clock_gettime, closedir, execl, opendir, readdir, time.
|
||||||
|
**** 5 new stubs
|
||||||
|
getlogin, setlocale, setvbuf, sigaddset, sigblock.
|
||||||
|
** Noteworthy bug fixes
|
||||||
|
*** qsort can now handle lists with duplicate entries.
|
||||||
|
|
||||||
|
Greetings,
|
||||||
|
janneke
|
||||||
|
|
||||||
|
[0] https://www.gnu.org/software/mes
|
||||||
|
[1] http://joyofsource.com/reduced-binary-seed-bootstrap.html
|
||||||
|
[2] https://www.gnu.org/software/guix
|
||||||
|
[3] https://bootstrappable.org
|
||||||
|
[4] https://github.com/oriansj/mes-m2
|
||||||
|
[5] https://github.com/oriansj/m2-planet
|
||||||
|
[6] https://github.com/schemeway/lalr-scm
|
||||||
|
[7] https://www.cs.indiana.edu/chezscheme/syntax-case/old-psyntax.html
|
||||||
|
[8] https://www.nongnu.org/nyacc
|
||||||
|
[9] https://gitlab.com/janneke/tinycc
|
||||||
|
[10] http://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf
|
||||||
|
[11] https://github.com/oriansj/stage0
|
|
@ -0,0 +1,155 @@
|
||||||
|
|
||||||
|
Subject: GNU Mes 0.19 released
|
||||||
|
|
||||||
|
<#secure method=pgpmime mode=sign>
|
||||||
|
We are pleased to announce the release of GNU Mes 0.19, representing
|
||||||
|
100 commits over 10 weeks.
|
||||||
|
|
||||||
|
Mes has now brought the Reduced Binary Seed bootstrap to Guix (bootstrap
|
||||||
|
a GNU/Linux system without binary GNU toolchain or equivalent) and work
|
||||||
|
is ongoing to audit and verify this bootstrap path in NixOS.
|
||||||
|
|
||||||
|
This release introduces strings as byte-array, hash-tables and native
|
||||||
|
structs. While that does increase the footprint somewhat, it fixes
|
||||||
|
our performance issue; tinycc is now compiled in ~8min (WAS: ~1h30).
|
||||||
|
|
||||||
|
Next targets:
|
||||||
|
|
||||||
|
- translate mes.c into unsnarfed mes.M2
|
||||||
|
- use Gash to remove bash, coreutils&co, grep, sed, tar from the Guix
|
||||||
|
bootstrap binaries
|
||||||
|
- replace the NixOS bootstrap
|
||||||
|
- use dietlibc, uClibc, ... for bootstrapping GNU (bash, binutils,
|
||||||
|
gcc, tar) and remove Mes C lib+gnu?
|
||||||
|
- bootstrap gcc-3.x or 4.x directly, drop initial gcc-2.95.3 target?
|
||||||
|
- have M1+hex2 create gcc/tcc-usable object files? archives?
|
||||||
|
- Debian?
|
||||||
|
- ARM, the Hurd?
|
||||||
|
|
||||||
|
Packages are available from Guix's core-updates branch.
|
||||||
|
|
||||||
|
* About
|
||||||
|
|
||||||
|
GNU Mes[0] brings a Reduced Binary Seed bootstrap[1] to Guix[2] and
|
||||||
|
potentially to any other interested GNU/Linux distribution, and aims
|
||||||
|
to help create a full source bootstrap as part of the
|
||||||
|
bootstrappable builds[3] effort.
|
||||||
|
|
||||||
|
It consists of a mutual self-hosting Scheme interpreter written in
|
||||||
|
~5,000 LOC of simple C and a Nyacc-based C compiler written in Scheme.
|
||||||
|
This mes.c is being simplified[4] to be transpiled by M2-Planet[5].
|
||||||
|
|
||||||
|
The Scheme interpreter (mes.c) has a Garbage Collector, a library of
|
||||||
|
loadable Scheme modules-- notably Dominique Boucher's LALR[6], Pre-R6RS
|
||||||
|
[portable syntax-case[7] with R7RS ellipsis, Matt Wette's Nyacc[8] --and test
|
||||||
|
suite just barely enough to support a simple REPL and simple
|
||||||
|
C-compiler: MesCC.
|
||||||
|
|
||||||
|
Mes+MesCC can compile an only lightly patched TinyCC[9] that is
|
||||||
|
self-hosting. Using this tcc and the Mes C library we now have a
|
||||||
|
Reduced Binary Seed bootstrap for the gnutools triplet: glibc-2.2.5,
|
||||||
|
binutils-2.20.1, gcc-2.95.3. This is enough to bootstrap Guix for
|
||||||
|
i686-linux and x86_64-linux.
|
||||||
|
|
||||||
|
Mes is inspired by The Maxwell Equations of Software: LISP-1.5[10] -- John
|
||||||
|
McCarthy page 13, GNU Guix's source/binary packaging transparency and
|
||||||
|
Jeremiah Orians's stage0[11] ~500 byte self-hosting hex assembler.
|
||||||
|
|
||||||
|
* Download
|
||||||
|
|
||||||
|
git clone git://git.savannah.gnu.org/mes.git
|
||||||
|
|
||||||
|
Here are the compressed sources and a GPG detached signature[*]:
|
||||||
|
https://ftp.gnu.org/gnu/mes/mes-0.19.tar.gz
|
||||||
|
https://ftp.gnu.org/gnu/mes/mes-0.19.tar.gz.sig
|
||||||
|
|
||||||
|
Use a mirror for higher download bandwidth:
|
||||||
|
https://ftpmirror.gnu.org/mes/mes-0.19.tar.gz
|
||||||
|
https://ftpmirror.gnu.org/mes/mes-0.19.tar.gz.sig
|
||||||
|
|
||||||
|
Here are the MD5 and SHA1 checksums:
|
||||||
|
|
||||||
|
99e134df87adc5fc5fd2c04941929c23 mes-0.19.tar.gz
|
||||||
|
c9781b3b6a814acc985c2ac68caa111a56583bca mes-0.19.tar.gz
|
||||||
|
|
||||||
|
[*] Use a .sig file to verify that the corresponding file (without the
|
||||||
|
.sig suffix) is intact. First, be sure to download both the .sig file
|
||||||
|
and the corresponding tarball. Then, run a command like this:
|
||||||
|
|
||||||
|
gpg --verify mes-0.19.tar.gz.sig
|
||||||
|
|
||||||
|
If that command fails because you don't have the required public key,
|
||||||
|
then run this command to import it:
|
||||||
|
|
||||||
|
gpg --keyserver keys.gnupg.net --recv-keys 1A858392E331EAFDB8C27FFBF3C1A0D9C1D65273
|
||||||
|
|
||||||
|
and rerun the 'gpg --verify' command.
|
||||||
|
|
||||||
|
Mes runs from the source tree and can also be built, packaged and
|
||||||
|
installed in Guix from a git checkout by running
|
||||||
|
|
||||||
|
guix package -f .guix.scm
|
||||||
|
|
||||||
|
* Get informed, get involved
|
||||||
|
|
||||||
|
See https://bootstrappable.org
|
||||||
|
Join #bootstrappable on irc.freenode.net.
|
||||||
|
|
||||||
|
* Changes in 0.19 since 0.18
|
||||||
|
** Core
|
||||||
|
*** The build system has been simplified.
|
||||||
|
*** Mes now prints a backtrace upon error.
|
||||||
|
*** Performance has been improved 2-8 times, making Mes 2-10 times slower than Guile.
|
||||||
|
*** Mes now supports a module type and uses a `boot-module'.
|
||||||
|
*** Mes now supports a hash_table type.
|
||||||
|
*** Mes now supports a struct type.
|
||||||
|
*** Mes now supports building a %bootstrap-mes seed from Guix.
|
||||||
|
** Language
|
||||||
|
*** Records are now implemented using struct (WAS: vector).
|
||||||
|
*** 44 new functions
|
||||||
|
ceil, char-downcase, char-set-adjoin, char-set-complement,
|
||||||
|
char-upcase, current-time, delete-file, dup, dup2, file-exists?,
|
||||||
|
floor, frame-printer, get-internal-run-time, getcwd, gettimeofday,
|
||||||
|
hash, hash-ref, hash-set!, hash-table-printer, hashq,
|
||||||
|
hashq-get-handle, hashq-ref, hashq-set, inexact->exact,
|
||||||
|
make-hash-table, make-stack, make-struct, module-define!,
|
||||||
|
module-printer, module-ref, module-variable, read-line, round,
|
||||||
|
stack-length, stack-ref, string-downcase, string-tokenize,
|
||||||
|
string-upcase, struct-length, struct-ref, struct-set! struct-vtable,
|
||||||
|
struct-vtable, with-error-to-file.
|
||||||
|
** MesCC
|
||||||
|
*** Assembly defines have been cleaned-up: duplicates deleted, missing added, wrong fixed.
|
||||||
|
*** MesCC now supports compiling GNU Bash and GNU Tar.
|
||||||
|
**** 6 New functions
|
||||||
|
getegid, geteuid, getppid, setgid, setuid, sigdelset, sigprocmask.
|
||||||
|
**** 22 New macros
|
||||||
|
EACCES, ENOSPC, ESPIPE, INT16_MAX, INT16_MIN, INT32_MAX, INT32_MIN,
|
||||||
|
INT64_MAX, INT64_MIN, INT8_MAX, INT8_MIN, LLONG_MAX, LLONG_MIN,
|
||||||
|
SIZE_MAX SYS_getegid, SYS_geteuid, SYS_setgid SYS_setuid, S_IRGRP,
|
||||||
|
S_IROTH, S_IRWXG, S_IRWXO S_ISGID, S_ISUID, S_IWGRP, S_IWOTH, S_IXGRP,
|
||||||
|
S_IXOTH, UINT16_MAX, UINT32_MAX, UINT64_MAX, UINT8_MAX,
|
||||||
|
_POSIX_VERSION.
|
||||||
|
** Noteworthy bug fixes
|
||||||
|
*** Mes now supports characters #\xNN.
|
||||||
|
*** Mes now supports assq-ref and assoc-ref with alist == #f.
|
||||||
|
*** Mes now supports \xNN in strings. This allows using Nyacc-0.86.0.
|
||||||
|
*** MesCC now supports the unary plus operator.
|
||||||
|
*** MesCC now supports the `U' integer suffix.
|
||||||
|
*** MesCC now comes with INTnn_MIN/MAX, UINTnn defines in stdint.h.
|
||||||
|
*** MesCC now always exits non-zero when assembler or linker fail.
|
||||||
|
|
||||||
|
Greetings,
|
||||||
|
janneke
|
||||||
|
|
||||||
|
[0] https://www.gnu.org/software/mes
|
||||||
|
[1] http://joyofsource.com/reduced-binary-seed-bootstrap.html
|
||||||
|
[2] https://www.gnu.org/software/guix
|
||||||
|
[3] https://bootstrappable.org
|
||||||
|
[4] https://github.com/oriansj/mes-m2
|
||||||
|
[5] https://github.com/oriansj/m2-planet
|
||||||
|
[6] https://github.com/schemeway/lalr-scm
|
||||||
|
[7] https://www.cs.indiana.edu/chezscheme/syntax-case/old-psyntax.html
|
||||||
|
[8] https://www.nongnu.org/nyacc
|
||||||
|
[9] https://gitlab.com/janneke/tinycc
|
||||||
|
[10] http://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf
|
||||||
|
[11] https://github.com/oriansj/stage0
|
|
@ -0,0 +1,133 @@
|
||||||
|
|
||||||
|
Subject: GNU Mes 0.20 released
|
||||||
|
|
||||||
|
<#secure method=pgpmime mode=sign>
|
||||||
|
|
||||||
|
We are pleased to announce the release of GNU Mes 0.20, representing
|
||||||
|
147 commits over 38 weeks.
|
||||||
|
|
||||||
|
Mes has now brought the Reduced Binary Seed bootstrap to Guix (bootstrap
|
||||||
|
a GNU/Linux system without binary GNU toolchain or equivalent). It
|
||||||
|
should land in Guix master any day now: a big thank you to everyone who
|
||||||
|
helped, notably Ludovic and Mark.
|
||||||
|
|
||||||
|
This release is a step towards the upcoming Scheme-only bootstrap and
|
||||||
|
bringing Mes into NixOS and Debian. This effort is now sponsored by
|
||||||
|
NLnet[12].
|
||||||
|
|
||||||
|
Next targets:
|
||||||
|
|
||||||
|
- ARM support
|
||||||
|
- Reduced Binary Seed bootstrap for ARM
|
||||||
|
- Scheme-only bootstrap: use Guile and Gash to remove bash,
|
||||||
|
coreutils&co, grep, sed, etc. from the Guix bootstrap binaries
|
||||||
|
- mes-m2: port Mes.c to M2-Planet
|
||||||
|
- Introduce Reduced Binaries Seed bootstrap to NixOS
|
||||||
|
- Debian?
|
||||||
|
- Hurd
|
||||||
|
|
||||||
|
Packages are available in Guix master.
|
||||||
|
|
||||||
|
* About
|
||||||
|
|
||||||
|
GNU Mes[0] brings a Reduced Binary Seed bootstrap[1] to GNU Guix[2]
|
||||||
|
and potentially to any other interested GNU/Linux distribution, and
|
||||||
|
aims to help create a full source bootstrap as part of the
|
||||||
|
bootstrappable builds[3] effort.
|
||||||
|
|
||||||
|
It consists of a mutual self-hosting Scheme interpreter written in
|
||||||
|
~5,000 LOC of simple C and a Nyacc-based C compiler written in Scheme.
|
||||||
|
This mes.c is being simplified[4] to be transpiled by M2-Planet[5].
|
||||||
|
|
||||||
|
The Scheme interpreter (mes.c) has a Garbage Collector, a library of
|
||||||
|
loadable Scheme modules-- notably Dominique Boucher's LALR[6], Pre-R6RS
|
||||||
|
[portable syntax-case[7] with R7RS ellipsis, Matt Wette's Nyacc[8] --and test
|
||||||
|
suite just barely enough to support a simple REPL and simple
|
||||||
|
C-compiler: MesCC.
|
||||||
|
|
||||||
|
Mes+MesCC can compile an only lightly patched TinyCC[9] that is
|
||||||
|
self-hosting. Using this tcc and the Mes C library we now have a
|
||||||
|
Reduced Binary Seed bootstrap for the gnutools triplet: glibc-2.2.5,
|
||||||
|
binutils-2.20.1, gcc-2.95.3. This is enough to bootstrap Guix for
|
||||||
|
i686-linux and x86_64-linux.
|
||||||
|
|
||||||
|
Mes is inspired by The Maxwell Equations of Software: LISP-1.5[10] -- John
|
||||||
|
McCarthy page 13, GNU Guix's source/binary packaging transparency and
|
||||||
|
Jeremiah Orians's stage0[11] ~500 byte self-hosting hex assembler.
|
||||||
|
|
||||||
|
* Download
|
||||||
|
|
||||||
|
git clone git://git.savannah.gnu.org/mes.git
|
||||||
|
|
||||||
|
Here are the compressed sources and a GPG detached signature[*]:
|
||||||
|
https://ftp.gnu.org/gnu/mes/mes-0.20.tar.gz
|
||||||
|
https://ftp.gnu.org/gnu/mes/mes-0.20.tar.gz.sig
|
||||||
|
|
||||||
|
Use a mirror for higher download bandwidth:
|
||||||
|
https://ftpmirror.gnu.org/mes/mes-0.20.tar.gz
|
||||||
|
https://ftpmirror.gnu.org/mes/mes-0.20.tar.gz.sig
|
||||||
|
|
||||||
|
Here are the MD5 and SHA1 checksums:
|
||||||
|
|
||||||
|
df839a83e4a2ad6c2a4accc5bf17b1a7 mes-0.20.tar.gz
|
||||||
|
38d4cb3fa28fa1f5fc57fea9e046d4d8052bbb8c mes-0.20.tar.gz
|
||||||
|
|
||||||
|
[*] Use a .sig file to verify that the corresponding file (without the
|
||||||
|
.sig suffix) is intact. First, be sure to download both the .sig file
|
||||||
|
and the corresponding tarball. Then, run a command like this:
|
||||||
|
|
||||||
|
gpg --verify mes-0.20.tar.gz.sig
|
||||||
|
|
||||||
|
If that command fails because you don't have the required public key,
|
||||||
|
then run this command to import it:
|
||||||
|
|
||||||
|
gpg --keyserver keys.gnupg.net --recv-keys 1A858392E331EAFDB8C27FFBF3C1A0D9C1D65273
|
||||||
|
|
||||||
|
and rerun the 'gpg --verify' command.
|
||||||
|
|
||||||
|
* Get informed, get involved
|
||||||
|
|
||||||
|
See https://bootstrappable.org
|
||||||
|
Join #bootstrappable on irc.freenode.net.
|
||||||
|
|
||||||
|
* Changes in 0.20 since 0.19
|
||||||
|
** Core
|
||||||
|
*** The build system has been simplified, again.
|
||||||
|
Mes now builds ootb on Debian.
|
||||||
|
*** Mes now supports -c EXPR.
|
||||||
|
** Divide by zero is now flagged.
|
||||||
|
** Language
|
||||||
|
*** 1 new function:
|
||||||
|
take-while.
|
||||||
|
** MesCC
|
||||||
|
*** The C libraries have been exploded into one function per file.
|
||||||
|
*** MesCC now has enhanced POSIX/gcc comand line support, e.g. -DFOO=1,
|
||||||
|
-nodefaultlibs, -nostartfiles, -nostdlib.
|
||||||
|
*** The archiver is now called `mesar'.
|
||||||
|
*** MesCC now supports Nyacc-0.99.
|
||||||
|
*** MesCC now depends on MesCC-Tools 0.6.0.
|
||||||
|
*** 1 new function
|
||||||
|
__mesabi_uldiv.
|
||||||
|
** Noteworthy bug fixes
|
||||||
|
*** interger division has been fixed.
|
||||||
|
*** isatty now looks at terminfo.
|
||||||
|
*** signal now uses sigaction correctly for non-x86.
|
||||||
|
*** string->number now support #x hex-prefix.
|
||||||
|
*** ungetc now has a buffer per file handle.
|
||||||
|
|
||||||
|
Greetings,
|
||||||
|
janneke and Danny.
|
||||||
|
|
||||||
|
[0] https://www.gnu.org/software/mes
|
||||||
|
[1] http://joyofsource.com/reduced-binary-seed-bootstrap.html
|
||||||
|
[2] https://www.gnu.org/software/guix
|
||||||
|
[3] https://bootstrappable.org
|
||||||
|
[4] https://github.com/oriansj/mes-m2
|
||||||
|
[5] https://github.com/oriansj/m2-planet
|
||||||
|
[6] https://github.com/schemeway/lalr-scm
|
||||||
|
[7] https://www.cs.indiana.edu/chezscheme/syntax-case/old-psyntax.html
|
||||||
|
[8] https://www.nongnu.org/nyacc
|
||||||
|
[9] https://gitlab.com/janneke/tinycc
|
||||||
|
[10] http://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf
|
||||||
|
[11] https://savannah.nongnu.org/projects/stage0
|
||||||
|
[12] https://nlnet.nl/project/GNUMes
|
|
@ -0,0 +1,132 @@
|
||||||
|
|
||||||
|
Subject: GNU Mes 0.21 released
|
||||||
|
|
||||||
|
<#secure method=pgpmime mode=sign>
|
||||||
|
|
||||||
|
We are pleased to announce the release of GNU Mes 0.21, representing
|
||||||
|
54 commits over 10 weeks.
|
||||||
|
|
||||||
|
Mes has now brought the Reduced Binary Seed bootstrap to Guix (bootstrap
|
||||||
|
a GNU/Linux system without binary GNU toolchain or equivalent). See
|
||||||
|
https://guix.gnu.org/blog/2019/guix-reduces-bootstrap-seed-by-50/
|
||||||
|
|
||||||
|
This release supports a Scheme-only bootstrap: Mes can now be built with
|
||||||
|
Gash and the experimental Gash Core Utils instead of using GNU Awk, GNU
|
||||||
|
Bash, the GNU Core Utilities, GNU Grep, GNU Gzip, GNU Make, GNU SED, and
|
||||||
|
GNU Tar. Also, the Mes C Library now supports bootstrapping those.
|
||||||
|
Finally, this release brings Mes as a package to Debian GNU/Linux.
|
||||||
|
|
||||||
|
We are excited that the Nlnet Foundation[12] is now sponsoring this
|
||||||
|
work!
|
||||||
|
|
||||||
|
Next targets:
|
||||||
|
|
||||||
|
- Introduce the Reduced Binaries Seed bootstrap to NixOS (Debian,
|
||||||
|
Gentoo, ...?)
|
||||||
|
- Scheme-only bootstrap: use Guile, Gash and Gash Core Utils to remove
|
||||||
|
awk, bash, core utilities, grep, gzip, make, sed, tar, etc. from the
|
||||||
|
Guix bootstrap binaries
|
||||||
|
- ARM support
|
||||||
|
- Full Source Bootstrap: compile Mes.c using M2-Planet
|
||||||
|
- Reduced Binary Seed bootstrap for ARM
|
||||||
|
- the Hurd
|
||||||
|
|
||||||
|
Packages are available in Guix master.
|
||||||
|
|
||||||
|
* About
|
||||||
|
|
||||||
|
GNU Mes[0] brings a Reduced Binary Seed bootstrap[1] to GNU Guix[2].
|
||||||
|
This bootstrap has halved the size of opaque, uninspectable binaries
|
||||||
|
that were needed to bootstrap Guix 1.0. The final goal is to help
|
||||||
|
create a full source bootstrap as part of the bootstrappable builds[3]
|
||||||
|
effort for any interested UNIX-like operating system.
|
||||||
|
|
||||||
|
Mes consists of a mutual self-hosting Scheme interpreter written in
|
||||||
|
~5,000 LOC of simple C, and a C compiler written in Scheme. This
|
||||||
|
mes.c is being simplified[4] to be transpiled by M2-Planet[5].
|
||||||
|
|
||||||
|
The Scheme interpreter has a Garbage Collector, a library of loadable
|
||||||
|
Scheme modules-- notably Dominique Boucher's LALR[6], Pre-R6RS
|
||||||
|
[portable syntax-case[7] with R7RS ellipsis, Matt Wette's Nyacc[8]
|
||||||
|
--and test suite, just enough to support a REPL and a C99 compiler:
|
||||||
|
MesCC.
|
||||||
|
|
||||||
|
Mes+MesCC can compile an only lightly patched TinyCC[9] that is
|
||||||
|
self-hosting. Using this tcc and the Mes C library we now have a
|
||||||
|
Reduced Binary Seed bootstrap for the gnutools triplet: glibc-2.2.5,
|
||||||
|
binutils-2.20.1, gcc-2.95.3. This is enough to bootstrap Guix for
|
||||||
|
i686-linux and x86_64-linux.
|
||||||
|
|
||||||
|
Mes is inspired by The Maxwell Equations of Software: LISP-1.5[10] -- John
|
||||||
|
McCarthy page 13, GNU Guix's source/binary packaging transparency and
|
||||||
|
Jeremiah Orians's stage0[11] ~500 byte self-hosting hex assembler.
|
||||||
|
|
||||||
|
* Download
|
||||||
|
|
||||||
|
git clone git://git.savannah.gnu.org/mes.git
|
||||||
|
|
||||||
|
Here are the compressed sources and a GPG detached signature[*]:
|
||||||
|
https://ftp.gnu.org/gnu/mes/mes-0.21.tar.gz
|
||||||
|
https://ftp.gnu.org/gnu/mes/mes-0.21.tar.gz.sig
|
||||||
|
|
||||||
|
Use a mirror for higher download bandwidth:
|
||||||
|
https://ftpmirror.gnu.org/mes/mes-0.21.tar.gz
|
||||||
|
https://ftpmirror.gnu.org/mes/mes-0.21.tar.gz.sig
|
||||||
|
|
||||||
|
Here are the MD5 and SHA1 checksums:
|
||||||
|
|
||||||
|
dea43529d2d84fb4b9d81bdd9efcc715 mes-0.21.tar.gz
|
||||||
|
35721a81feeab6e0d5913b8bf78f18951edbb964 mes-0.21.tar.gz
|
||||||
|
|
||||||
|
[*] Use a .sig file to verify that the corresponding file (without the
|
||||||
|
.sig suffix) is intact. First, be sure to download both the .sig file
|
||||||
|
and the corresponding tarball. Then, run a command like this:
|
||||||
|
|
||||||
|
gpg --verify mes-0.21.tar.gz.sig
|
||||||
|
|
||||||
|
If that command fails because you don't have the required public key,
|
||||||
|
then run this command to import it:
|
||||||
|
|
||||||
|
gpg --keyserver keys.gnupg.net --recv-keys 1A858392E331EAFDB8C27FFBF3C1A0D9C1D65273
|
||||||
|
|
||||||
|
and rerun the 'gpg --verify' command.
|
||||||
|
|
||||||
|
* Get informed, get involved
|
||||||
|
|
||||||
|
See https://bootstrappable.org
|
||||||
|
Join #bootstrappable on irc.freenode.net.
|
||||||
|
|
||||||
|
* Changes in 0.21 since 0.20
|
||||||
|
** Core
|
||||||
|
*** Mes can now be bootstrapped with Gash and Gash Core Utils.
|
||||||
|
*** Mes now supports a Scheme-only bootstrap.
|
||||||
|
*** Mes now supports -c EXPR.
|
||||||
|
** MesCC
|
||||||
|
*** Mes C Library now supports bootstrapping GNU Awk, GNU Bash, GNU SED, and GNU Tar.
|
||||||
|
*** Mes C Library now has limited float support in vfprintf, vsnprintf, vsscanf.
|
||||||
|
**** 7 new functions
|
||||||
|
abtod, atof, creat, dtoab, execlp, isgraph, mknod, readlink, strtod,
|
||||||
|
symlink.
|
||||||
|
**** 5 new stubs
|
||||||
|
getgrgid, getgrnam, getpgid, getpgrp, mktime, setgrent.
|
||||||
|
** Noteworthy bug fixes
|
||||||
|
*** A bug with `mes -c EXPR' has been fixed.
|
||||||
|
*** The REPL now works again on x86_64.
|
||||||
|
*** --with-system-libc now works again.
|
||||||
|
|
||||||
|
Greetings,
|
||||||
|
janneke and Danny.
|
||||||
|
|
||||||
|
[0] https://www.gnu.org/software/mes
|
||||||
|
[1] https://guix.gnu.org/blog/2019/guix-reduces-bootstrap-seed-by-50/
|
||||||
|
[2] https://www.gnu.org/software/guix
|
||||||
|
[3] https://bootstrappable.org
|
||||||
|
[4] https://github.com/oriansj/mes-m2
|
||||||
|
[5] https://github.com/oriansj/m2-planet
|
||||||
|
[6] https://github.com/schemeway/lalr-scm
|
||||||
|
[7] https://www.cs.indiana.edu/chezscheme/syntax-case/old-psyntax.html
|
||||||
|
[8] https://www.nongnu.org/nyacc
|
||||||
|
[9] https://gitlab.com/janneke/tinycc
|
||||||
|
[10] http://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf
|
||||||
|
[11] https://savannah.nongnu.org/projects/stage0
|
||||||
|
[12] https://nlnet.nl/project/GNUMes
|
|
@ -0,0 +1,162 @@
|
||||||
|
|
||||||
|
Subject: GNU Mes 0.22 released
|
||||||
|
|
||||||
|
<#secure method=pgpmime mode=sign>
|
||||||
|
|
||||||
|
We are pleased to announce the release of GNU Mes 0.22, representing
|
||||||
|
57 commits over 8 weeks.
|
||||||
|
|
||||||
|
Mes can now be built reproducibly by mes+mescc or guile+mescc accross
|
||||||
|
distributions such as GNU Guix, Debian GNU/Linux and NixOS. Also, many
|
||||||
|
build issues were fixed. A big thank you to reproducible-builds.org,
|
||||||
|
Vagrant Cascadian, Jelle van der Waa, Hannes Mehnert and David Terry!
|
||||||
|
|
||||||
|
Mes now runs on the Hurd--mescc does not run yet, many system calls are
|
||||||
|
missing, especially fork/exec--and initial scaffolding support for
|
||||||
|
creating FreeBSD binaries was added.
|
||||||
|
|
||||||
|
This release better supports bringing the Scheme-only bootstrap to Guix:
|
||||||
|
it no longer requires an update to the Guix bootstrap seed.
|
||||||
|
|
||||||
|
The Scheme-only bootstrap means that Mes can now be built with Gash and
|
||||||
|
the experimental Gash Core Utils instead of using GNU Awk, GNU Bash, the
|
||||||
|
GNU Core Utilities, GNU Grep, GNU Gzip, GNU Make, GNU Sed, and GNU Tar.
|
||||||
|
Also, the Mes C Library now supports bootstrapping those.
|
||||||
|
|
||||||
|
We are excited that the Nlnet Foundation[12] is now sponsoring this
|
||||||
|
work!
|
||||||
|
|
||||||
|
Next targets:
|
||||||
|
|
||||||
|
- Introduce the Reduced Binaries Seed bootstrap to NixOS (Debian,
|
||||||
|
Arch, Gentoo, ...?)
|
||||||
|
- Merge the Scheme-only bootstrap, the wip-bootstrap branch (using
|
||||||
|
Guile, Gash and Gash Core Utils to remove awk, bash, core utilities,
|
||||||
|
grep, gzip, make, sed, tar, etc. from the Guix bootstrap binaries)
|
||||||
|
into Guix core-updates.
|
||||||
|
- ARM support
|
||||||
|
- Full Source Bootstrap: compile Mes.c using M2-Planet
|
||||||
|
- Add full Guile module support
|
||||||
|
- Reduced Binary Seed bootstrap for ARM
|
||||||
|
- Support mescc on the Hurd (fork/exec, ...)
|
||||||
|
|
||||||
|
Packages are available in Guix master; the cross-distro reproducible
|
||||||
|
is built using
|
||||||
|
|
||||||
|
guix build --system=i686-linux mes-rb5
|
||||||
|
|
||||||
|
* About
|
||||||
|
|
||||||
|
GNU Mes[0] is a Scheme interpreter and C compiler for bootstrapping the GNU
|
||||||
|
System. Since version 0.22 it has again helped to halve the size of
|
||||||
|
opaque, uninspectable binary seeds that are currently being used in the
|
||||||
|
Reduced Binary Seed bootstrap[1] of GNU Guix[2]. The final goal is to help
|
||||||
|
create a full source bootstrap as part of the bootstrappable builds[3]
|
||||||
|
effort for UNIX-like operating systems.
|
||||||
|
|
||||||
|
The Scheme interpreter is written in ~5,000 LOC of simple C, and the C
|
||||||
|
compiler written in Scheme and these are mutual self-hosting. This
|
||||||
|
mes.c is being simplified[4] to be transpiled by M2-Planet[5].
|
||||||
|
|
||||||
|
Mes has a Garbage Collector, a library of loadable Scheme modules--
|
||||||
|
notably Dominique Boucher's LALR[6], Pre-R6RS [portable syntax-case[7]
|
||||||
|
with R7RS ellipsis, Matt Wette's Nyacc[8] --and test suite just enough
|
||||||
|
to support a REPL and a C99 compiler: MesCC.
|
||||||
|
|
||||||
|
Mes+MesCC can compile an only lightly patched TinyCC[9] that is
|
||||||
|
self-hosting. Using this tcc and the Mes C library we now have a
|
||||||
|
Reduced Binary Seed bootstrap for the gnutools triplet: glibc-2.2.5,
|
||||||
|
binutils-2.20.1, gcc-2.95.3. This is enough to bootstrap Guix for
|
||||||
|
i686-linux and x86_64-linux.
|
||||||
|
|
||||||
|
Mes is inspired by The Maxwell Equations of Software: LISP-1.5[10] -- John
|
||||||
|
McCarthy page 13, GNU Guix's source/binary packaging transparency and
|
||||||
|
Jeremiah Orians's stage0[11] ~500 byte self-hosting hex assembler.
|
||||||
|
|
||||||
|
* Download
|
||||||
|
|
||||||
|
git clone git://git.savannah.gnu.org/mes.git
|
||||||
|
|
||||||
|
Here are the compressed sources and a GPG detached signature[*]:
|
||||||
|
https://ftp.gnu.org/gnu/mes/mes-0.22.tar.gz
|
||||||
|
https://ftp.gnu.org/gnu/mes/mes-0.22.tar.gz.sig
|
||||||
|
|
||||||
|
Use a mirror for higher download bandwidth:
|
||||||
|
https://ftpmirror.gnu.org/mes/mes-0.22.tar.gz
|
||||||
|
https://ftpmirror.gnu.org/mes/mes-0.22.tar.gz.sig
|
||||||
|
|
||||||
|
Here are the MD5 and SHA1 checksums:
|
||||||
|
|
||||||
|
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx mes-0.22.tar.gz
|
||||||
|
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx mes-0.22.tar.gz
|
||||||
|
|
||||||
|
[*] Use a .sig file to verify that the corresponding file (without the
|
||||||
|
.sig suffix) is intact. First, be sure to download both the .sig file
|
||||||
|
and the corresponding tarball. Then, run a command like this:
|
||||||
|
|
||||||
|
gpg --verify mes-0.22.tar.gz.sig
|
||||||
|
|
||||||
|
If that command fails because you don't have the required public key,
|
||||||
|
then run this command to import it:
|
||||||
|
|
||||||
|
gpg --keyserver keys.gnupg.net --recv-keys 1A858392E331EAFDB8C27FFBF3C1A0D9C1D65273
|
||||||
|
|
||||||
|
and rerun the 'gpg --verify' command.
|
||||||
|
|
||||||
|
* Get informed, get involved
|
||||||
|
|
||||||
|
See https://bootstrappable.org
|
||||||
|
Join #bootstrappable on irc.freenode.net.
|
||||||
|
|
||||||
|
* Changes in 0.22 since 0.21
|
||||||
|
** Core
|
||||||
|
*** Mes now builds reproducibly with MesCC, cross distribution
|
||||||
|
Using --with-bootstrap on x86, a bin/mes-mescc is compiled with
|
||||||
|
mes+mescc, that shall have sha256sum
|
||||||
|
|
||||||
|
9e0bcb1633c58e7bc415f6ea27cee7951d6b0658e13cdc147e992b31a14625fb bin/mes-mescc
|
||||||
|
|
||||||
|
This has been verified on GNU Guix, Debian GNU/Linux and NixOS.
|
||||||
|
*** Mes now builds reproducibly with Guile+MesCC vs Mes+MesCC.
|
||||||
|
*** Mes now builds reproducibly with Tiny CC-built MesCC.
|
||||||
|
*** configure now respects the user's CFLAGS, CPPFLAGS and LDFLAGS.
|
||||||
|
*** Mes now supports mescc-tools 0.5.2 next to 0.6.1.
|
||||||
|
This allows introducing the Scheme-only bootstrap without updating or
|
||||||
|
adding new bootstrap binary seeds into GNU Guix.
|
||||||
|
*** Mes now runs when configured --with-courage on the Hurd:
|
||||||
|
GNU debian 0.9 GNU-Mach 1.8+git20170609-486/Hurd-0.9 i686-AT386 GNU
|
||||||
|
Note that mescc does not run; fork and exec are not yet implemented.
|
||||||
|
*** Mes now configures --with-courage on x86-FreeBSD 12.1
|
||||||
|
The initial ELF scaffold tests: exit-42.S, 0exit-42.hex2,
|
||||||
|
body-exit-42.hex2, hello-mes.S, 0hello-mes.hex2, body-hello-mes.hex2
|
||||||
|
pass.
|
||||||
|
*** configure now has a --with-bootstrap option.
|
||||||
|
This adds the reproducible bootstrap build of bin/mes-mescc, using
|
||||||
|
mes+mescc.
|
||||||
|
*** configure prefers $CC over gcc; tcc over gcc, gcc over cc.
|
||||||
|
*** Mes now prints an error when attempting to read a file that does not exist.
|
||||||
|
*** Mes no longer depends on GIT.
|
||||||
|
** Noteworthy bug fixes
|
||||||
|
*** Several annoying build problems were fixed, for non-Guix systems.
|
||||||
|
*** A bug with buffered-read was fixed.
|
||||||
|
This means that bash-2.05 can now build glibc-2.2.5; notably it now
|
||||||
|
successfully executes make-syscall.sh.
|
||||||
|
*** A bug with execlp, execvp for file names containing a slash was fixed.
|
||||||
|
This should allow make-3.80 running scripts that have "#! ./move-if-change".
|
||||||
|
|
||||||
|
Greetings,
|
||||||
|
janneke and Danny.
|
||||||
|
|
||||||
|
[0] https://www.gnu.org/software/mes
|
||||||
|
[1] https://guix.gnu.org/blog/2019/guix-reduces-bootstrap-seed-by-50/
|
||||||
|
[2] https://www.gnu.org/software/guix
|
||||||
|
[3] https://bootstrappable.org
|
||||||
|
[4] https://github.com/oriansj/mes-m2
|
||||||
|
[5] https://github.com/oriansj/m2-planet
|
||||||
|
[6] https://github.com/schemeway/lalr-scm
|
||||||
|
[7] https://www.cs.indiana.edu/chezscheme/syntax-case/old-psyntax.html
|
||||||
|
[8] https://www.nongnu.org/nyacc
|
||||||
|
[9] https://gitlab.com/janneke/tinycc
|
||||||
|
[10] http://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf
|
||||||
|
[11] https://savannah.nongnu.org/projects/stage0
|
||||||
|
[12] https://nlnet.nl/project/GNUMes
|
|
@ -0,0 +1,99 @@
|
||||||
|
Subject: on bootstrapping: first Mes 0.3 released
|
||||||
|
|
||||||
|
I am pleased to announce the first release of Mes: 0.3, representing
|
||||||
|
152 commits over 3 months since the second status report[1].
|
||||||
|
|
||||||
|
* About
|
||||||
|
|
||||||
|
Mes aims to create an entirely source-based bootstrapping path. The
|
||||||
|
target is to [have GuixSD] boostrap from a minimal, easily inspectable
|
||||||
|
binary --that should be readable as source-- into something close to
|
||||||
|
R6RS Scheme.
|
||||||
|
|
||||||
|
As bootstrapping is presumably easiest and probably most fun with
|
||||||
|
Scheme, the next step for Mes is mescc: a C compiler/linker to
|
||||||
|
boostrap into GNU Gcc and GNU Guile, possibly via Tiny-CC.
|
||||||
|
|
||||||
|
It currently has an interpreter written in C (mes) with Garbage
|
||||||
|
Collector (Jam Scraper), a library of loadable Scheme modules with
|
||||||
|
test suite just barely enough to support a simple REPL (repl.mes)
|
||||||
|
and a proof-of-concept c-compiler (mescc.mes) that produces an elf
|
||||||
|
from the simplest of C files.
|
||||||
|
|
||||||
|
Mes is inspired by The Maxwell Equations of Software: LISP-1.5[2]
|
||||||
|
-- John McCarthy page 13
|
||||||
|
|
||||||
|
* Download
|
||||||
|
|
||||||
|
git clone https://gitlab.com/janneke/mes
|
||||||
|
|
||||||
|
wget https://gitlab.com/janneke/mes/repository/archive.tar.gz?ref=v0.3 -O mes-0.3.tar.gz
|
||||||
|
|
||||||
|
Mes runs from the source tree and can also be built, packaged and
|
||||||
|
installed in Guix[SD] by the usual
|
||||||
|
|
||||||
|
guix package -f guix.scm
|
||||||
|
|
||||||
|
|
||||||
|
* Changes in 0.3 since 0.2
|
||||||
|
** Core
|
||||||
|
*** Number-based rather than pointer-based cells.
|
||||||
|
*** Garbage collector aka Jam scraper.
|
||||||
|
A variant on SICP's stop and copy Garbage Collector (Jam Scraper?)
|
||||||
|
algorithm has been implemented.
|
||||||
|
*** The reader has been moved to Scheme.
|
||||||
|
** Language
|
||||||
|
*** Simple loadable modules.
|
||||||
|
*** Srfi-9 and match use handwritten syntax-rules (mes-use-module (mes syntax)).
|
||||||
|
*** Optional syntax-case using psyntax (mes-use-module (mes psyntax)).
|
||||||
|
** Noteworthy bug fixes
|
||||||
|
*** Srfi-0 has been fixed.
|
||||||
|
|
||||||
|
* Changes in 0.2 since 0.1
|
||||||
|
** Core
|
||||||
|
*** Names of symbols and strings are list of characters [WAS: c-string].
|
||||||
|
*** Sc-expand from pre-R6RS's psyntax has been integrated.
|
||||||
|
*** Undefined variable error now shows the name of the undefined variable.
|
||||||
|
*** There is now only one SCM type for builtin functions.
|
||||||
|
*** Macro expansion has been cleaned-up.
|
||||||
|
** Language
|
||||||
|
*** Mes now provides a subset of R6RS.
|
||||||
|
*** Mes now provides syntax-case.
|
||||||
|
*** Mes now provides `load'.
|
||||||
|
** Noteworthy bug fixes
|
||||||
|
*** Using values as second parameter of builtin function yields first value.
|
||||||
|
*** Quoted internals (e.g. 'if 'lambda) are now symbols.
|
||||||
|
*** Syntax error now exits.
|
||||||
|
*** Make+Bash voodoo has been replaced by build-aux/mes-snarf.scm.
|
||||||
|
*** Apply now accepts multiple list arguments.
|
||||||
|
*** Apply of character, inernal, number, string is an error.
|
||||||
|
*** Quasisyntax reading
|
||||||
|
|
||||||
|
* Changes in 0.1 (since progress report #2)
|
||||||
|
** Core
|
||||||
|
*** expand_macro is now a separate function.
|
||||||
|
*** A smaller core can now compiled using BOOT=1.
|
||||||
|
The smaller core does not provide define, define-macro, or quasiquote;
|
||||||
|
these are provided from a Scheme version of implemented eval/apply.
|
||||||
|
** Language
|
||||||
|
*** Mes now provides a subset of R5RS.
|
||||||
|
*** Mes now provides let-syntax.
|
||||||
|
*** Mes now provides match.
|
||||||
|
*** Mes now provides quasisyntax, unsyntax and unsyntax-splicing.
|
||||||
|
** User interface
|
||||||
|
*** Mes now provides a REPL, run:
|
||||||
|
scripts/repl.mes
|
||||||
|
*** Mes compiler can be run as a script:
|
||||||
|
scripts/mescc.mes doc/examples/main.c
|
||||||
|
*** Macro expansion can be inspected in the REPL, e.g.:
|
||||||
|
,expand (and 0 1)
|
||||||
|
** Noteworthy bug fixes
|
||||||
|
*** Performance: scripts/mescc.mes now takes 2s to compile main.c (was 1'20").
|
||||||
|
*** Symbols are now truly unique.
|
||||||
|
* '(), #t, #f are no longer symbols.
|
||||||
|
|
||||||
|
Greetings,
|
||||||
|
Jan
|
||||||
|
|
||||||
|
[1] https://lists.nongnu.org/archive/html/guile-user/2016-09/msg00061.html
|
||||||
|
[2] http://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf
|
|
@ -0,0 +1,103 @@
|
||||||
|
Subject: Mes 0.4 released
|
||||||
|
|
||||||
|
I am pleased to announce the release of Mes 0.4, representing 115
|
||||||
|
commits over barely two weeks. It now runs Nyacc and PEG and has much
|
||||||
|
reduced core.
|
||||||
|
|
||||||
|
* About
|
||||||
|
|
||||||
|
Mes aims to create an entirely source-based bootstrapping path. The
|
||||||
|
target is to [have GuixSD] boostrap from a minimal, easily inspectable
|
||||||
|
binary --that should be readable as source-- into something close to
|
||||||
|
R6RS Scheme.
|
||||||
|
|
||||||
|
As bootstrapping is presumably easiest and probably most fun with
|
||||||
|
Scheme, the next step for Mes is mescc: a C compiler/linker to
|
||||||
|
boostrap into GNU Gcc and GNU Guile, possibly via Tiny-CC.
|
||||||
|
|
||||||
|
It currently has an interpreter written in C (mes) with Garbage
|
||||||
|
Collector (Jam Scraper), a library of loadable Scheme modules--
|
||||||
|
notably Dominique Boucher's LALR[1], Pre-R6RS portable
|
||||||
|
syntax-case[2] with R7RS ellipsis, Nyacc[3] and Guile's PEG[4]
|
||||||
|
--and test suite just barely enough to support a simple REPL
|
||||||
|
(repl.mes) and a proof-of-concept C-compiler (mescc.mes) that
|
||||||
|
produces an elf from the simplest of C files.
|
||||||
|
|
||||||
|
Mes is inspired by The Maxwell Equations of Software: LISP-1.5[5]
|
||||||
|
-- John McCarthy page 13
|
||||||
|
|
||||||
|
* Download
|
||||||
|
|
||||||
|
git clone https://gitlab.com/janneke/mes
|
||||||
|
|
||||||
|
wget https://gitlab.com/janneke/mes/repository/archive.tar.gz?ref=v0.4 -O mes-0.4.tar.gz
|
||||||
|
|
||||||
|
Mes runs from the source tree and can also be built, packaged and
|
||||||
|
installed in Guix[SD] by the usual
|
||||||
|
|
||||||
|
guix package -f guix.scm
|
||||||
|
|
||||||
|
* Changes in 0.4 since 0.3
|
||||||
|
** Core
|
||||||
|
*** Improved performance.
|
||||||
|
Macros are now memoized; after expansion and before eval'ing the
|
||||||
|
expanded form, their input s-expression is replaced by the expansion.
|
||||||
|
This yields a nice performance improvement which finally allowed
|
||||||
|
moving all non-essential bits from the C-core into Scheme...including
|
||||||
|
the reader. The Scheme reader is much, much slower than the previous
|
||||||
|
C version, making Mes--again-- feel slow. Think of that as a feature.
|
||||||
|
*** Bootstrap with minimal reader in C.
|
||||||
|
The C-reader needs only support reading of words and lists
|
||||||
|
(s-expressions), line-comments to read the initial Scheme reader which
|
||||||
|
then takes over and handles reading of quoting, characters, strings,
|
||||||
|
block-comments.
|
||||||
|
*** Reduced size.
|
||||||
|
Total C size: ~1500LOC. The main Mes evaluator is now ~1000LOC
|
||||||
|
including cell creation and garbage collector. This code is able to
|
||||||
|
execute a Scheme program that has been loaded into memory. Another
|
||||||
|
~500LOC is spent to load a minimal Scheme program and to dump it, to
|
||||||
|
provide a small posix interface, math functions and do some error
|
||||||
|
reporting.
|
||||||
|
*** Programs can be dumped and loaded using --dump and --load.
|
||||||
|
** Language
|
||||||
|
*** Minimal syntactic exception support for Nyacc.
|
||||||
|
*** Minimal syntactic fluids support for Nyacc.
|
||||||
|
*** Keywords are now supported.
|
||||||
|
*** Cond now supports =>.
|
||||||
|
*** Guile's optargs: lambda* and define* are now supported.
|
||||||
|
*** #;-comments are now supported.
|
||||||
|
*** Non-nested #| |#-comments are now supported.
|
||||||
|
*** Quasisyntax is now supported.
|
||||||
|
*** R7RS syntax-rules with custom ellipsis, with-ellipsis are now supported.
|
||||||
|
*** 9 new [partial] modules
|
||||||
|
(mes fluids), (mes nyacc), (mes optargs), (mes pmatch), (mes peg),
|
||||||
|
(srfi srfi-13), (srfi srfi-9-psyntax), (srfi srfi-26), (srfi srfi-43),
|
||||||
|
(rnrs arithmetic bitwise), (sxml xpath)
|
||||||
|
*** 36 new functions
|
||||||
|
1+, 1-, abs, and=>, append-reverse, ash, char<=?, char<?, char>=?,
|
||||||
|
char>?, even?, filter, delete, delq, vector-copy, fold, fold-right,
|
||||||
|
getenv, iota, keyword->symbol list-head, list-tail, negative?, odd?,
|
||||||
|
positive?, remove!, remove, string->number, string-copy,
|
||||||
|
string-prefix?, string=, string=?, symbol->keyword symbol-append,
|
||||||
|
symbol-prefix?, unless, write, zero?.
|
||||||
|
** Noteworthy bug fixes
|
||||||
|
*** Macros are now memoized.
|
||||||
|
*** An error is reported when using a wrong number of arguments with a call.
|
||||||
|
*** Cond now evaluates its test clauses only once.
|
||||||
|
*** Append can also handle one argument.
|
||||||
|
*** For-each now supports 2 list arguments.
|
||||||
|
*** Map now supports 3 list arguments.
|
||||||
|
*** Backslash in string is supported.
|
||||||
|
*** Closure is not a pair.
|
||||||
|
*** All standard characters are supported.
|
||||||
|
*** Mescc now also runs in Guile.
|
||||||
|
|
||||||
|
|
||||||
|
Greetings,
|
||||||
|
Jan
|
||||||
|
|
||||||
|
[1] https://github.com/schemeway/lalr-scm
|
||||||
|
[2] https://www.cs.indiana.edu/chezscheme/syntax-case/old-psyntax.html
|
||||||
|
[3] https://www.nongnu.org/nyacc/
|
||||||
|
[4] https://www.gnu.org/software/guile/docs/master/guile.html/PEG-Parsing.html
|
||||||
|
[5] http://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf
|
|
@ -0,0 +1,79 @@
|
||||||
|
Subject: Mes 0.5 released
|
||||||
|
|
||||||
|
I am pleased to announce the release of Mes 0.5, representing 250
|
||||||
|
commits over 4 months. Mes is now self-hosting, or rather it features
|
||||||
|
a mutual self-hosting Scheme interpreter and C compiler: mes.c and
|
||||||
|
mescc; a Nyacc-based C compiler backend that also works separately
|
||||||
|
with Guile.
|
||||||
|
|
||||||
|
* About
|
||||||
|
|
||||||
|
Mes aims to create full source bootstrapping for GuixSD: an
|
||||||
|
entirely source-based bootstrap path. The target is to [have
|
||||||
|
GuixSD] boostrap from a minimal, easily inspectable binary --that
|
||||||
|
should be readable as source-- into something close to R6RS
|
||||||
|
Scheme.
|
||||||
|
|
||||||
|
It currently consists of a mutual self-hosting [close to Guile-]
|
||||||
|
Scheme interpreter prototype in C and a Nyacc-based C compiler in
|
||||||
|
[Guile] Scheme.
|
||||||
|
|
||||||
|
The Scheme interpreter prototype (mes.c) has a Garbage Collector,
|
||||||
|
a library of loadable Scheme modules-- notably Dominique Boucher's
|
||||||
|
LALR[1], Pre-R6RS portable syntax-case[2] with R7RS ellipsis, Matt
|
||||||
|
Wette's Nyacc[3] Guile's PEG[4] --and test suite just barely
|
||||||
|
enough to support a simple REPL (repl.mes) and simple C-compiler
|
||||||
|
(mescc.mes) that can produce the second initial ELF binary from
|
||||||
|
binary from mes.c, in only about 2h30'.
|
||||||
|
|
||||||
|
Mes was inspired by The Maxwell Equations of Software: LISP-1.5[5]
|
||||||
|
-- John McCarthy page 13, GNU Guix's[6] source/binary packaging
|
||||||
|
transparency and Jeremiah Orians's stage0[7] bootstrap project.
|
||||||
|
|
||||||
|
* Download
|
||||||
|
|
||||||
|
git clone https://gitlab.com/janneke/mes
|
||||||
|
|
||||||
|
wget https://gitlab.com/janneke/mes/repository/archive.tar.gz?ref=v0.5 -O mes-0.5.tar.gz
|
||||||
|
|
||||||
|
Mes runs from the source tree and can also be built, packaged and
|
||||||
|
installed in Guix[SD] by the usual
|
||||||
|
|
||||||
|
guix package -f guix.scm
|
||||||
|
|
||||||
|
* Changes in 0.5 since 0.4
|
||||||
|
** Core
|
||||||
|
*** Support compilation with Mescc.
|
||||||
|
*** Support compilation with -nostdinc, -nostdlib using mlibc.
|
||||||
|
*** Support call-with-current-continuation.
|
||||||
|
*** Support exception handling, catch/throw.
|
||||||
|
*** Give sensible error message when a macro is missing.
|
||||||
|
** Language
|
||||||
|
*** Map now supports 4 lists.
|
||||||
|
*** The reader supports negative hex numbers.
|
||||||
|
*** 24 new functions
|
||||||
|
access?, assoc-set! c????r, compose, list->char-set,
|
||||||
|
open-input-string, read-string, string-delete, with-throw-handler.
|
||||||
|
** Mescc
|
||||||
|
*** Mescc can be used separately as a Nyacc-based C compiler backend for Guile.
|
||||||
|
*** Switch to Nyacc frontend, update Nyacc to 0.76.5.
|
||||||
|
*** Mescc now has a test suite, scaffold/t.c.
|
||||||
|
*** Mescc now includes a minimal C library: libc/mlib.c libc/mstart.c.
|
||||||
|
*** Mescc can now compile mes.c.
|
||||||
|
** Noteworthy bug fixes
|
||||||
|
*** The build system (configure, make) has been refactored.
|
||||||
|
*** Support map-4.
|
||||||
|
*** Evaluate arguments of OR only once.
|
||||||
|
*** Fix assq-set!
|
||||||
|
*** Fix ,expand in the REPL.
|
||||||
|
|
||||||
|
Greetings,
|
||||||
|
janneke
|
||||||
|
|
||||||
|
[1] https://github.com/schemeway/lalr-scm
|
||||||
|
[2] https://www.cs.indiana.edu/chezscheme/syntax-case/old-psyntax.html
|
||||||
|
[3] https://www.nongnu.org/nyacc/
|
||||||
|
[4] https://www.gnu.org/software/guile/docs/master/guile.html/PEG-Parsing.html
|
||||||
|
[5] http://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf
|
||||||
|
[6] https://www.gnu.org/software/guix/
|
||||||
|
[7] https://github.com/oriansj/stage0
|
|
@ -0,0 +1,82 @@
|
||||||
|
Subject: Mes 0.6 released
|
||||||
|
|
||||||
|
I am pleased to announce the release of Mes 0.6, representing 32
|
||||||
|
commits over 24 days. Mescc now works with vanilla Nyacc 0.78.3
|
||||||
|
(thanks Matt!), Nyacc has been unbundled and Mescc compiles 33/55
|
||||||
|
of tinycc test2 tests.
|
||||||
|
|
||||||
|
* About
|
||||||
|
|
||||||
|
Mes aims to create full source bootstrapping for GuixSD: an
|
||||||
|
entirely source-based bootstrap path. The target is to [have
|
||||||
|
GuixSD] boostrap from a minimal, easily inspectable binary --that
|
||||||
|
should be readable as source-- into something close to R6RS
|
||||||
|
Scheme.
|
||||||
|
|
||||||
|
It currently consists of a mutual self-hosting [close to Guile-]
|
||||||
|
Scheme interpreter prototype in C and a Nyacc-based C compiler in
|
||||||
|
[Guile] Scheme.
|
||||||
|
|
||||||
|
The Scheme interpreter prototype (mes.c) has a Garbage Collector,
|
||||||
|
a library of loadable Scheme modules-- notably Dominique Boucher's
|
||||||
|
LALR[1], Pre-R6RS portable syntax-case[2] with R7RS ellipsis, Matt
|
||||||
|
Wette's Nyacc[3] Guile's PEG[4] --and test suite just barely
|
||||||
|
enough to support a simple REPL (repl.mes) and simple C-compiler
|
||||||
|
(mescc.mes) that can produce the second initial ELF binary from
|
||||||
|
binary from mes.c, in only about 2h30'.
|
||||||
|
|
||||||
|
Mes was inspired by The Maxwell Equations of Software: LISP-1.5[5]
|
||||||
|
-- John McCarthy page 13, GNU Guix's[6] source/binary packaging
|
||||||
|
transparency and Jeremiah Orians's stage0[7] bootstrap project.
|
||||||
|
|
||||||
|
* Download
|
||||||
|
|
||||||
|
git clone https://gitlab.com/janneke/mes
|
||||||
|
|
||||||
|
wget https://gitlab.com/janneke/mes/repository/archive.tar.gz?ref=v0.6 -O mes-0.6.tar.gz
|
||||||
|
|
||||||
|
Mes runs from the source tree and can also be built, packaged and
|
||||||
|
installed in Guix[SD] by the usual
|
||||||
|
|
||||||
|
guix package -f guix.scm
|
||||||
|
|
||||||
|
* Changes in 0.6 since 0.5
|
||||||
|
** Core
|
||||||
|
*** configure, build now supports x86 and development for arm with-courage.
|
||||||
|
** Language
|
||||||
|
*** Nyacc has been unbundled and is now a dependency.
|
||||||
|
*** Mes now supports case-lambda.
|
||||||
|
*** Mes reader now supports abbreviated form for return character #\cr.
|
||||||
|
*** 1 new function
|
||||||
|
string-index.
|
||||||
|
** Mescc
|
||||||
|
*** Mescc can be used on regular C sources, like tinycc's tests/test2 suite.
|
||||||
|
*** make check passes 33/55 of tinycc's test suite etest/test2 tests.
|
||||||
|
*** Mescc now recognizes `short' as a type.
|
||||||
|
*** Mescc now supports sizeof (<identifier>), sizeof(<expression>).
|
||||||
|
*** Mescc now respects enum field initializers and supports enum variables.
|
||||||
|
*** Mescc now supports binary constants .
|
||||||
|
*** Mescc now supports assignments from ==, != boolean expressions .
|
||||||
|
*** Mescc now supports &, ^.
|
||||||
|
*** Mescc now supports struct pointers.
|
||||||
|
*** Mescc now supports struct definition with immediatete variable declaration.
|
||||||
|
*** Mescc now supports calling (returning correctly from) void functions.
|
||||||
|
*** Mescc now handles case statements breaks without compound correctly.
|
||||||
|
*** Mescc now has better [int/pointer] array support.
|
||||||
|
*** Mescc now has better support for simple (non-array-)structs.
|
||||||
|
*** Mescc now supports multiple declarations in one statement like: int a,b;
|
||||||
|
**** 2 new mlibc functions
|
||||||
|
printf, strcpy.
|
||||||
|
** Noteworthy bug fixes
|
||||||
|
*** Installed mes and mes.repl now also run outside of source tree again.
|
||||||
|
|
||||||
|
Greetings,
|
||||||
|
janneke
|
||||||
|
|
||||||
|
[1] https://github.com/schemeway/lalr-scm
|
||||||
|
[2] https://www.cs.indiana.edu/chezscheme/syntax-case/old-psyntax.html
|
||||||
|
[3] https://www.nongnu.org/nyacc/
|
||||||
|
[4] https://www.gnu.org/software/guile/docs/master/guile.html/PEG-Parsing.html
|
||||||
|
[5] http://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf
|
||||||
|
[6] https://www.gnu.org/software/guix/
|
||||||
|
[7] https://github.com/oriansj/stage0
|
|
@ -0,0 +1,83 @@
|
||||||
|
Subject: Mes 0.7 released
|
||||||
|
|
||||||
|
I am pleased to announce the release of Mes 0.7, representing 32
|
||||||
|
commits over 4 weeks. Mescc now behaves more like a regular C
|
||||||
|
compiler: supporting -E, -c, -o options and with a more complete set
|
||||||
|
of header files [stubs]; enough to work on compiling tinycc's tcc.c
|
||||||
|
albeit a somewhat modified version[8].
|
||||||
|
|
||||||
|
* About
|
||||||
|
|
||||||
|
Mes aims to create full source bootstrapping for GuixSD: an
|
||||||
|
entirely source-based bootstrap path. The target is to [have
|
||||||
|
GuixSD] boostrap from a minimal, easily inspectable binary --that
|
||||||
|
should be readable as source-- into something close to R6RS
|
||||||
|
Scheme.
|
||||||
|
|
||||||
|
It currently consists of a mutual self-hosting [close to Guile-]
|
||||||
|
Scheme interpreter prototype in C and a Nyacc-based C compiler in
|
||||||
|
[Guile] Scheme.
|
||||||
|
|
||||||
|
The Scheme interpreter prototype (mes.c) has a Garbage Collector,
|
||||||
|
a library of loadable Scheme modules-- notably Dominique Boucher's
|
||||||
|
LALR[1], Pre-R6RS portable syntax-case[2] with R7RS ellipsis, Matt
|
||||||
|
Wette's Nyacc[3] Guile's PEG[4] --and test suite just barely
|
||||||
|
enough to support a simple REPL (repl.mes) and simple C-compiler
|
||||||
|
(mescc.mes) that can produce the second initial ELF binary from
|
||||||
|
binary from mes.c, in only about 2h30'.
|
||||||
|
|
||||||
|
Mes was inspired by The Maxwell Equations of Software: LISP-1.5[5]
|
||||||
|
-- John McCarthy page 13, GNU Guix's[6] source/binary packaging
|
||||||
|
transparency and Jeremiah Orians's stage0[7] bootstrap project.
|
||||||
|
|
||||||
|
* Download
|
||||||
|
|
||||||
|
git clone https://gitlab.com/janneke/mes
|
||||||
|
|
||||||
|
wget https://gitlab.com/janneke/mes/repository/archive.tar.gz?ref=v0.7 -O mes-0.7.tar.gz
|
||||||
|
|
||||||
|
Mes runs from the source tree and can also be built, packaged and
|
||||||
|
installed in Guix[SD] by the usual
|
||||||
|
|
||||||
|
guix package -f guix.scm
|
||||||
|
|
||||||
|
* Changes in 0.7 since 0.6
|
||||||
|
** Core
|
||||||
|
*** The minimal C reader is now always included; dependencies
|
||||||
|
on i686-unknown-linux-gnu-gcc and binary read-0-32.mo have been
|
||||||
|
dropped, these are now optional.
|
||||||
|
** Language
|
||||||
|
*** Mes reader now supports octal numbers #oXXX.
|
||||||
|
*** 10 new functions
|
||||||
|
current-output-port, getopt-long, negate, open-output-file,
|
||||||
|
option-ref, set-current-output-port, string-rindex, string-suffix?,
|
||||||
|
with-ouwith-output-to-file, with-output-to-port.
|
||||||
|
** Mescc
|
||||||
|
*** Mescc can now be installed and used alongside a gcc installation.
|
||||||
|
*** Mescc can now handle const anywhere.
|
||||||
|
*** Mescc now supports array fields in structs.
|
||||||
|
*** Mescc now supports forward declarations and typedef.
|
||||||
|
*** Mescc can now handle comments anywhere.
|
||||||
|
*** Mescc now supports addition and substraction for enum field values.
|
||||||
|
*** Mescc now supports anonymous enums.
|
||||||
|
*** Mescc now supports all C99 header files needed to compile tcc.c.
|
||||||
|
*** build: C sources are now preprocessed separately, then compiled and linked.
|
||||||
|
*** build: mlibc and C sources are now compiled separately and then linked.
|
||||||
|
*** mlibc has been moved from Scheme snippets into C.
|
||||||
|
*** Mescc now supports -c, -D, -E, -I and -o options.
|
||||||
|
**** open now supports optional third mode parameter.
|
||||||
|
** Noteworthy bug fixes
|
||||||
|
*** string-index now supports function predicate.
|
||||||
|
*** number->string for radix > 10 now produces `a' instead of `:'.
|
||||||
|
|
||||||
|
Greetings,
|
||||||
|
janneke
|
||||||
|
|
||||||
|
[1] https://github.com/schemeway/lalr-scm
|
||||||
|
[2] https://www.cs.indiana.edu/chezscheme/syntax-case/old-psyntax.html
|
||||||
|
[3] https://www.nongnu.org/nyacc/
|
||||||
|
[4] https://www.gnu.org/software/guile/docs/master/guile.html/PEG-Parsing.html
|
||||||
|
[5] http://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf
|
||||||
|
[6] https://www.gnu.org/software/guix/
|
||||||
|
[7] https://github.com/oriansj/stage0
|
||||||
|
[8] https://gitlab.com/janneke/tinycc
|
|
@ -0,0 +1,70 @@
|
||||||
|
Subject: Mes 0.8 released
|
||||||
|
|
||||||
|
I am pleased to announce the release of Mes 0.8, representing 34
|
||||||
|
commits over 3 weeks. Mescc now produces object files in the hex2
|
||||||
|
ascii output format compatible with the stage0 linker.
|
||||||
|
|
||||||
|
Special thanks to Jeremiah Orians for support with MESCC_Tools and
|
||||||
|
hex2, more goodness to follow soon!
|
||||||
|
|
||||||
|
* About
|
||||||
|
|
||||||
|
Mes aims to create full source bootstrapping for GuixSD: an
|
||||||
|
entirely source-based bootstrap path. The target is to [have
|
||||||
|
GuixSD] boostrap from a minimal, easily inspectable binary --that
|
||||||
|
should be readable as source-- into something close to R6RS
|
||||||
|
Scheme.
|
||||||
|
|
||||||
|
It currently consists of a mutual self-hosting [close to Guile-]
|
||||||
|
Scheme interpreter prototype in C and a Nyacc-based C compiler in
|
||||||
|
[Guile] Scheme.
|
||||||
|
|
||||||
|
The Scheme interpreter prototype (mes.c) has a Garbage Collector,
|
||||||
|
a library of loadable Scheme modules-- notably Dominique Boucher's
|
||||||
|
LALR[1], Pre-R6RS portable syntax-case[2] with R7RS ellipsis, Matt
|
||||||
|
Wette's Nyacc[3] Guile's PEG[4] --and test suite just barely
|
||||||
|
enough to support a simple REPL (repl.mes) and simple C-compiler
|
||||||
|
(mescc.mes) that can produce the second initial ELF binary from
|
||||||
|
binary from mes.c, in only about 2h30'.
|
||||||
|
|
||||||
|
Mes was inspired by The Maxwell Equations of Software: LISP-1.5[5]
|
||||||
|
-- John McCarthy page 13, GNU Guix's[6] source/binary packaging
|
||||||
|
transparency and Jeremiah Orians's stage0[7] bootstrap project.
|
||||||
|
|
||||||
|
* Download
|
||||||
|
|
||||||
|
git clone https://gitlab.com/janneke/mes
|
||||||
|
|
||||||
|
wget https://gitlab.com/janneke/mes/repository/archive.tar.gz?ref=v0.8 -O mes-0.8.tar.gz
|
||||||
|
|
||||||
|
Mes runs from the source tree and can also be built, packaged and
|
||||||
|
installed in Guix[SD] by the usual
|
||||||
|
|
||||||
|
guix package -f guix.scm
|
||||||
|
|
||||||
|
* Changes in 0.8 since 0.7
|
||||||
|
** Mescc
|
||||||
|
*** Mescc now depends on the hex2 linker from MESCC_Tools[9].
|
||||||
|
Direct ELF output support has been removed.
|
||||||
|
ELF symbol and string table creation has been removed.
|
||||||
|
*** Mescc now has experimental annotation support for hex2.
|
||||||
|
*** Mescc has experimental annotation support for hex2.
|
||||||
|
*** Mescc has been simplified by leveraging use labels in hex2 output.
|
||||||
|
*** Mescc now supports continue in loops.
|
||||||
|
*** Mescc now compiles to hex2 object files.
|
||||||
|
** Language
|
||||||
|
*** 1 new function
|
||||||
|
list-index.
|
||||||
|
|
||||||
|
Greetings,
|
||||||
|
janneke
|
||||||
|
|
||||||
|
[1] https://github.com/schemeway/lalr-scm
|
||||||
|
[2] https://www.cs.indiana.edu/chezscheme/syntax-case/old-psyntax.html
|
||||||
|
[3] https://www.nongnu.org/nyacc/
|
||||||
|
[4] https://www.gnu.org/software/guile/docs/master/guile.html/PEG-Parsing.html
|
||||||
|
[5] http://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf
|
||||||
|
[6] https://www.gnu.org/software/guix/
|
||||||
|
[7] https://github.com/oriansj/stage0
|
||||||
|
[8] https://gitlab.com/janneke/tinycc
|
||||||
|
[9] https://github.com/oriansj/MESCC_Tools
|
|
@ -0,0 +1,93 @@
|
||||||
|
Subject: Mes 0.9 released
|
||||||
|
|
||||||
|
I am pleased to announce the release of Mes 0.9, representing 107
|
||||||
|
commits over 5 weeks. Mescc now compiles to a surprisingly readable
|
||||||
|
stage0 M1 macro assembler output format. Mescc now compiles a
|
||||||
|
modified TinyCC into a running [mostly segfaulting] executable. This
|
||||||
|
is a major milestone as tcc can compile GCC.
|
||||||
|
|
||||||
|
|
||||||
|
* About
|
||||||
|
|
||||||
|
Mes[0] aims to create full source bootstrapping for GuixSD[1] as
|
||||||
|
part of the bootstrappable builds[2] project.
|
||||||
|
|
||||||
|
It currently consists of a mutual self-hosting [close to Guile-]
|
||||||
|
Scheme interpreter prototype in C and a Nyacc-based C compiler in
|
||||||
|
[Guile] Scheme. This C prototype will be rewritten in stage0[3]
|
||||||
|
M1 assembly (or possibly stage2 slow-LISP, or ...).
|
||||||
|
|
||||||
|
The Scheme interpreter prototype (mes.c) has a Garbage Collector,
|
||||||
|
a library of loadable Scheme modules-- notably Dominique Boucher's
|
||||||
|
LALR[4], Pre-R6RS portable syntax-case[5] with R7RS ellipsis, Matt
|
||||||
|
Wette's Nyacc[6], Guile's PEG[7] --and test suite just barely
|
||||||
|
enough to support a simple REPL (repl.mes) and simple C-compiler
|
||||||
|
(mescc.mes).
|
||||||
|
|
||||||
|
The simple C compiler can compile a modified TinyCC[8]. This
|
||||||
|
needs more work. A gcc-compiled tcc is known[9] to compile GCC.
|
||||||
|
|
||||||
|
Mes is inspired by The Maxwell Equations of Software: LISP-1.5[10]
|
||||||
|
-- John McCarthy page 13, GNU Guix's source/binary packaging
|
||||||
|
transparency and Jeremiah Orians's stage0 ~300 byte self-hosting
|
||||||
|
hex assembler.
|
||||||
|
|
||||||
|
* Download
|
||||||
|
|
||||||
|
git clone https://gitlab.com/janneke/mes
|
||||||
|
|
||||||
|
wget https://gitlab.com/janneke/mes/repository/archive.tar.gz?ref=v0.9 -O mes-0.9.tar.gz
|
||||||
|
|
||||||
|
Mes runs from the source tree and can also be built, packaged and
|
||||||
|
installed in Guix[SD] by the usual
|
||||||
|
|
||||||
|
guix package -f guix.scm
|
||||||
|
|
||||||
|
* Changes in 0.9 since 0.8
|
||||||
|
** Core
|
||||||
|
*** Mes now builds better in non-Guix[SD] legacy distros/environments. Thanks, rain1!
|
||||||
|
** Mescc
|
||||||
|
*** Mescc now compiles a modified tinycc into a running [mostly segfaulting] tcc.mes.
|
||||||
|
https://gitlab.com/janneke/tinycc branch wip-mescc.
|
||||||
|
*** Mescc now supports locals stack frame larger than 1 byte offset.
|
||||||
|
*** Mescc now supports incomplete struct initializers {0}.
|
||||||
|
*** Mescc now supports >>=, <<=, ^=, ~.
|
||||||
|
*** Mescc now supports the comma operator.
|
||||||
|
*** Mescc now supports mullti-line string initializers.
|
||||||
|
*** Mescc now supports unions.
|
||||||
|
*** Mescc now supports arrays in structs.
|
||||||
|
*** Mescc now supports structs in structs.
|
||||||
|
*** Mescc has been refactored to use records.
|
||||||
|
*** Mescc now builds and runs with Guile-2.0 (legacy distro support, not recommended).
|
||||||
|
*** Mescc now bundles tinycc's test2 test suite, passes one more test [34/55 pass].
|
||||||
|
*** Mescc now has an incremental test suite consisting of 56 tests.
|
||||||
|
*** Mescc now supports stdarg variable argument lists.
|
||||||
|
*** Mescc now has __GNUC__ unset, #f (WAS: 0).
|
||||||
|
*** Mescc now depends on Nyacc 0.80.3.
|
||||||
|
*** Mescc now depends on M1 from MESCC_Tools v0.2.
|
||||||
|
*** Mescc now compiles to M1 object files.
|
||||||
|
**** 7 new mlibc functions
|
||||||
|
calloc, close, getcwd, lseek, sprintf, unlink, vprintf.
|
||||||
|
**** 31 new mlibc stubs
|
||||||
|
execvp, fclose, fdopen, fflush, fopen, fprintf, fread, free, fseek,
|
||||||
|
ftell, fwrite, localtime, longjmp, memcpy, memmove, memmove, memset,
|
||||||
|
qsort, remove, setjump, snprintf, sscanf, strchr, strrchr, strstr,
|
||||||
|
strtol, strtoll, strtoul, strtoull, time, vnsprintf.
|
||||||
|
**** 10 new header files
|
||||||
|
alloca.h, float.h, libgen.h, locale.h, stdbool.h, stddef.h, stdint.h,
|
||||||
|
stdnoreturn.h, sys/select.h, sys/wait.h.
|
||||||
|
|
||||||
|
Greetings,
|
||||||
|
janneke
|
||||||
|
|
||||||
|
[0] https://gitlab.com/janneke/mes
|
||||||
|
[1] https://www.gnu.org/software/guix
|
||||||
|
[2] http://bootstrappable.org
|
||||||
|
[3] https://github.com/oriansj/stage0
|
||||||
|
[4] https://github.com/schemeway/lalr-scm
|
||||||
|
[5] https://www.cs.indiana.edu/chezscheme/syntax-case/old-psyntax.html
|
||||||
|
[6] https://www.nongnu.org/nyacc/
|
||||||
|
[7] https://www.gnu.org/software/guile/docs/master/guile.html/PEG-Parsing.html
|
||||||
|
[8] https://gitlab.com/janneke/tinycc
|
||||||
|
[9] https://lists.gnu.org/archive/html/tinycc-devel/2017-05/msg00103.html
|
||||||
|
[10] http://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf
|
|
@ -0,0 +1,87 @@
|
||||||
|
Subject: on bootstrapping: 2nd status report on Mes
|
||||||
|
Date: Sun, 25 Sep 2016 13:52:11 +0200
|
||||||
|
|
||||||
|
Hi!
|
||||||
|
|
||||||
|
In June I announced[0] Mes as a project that seeks to reduce the size of/
|
||||||
|
dependency on bootstrap binaries, esp. for a system like GuixSD
|
||||||
|
|
||||||
|
The strategy was to create a minimal trusted binary (prototyped in C but
|
||||||
|
eventually to be hand-crafted in assembly/hex) that interpets a minimal
|
||||||
|
LISP. Then using this minimal but already convenient LISP, extend it
|
||||||
|
into Scheme and write a tiny C compiler/linker.
|
||||||
|
|
||||||
|
Last time I had a minimal LISP-1.5-resembling interpreter in 900 lines
|
||||||
|
of C that could interpret itself and an extension layer written in LISP
|
||||||
|
providing a minimal Scheme environment. I was stuck on adding macros in
|
||||||
|
LISP and had a broken macro implentation in C that I wanted to remove.
|
||||||
|
Also I hoped to greatly reduce the size of the C part.
|
||||||
|
|
||||||
|
New status[1]
|
||||||
|
|
||||||
|
* Provide Scheme primitives directly in 1400 lines of C
|
||||||
|
* Remove LISP-1.5 staging
|
||||||
|
* closures clue-bat, fixing bugs in begin, lambda, lexical
|
||||||
|
scoping etc. ... learned a lot!
|
||||||
|
* quasiquote, unquote, unquote-splicing (in C, too slow in Scheme)
|
||||||
|
* define-macro (in C)
|
||||||
|
* define-syntax, syntax-rules (in Scheme, using define-macro)
|
||||||
|
* all primitives needed to run LALR (strings, vectors, records,
|
||||||
|
some srfi bits; mostly in Scheme)
|
||||||
|
* test suite with 97 tests that run with Mes and also with Guile
|
||||||
|
* minimal and partial ANSI C parser for hello world
|
||||||
|
* minimal and simplistic 32 bit elf c-ast->elf generator
|
||||||
|
|
||||||
|
Mes can now create a running 32-bit elf binary from this hello
|
||||||
|
world C source with a simplistic for loop
|
||||||
|
|
||||||
|
int main ()
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
puts ("Hi Mes!\n");
|
||||||
|
for (i = 0; i < 4; ++i)
|
||||||
|
puts (" Hello, world!\n");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
It takes Mes 1'20" to compile this program, Guile takes 0.5 seconds.
|
||||||
|
|
||||||
|
* cannot get psyntax.pp hooked-up or running
|
||||||
|
* do not understand syntax stuff [well enough] to implement in C
|
||||||
|
-> no let-syntax, no MATCH
|
||||||
|
-> no syntax-case, no PEG parser
|
||||||
|
|
||||||
|
In theory the bootstrapping problem I set out to solve seems to be
|
||||||
|
cracked. The remaining problem is reduced to `just work':
|
||||||
|
implementing a minimal C compiler in Scheme. Questions here: I'm not
|
||||||
|
convinced yet that this is a meaningful project...aaand I really not
|
||||||
|
want to tackle this without having MATCH, which Mes does not have yet.
|
||||||
|
|
||||||
|
Of the possible directions that I see
|
||||||
|
|
||||||
|
0 write the C compiler in Scheme without match
|
||||||
|
1 rewrite match without let-syntax
|
||||||
|
2 grok+write let-syntax/syntax-case using define-macro, some bits in C
|
||||||
|
3 run and hook-up psyntax.pp...BUT that would probably require:
|
||||||
|
4 address performance problem, possibly by
|
||||||
|
5 rewrite Mes into a VM-based solution
|
||||||
|
|
||||||
|
none I find really attractive. Option 5, a VM is proven to work but
|
||||||
|
that's quite a change of direction. Looking at other VM-based projects
|
||||||
|
(e.g. GNU Epsilon[2]) I fear that this must result in a much larger code
|
||||||
|
base in C, throwing out the minimal trusted binary idea. The other
|
||||||
|
puzzles and work 0, 2 or 3 still need to be done.
|
||||||
|
|
||||||
|
However, diving into syntax-macro or eval work (2 or 3) most probably
|
||||||
|
needs the performance issue addressed. And if it turns out that a big
|
||||||
|
VM solution is needed, that may still invalidate this project after
|
||||||
|
having done even more work.
|
||||||
|
|
||||||
|
Help! :-) Ideas?
|
||||||
|
|
||||||
|
Greetings,
|
||||||
|
Jan
|
||||||
|
|
||||||
|
[0] https://lists.gnu.org/archive/html/guile-user/2016-06/msg00061.html
|
||||||
|
[1] https://gitlab.com/janneke/mes
|
||||||
|
[2] http://git.savannah.gnu.org/cgit/epsilon.git
|
|
@ -0,0 +1,11 @@
|
||||||
|
-*- org -*-
|
||||||
|
#+TITLE: GNU Mes Announcements
|
||||||
|
|
||||||
|
Copyright © 2016, 2017, 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
|
|
||||||
|
Copying and distribution of this file, with or without modification,
|
||||||
|
are permitted in any medium without royalty provided the copyright
|
||||||
|
notice and this notice are preserved.
|
||||||
|
|
||||||
|
Files are emails sent to public mailing lists. The notice above
|
||||||
|
applies to these files too.
|
|
@ -0,0 +1,87 @@
|
||||||
|
Subject: wip-bootstrap updated
|
||||||
|
|
||||||
|
I've updated the wip-bootstrap branch[0] for Mes[1] 0.13. It has new
|
||||||
|
mes-boot and tcc-boot packages. mes-boot is a bootstrap version of
|
||||||
|
Mes; it only depends on mescc-tools and a previously compiled mes.M1
|
||||||
|
seed. Likewise, tcc-boot depends on a precompiled tcc-seed. Also,
|
||||||
|
tcc-boot uses a heavily patched version of the tcc sources.
|
||||||
|
|
||||||
|
Mes 0.13 is the first release that can bootstrap a fairly functional
|
||||||
|
tcc-boot. This bootstrapped tcc passes 67/68 C tests that were created
|
||||||
|
for MesCC. It can compile a version if itself where float, long long
|
||||||
|
and bitfield are patched out...but linking fails. This amazing
|
||||||
|
compiler can now be played with by doing something like
|
||||||
|
|
||||||
|
--8<---------------cut here---------------start------------->8---
|
||||||
|
git checkout wip-bootstrap
|
||||||
|
make
|
||||||
|
./pre-inst-env guix build tcc-boot # may take ~2h
|
||||||
|
./pre-inst-env guix environment --ad-hoc tcc-boot
|
||||||
|
mes-tcc --help #duck and run
|
||||||
|
--8<---------------cut here---------------end--------------->8---
|
||||||
|
|
||||||
|
The next big effort will be to make this mes-tcc fully functional and
|
||||||
|
integrate this with GuixSD. To give you a taste of that,
|
||||||
|
here's latest bug I'm currently looking at (pretty printed comments
|
||||||
|
are only added when Guile runs MesCC, the problem is in LEA)
|
||||||
|
|
||||||
|
--8<---------------cut here---------------start------------->8---
|
||||||
|
$ diff -u ../mes-seed/mes.M1 src/mes.M1
|
||||||
|
--- ../mes-seed/mes.M1 2018-05-01 18:49:37.312162270 +0200
|
||||||
|
+++ src/mes.M1 2018-05-01 19:49:40.774770406 +0200
|
||||||
|
@@ -35805,12 +33091,11 @@
|
||||||
|
call32 %strcpy
|
||||||
|
add____$i8,%esp !0x8
|
||||||
|
test___%eax,%eax
|
||||||
|
- # strcpy(buf + strlen(buf), "/mes/");
|
||||||
|
- push___$i32 &_string_reader_read_list_266
|
||||||
|
+ push___$i32 &_string_reader_read_list_265
|
||||||
|
mov____%ebp,%eax
|
||||||
|
- add____$i32,%eax %0x-200
|
||||||
|
+ add____$i32,%eax %0x-800
|
||||||
|
push___%eax
|
||||||
|
- lea____0x32(%ebp),%eax %0x-200
|
||||||
|
+ lea____0x32(%ebp),%eax %0x-800
|
||||||
|
push___%eax
|
||||||
|
call32 %strlen
|
||||||
|
add____$i8,%esp !0x4
|
||||||
|
--8<---------------cut here---------------end--------------->8---
|
||||||
|
|
||||||
|
We also need to remove some shortcuts that we took, most notably:
|
||||||
|
mes-seed[3]. This seed consists of 1MB of M1 code. mes.M1 is
|
||||||
|
produced by compiling mes.c using MesCC, the C compiler written in
|
||||||
|
(Guile) Scheme that comes with Mes. Although that's really terrible,
|
||||||
|
it's probably a big step forward: currently GuixSD uses ~250MB of
|
||||||
|
binary seed: the bootstrap binaries.
|
||||||
|
|
||||||
|
The plan is to replace the mes.M1 seed with mes.M2 and compile this
|
||||||
|
new mes.M2 seed using the brand new M2-Planet[2]. M2 is basically
|
||||||
|
simple C with structs, without preprocessor. This will reduce the
|
||||||
|
seed size by a factor of 10 while making it much more readable.
|
||||||
|
|
||||||
|
An excerpt of the TODO I keep in Mes' BOOTSTRAP document
|
||||||
|
|
||||||
|
--8<---------------cut here---------------start------------->8---
|
||||||
|
* TODO
|
||||||
|
** have tcc-boot's mes-tcc compile a fully functional tcc
|
||||||
|
*** mescc: fix unknown bug.
|
||||||
|
*** mescc: support function-static.
|
||||||
|
*** mescc: support/grok global static.
|
||||||
|
*** mescc: support unsigned comparison, arithmetic.
|
||||||
|
*** mescc: support long long (do we need long long to get long long in tcc)?
|
||||||
|
*** mescc: support bitfield (do we need bitfield to get bitfield in tcc)?
|
||||||
|
*** mescc: support float (do we need float to get float in tcc)?
|
||||||
|
** have bootstrapped tcc compile gcc-4.7
|
||||||
|
** remove or upstream patches from tcc-boot
|
||||||
|
** prepare src/mes.c for M2-Planet[2] transpiler
|
||||||
|
** integrate with GuixSD
|
||||||
|
** x86_64, arm, the Hurd
|
||||||
|
--8<---------------cut here---------------end--------------->8---
|
||||||
|
|
||||||
|
Greetings,
|
||||||
|
janneke
|
||||||
|
|
||||||
|
[0] http://git.savannah.gnu.org/cgit/guix.git/log/?h=wip-bootstrap
|
||||||
|
[1] https://gitlab.com/janneke/mes
|
||||||
|
[2] https://github.com/oriansj/m2-planet
|
||||||
|
[3] https://gitlab.com/janneke/mes-seed
|
|
@ -0,0 +1,505 @@
|
||||||
|
@c The GNU Free Documentation License.
|
||||||
|
@center Version 1.3, 3 November 2008
|
||||||
|
|
||||||
|
@c This file is intended to be included within another document,
|
||||||
|
@c hence no sectioning command or @node.
|
||||||
|
|
||||||
|
@display
|
||||||
|
Copyright @copyright{} 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
|
||||||
|
@uref{http://fsf.org/}
|
||||||
|
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
@end display
|
||||||
|
|
||||||
|
@enumerate 0
|
||||||
|
@item
|
||||||
|
PREAMBLE
|
||||||
|
|
||||||
|
The purpose of this License is to make a manual, textbook, or other
|
||||||
|
functional and useful document @dfn{free} in the sense of freedom: to
|
||||||
|
assure everyone the effective freedom to copy and redistribute it,
|
||||||
|
with or without modifying it, either commercially or noncommercially.
|
||||||
|
Secondarily, this License preserves for the author and publisher a way
|
||||||
|
to get credit for their work, while not being considered responsible
|
||||||
|
for modifications made by others.
|
||||||
|
|
||||||
|
This License is a kind of ``copyleft'', which means that derivative
|
||||||
|
works of the document must themselves be free in the same sense. It
|
||||||
|
complements the GNU General Public License, which is a copyleft
|
||||||
|
license designed for free software.
|
||||||
|
|
||||||
|
We have designed this License in order to use it for manuals for free
|
||||||
|
software, because free software needs free documentation: a free
|
||||||
|
program should come with manuals providing the same freedoms that the
|
||||||
|
software does. But this License is not limited to software manuals;
|
||||||
|
it can be used for any textual work, regardless of subject matter or
|
||||||
|
whether it is published as a printed book. We recommend this License
|
||||||
|
principally for works whose purpose is instruction or reference.
|
||||||
|
|
||||||
|
@item
|
||||||
|
APPLICABILITY AND DEFINITIONS
|
||||||
|
|
||||||
|
This License applies to any manual or other work, in any medium, that
|
||||||
|
contains a notice placed by the copyright holder saying it can be
|
||||||
|
distributed under the terms of this License. Such a notice grants a
|
||||||
|
world-wide, royalty-free license, unlimited in duration, to use that
|
||||||
|
work under the conditions stated herein. The ``Document'', below,
|
||||||
|
refers to any such manual or work. Any member of the public is a
|
||||||
|
licensee, and is addressed as ``you''. You accept the license if you
|
||||||
|
copy, modify or distribute the work in a way requiring permission
|
||||||
|
under copyright law.
|
||||||
|
|
||||||
|
A ``Modified Version'' of the Document means any work containing the
|
||||||
|
Document or a portion of it, either copied verbatim, or with
|
||||||
|
modifications and/or translated into another language.
|
||||||
|
|
||||||
|
A ``Secondary Section'' is a named appendix or a front-matter section
|
||||||
|
of the Document that deals exclusively with the relationship of the
|
||||||
|
publishers or authors of the Document to the Document's overall
|
||||||
|
subject (or to related matters) and contains nothing that could fall
|
||||||
|
directly within that overall subject. (Thus, if the Document is in
|
||||||
|
part a textbook of mathematics, a Secondary Section may not explain
|
||||||
|
any mathematics.) The relationship could be a matter of historical
|
||||||
|
connection with the subject or with related matters, or of legal,
|
||||||
|
commercial, philosophical, ethical or political position regarding
|
||||||
|
them.
|
||||||
|
|
||||||
|
The ``Invariant Sections'' are certain Secondary Sections whose titles
|
||||||
|
are designated, as being those of Invariant Sections, in the notice
|
||||||
|
that says that the Document is released under this License. If a
|
||||||
|
section does not fit the above definition of Secondary then it is not
|
||||||
|
allowed to be designated as Invariant. The Document may contain zero
|
||||||
|
Invariant Sections. If the Document does not identify any Invariant
|
||||||
|
Sections then there are none.
|
||||||
|
|
||||||
|
The ``Cover Texts'' are certain short passages of text that are listed,
|
||||||
|
as Front-Cover Texts or Back-Cover Texts, in the notice that says that
|
||||||
|
the Document is released under this License. A Front-Cover Text may
|
||||||
|
be at most 5 words, and a Back-Cover Text may be at most 25 words.
|
||||||
|
|
||||||
|
A ``Transparent'' copy of the Document means a machine-readable copy,
|
||||||
|
represented in a format whose specification is available to the
|
||||||
|
general public, that is suitable for revising the document
|
||||||
|
straightforwardly with generic text editors or (for images composed of
|
||||||
|
pixels) generic paint programs or (for drawings) some widely available
|
||||||
|
drawing editor, and that is suitable for input to text formatters or
|
||||||
|
for automatic translation to a variety of formats suitable for input
|
||||||
|
to text formatters. A copy made in an otherwise Transparent file
|
||||||
|
format whose markup, or absence of markup, has been arranged to thwart
|
||||||
|
or discourage subsequent modification by readers is not Transparent.
|
||||||
|
An image format is not Transparent if used for any substantial amount
|
||||||
|
of text. A copy that is not ``Transparent'' is called ``Opaque''.
|
||||||
|
|
||||||
|
Examples of suitable formats for Transparent copies include plain
|
||||||
|
ASCII without markup, Texinfo input format, La@TeX{} input
|
||||||
|
format, SGML or XML using a publicly available
|
||||||
|
DTD, and standard-conforming simple HTML,
|
||||||
|
PostScript or PDF designed for human modification. Examples
|
||||||
|
of transparent image formats include PNG, XCF and
|
||||||
|
JPG. Opaque formats include proprietary formats that can be
|
||||||
|
read and edited only by proprietary word processors, SGML or
|
||||||
|
XML for which the DTD and/or processing tools are
|
||||||
|
not generally available, and the machine-generated HTML,
|
||||||
|
PostScript or PDF produced by some word processors for
|
||||||
|
output purposes only.
|
||||||
|
|
||||||
|
The ``Title Page'' means, for a printed book, the title page itself,
|
||||||
|
plus such following pages as are needed to hold, legibly, the material
|
||||||
|
this License requires to appear in the title page. For works in
|
||||||
|
formats which do not have any title page as such, ``Title Page'' means
|
||||||
|
the text near the most prominent appearance of the work's title,
|
||||||
|
preceding the beginning of the body of the text.
|
||||||
|
|
||||||
|
The ``publisher'' means any person or entity that distributes copies
|
||||||
|
of the Document to the public.
|
||||||
|
|
||||||
|
A section ``Entitled XYZ'' means a named subunit of the Document whose
|
||||||
|
title either is precisely XYZ or contains XYZ in parentheses following
|
||||||
|
text that translates XYZ in another language. (Here XYZ stands for a
|
||||||
|
specific section name mentioned below, such as ``Acknowledgements'',
|
||||||
|
``Dedications'', ``Endorsements'', or ``History''.) To ``Preserve the Title''
|
||||||
|
of such a section when you modify the Document means that it remains a
|
||||||
|
section ``Entitled XYZ'' according to this definition.
|
||||||
|
|
||||||
|
The Document may include Warranty Disclaimers next to the notice which
|
||||||
|
states that this License applies to the Document. These Warranty
|
||||||
|
Disclaimers are considered to be included by reference in this
|
||||||
|
License, but only as regards disclaiming warranties: any other
|
||||||
|
implication that these Warranty Disclaimers may have is void and has
|
||||||
|
no effect on the meaning of this License.
|
||||||
|
|
||||||
|
@item
|
||||||
|
VERBATIM COPYING
|
||||||
|
|
||||||
|
You may copy and distribute the Document in any medium, either
|
||||||
|
commercially or noncommercially, provided that this License, the
|
||||||
|
copyright notices, and the license notice saying this License applies
|
||||||
|
to the Document are reproduced in all copies, and that you add no other
|
||||||
|
conditions whatsoever to those of this License. You may not use
|
||||||
|
technical measures to obstruct or control the reading or further
|
||||||
|
copying of the copies you make or distribute. However, you may accept
|
||||||
|
compensation in exchange for copies. If you distribute a large enough
|
||||||
|
number of copies you must also follow the conditions in section 3.
|
||||||
|
|
||||||
|
You may also lend copies, under the same conditions stated above, and
|
||||||
|
you may publicly display copies.
|
||||||
|
|
||||||
|
@item
|
||||||
|
COPYING IN QUANTITY
|
||||||
|
|
||||||
|
If you publish printed copies (or copies in media that commonly have
|
||||||
|
printed covers) of the Document, numbering more than 100, and the
|
||||||
|
Document's license notice requires Cover Texts, you must enclose the
|
||||||
|
copies in covers that carry, clearly and legibly, all these Cover
|
||||||
|
Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
|
||||||
|
the back cover. Both covers must also clearly and legibly identify
|
||||||
|
you as the publisher of these copies. The front cover must present
|
||||||
|
the full title with all words of the title equally prominent and
|
||||||
|
visible. You may add other material on the covers in addition.
|
||||||
|
Copying with changes limited to the covers, as long as they preserve
|
||||||
|
the title of the Document and satisfy these conditions, can be treated
|
||||||
|
as verbatim copying in other respects.
|
||||||
|
|
||||||
|
If the required texts for either cover are too voluminous to fit
|
||||||
|
legibly, you should put the first ones listed (as many as fit
|
||||||
|
reasonably) on the actual cover, and continue the rest onto adjacent
|
||||||
|
pages.
|
||||||
|
|
||||||
|
If you publish or distribute Opaque copies of the Document numbering
|
||||||
|
more than 100, you must either include a machine-readable Transparent
|
||||||
|
copy along with each Opaque copy, or state in or with each Opaque copy
|
||||||
|
a computer-network location from which the general network-using
|
||||||
|
public has access to download using public-standard network protocols
|
||||||
|
a complete Transparent copy of the Document, free of added material.
|
||||||
|
If you use the latter option, you must take reasonably prudent steps,
|
||||||
|
when you begin distribution of Opaque copies in quantity, to ensure
|
||||||
|
that this Transparent copy will remain thus accessible at the stated
|
||||||
|
location until at least one year after the last time you distribute an
|
||||||
|
Opaque copy (directly or through your agents or retailers) of that
|
||||||
|
edition to the public.
|
||||||
|
|
||||||
|
It is requested, but not required, that you contact the authors of the
|
||||||
|
Document well before redistributing any large number of copies, to give
|
||||||
|
them a chance to provide you with an updated version of the Document.
|
||||||
|
|
||||||
|
@item
|
||||||
|
MODIFICATIONS
|
||||||
|
|
||||||
|
You may copy and distribute a Modified Version of the Document under
|
||||||
|
the conditions of sections 2 and 3 above, provided that you release
|
||||||
|
the Modified Version under precisely this License, with the Modified
|
||||||
|
Version filling the role of the Document, thus licensing distribution
|
||||||
|
and modification of the Modified Version to whoever possesses a copy
|
||||||
|
of it. In addition, you must do these things in the Modified Version:
|
||||||
|
|
||||||
|
@enumerate A
|
||||||
|
@item
|
||||||
|
Use in the Title Page (and on the covers, if any) a title distinct
|
||||||
|
from that of the Document, and from those of previous versions
|
||||||
|
(which should, if there were any, be listed in the History section
|
||||||
|
of the Document). You may use the same title as a previous version
|
||||||
|
if the original publisher of that version gives permission.
|
||||||
|
|
||||||
|
@item
|
||||||
|
List on the Title Page, as authors, one or more persons or entities
|
||||||
|
responsible for authorship of the modifications in the Modified
|
||||||
|
Version, together with at least five of the principal authors of the
|
||||||
|
Document (all of its principal authors, if it has fewer than five),
|
||||||
|
unless they release you from this requirement.
|
||||||
|
|
||||||
|
@item
|
||||||
|
State on the Title page the name of the publisher of the
|
||||||
|
Modified Version, as the publisher.
|
||||||
|
|
||||||
|
@item
|
||||||
|
Preserve all the copyright notices of the Document.
|
||||||
|
|
||||||
|
@item
|
||||||
|
Add an appropriate copyright notice for your modifications
|
||||||
|
adjacent to the other copyright notices.
|
||||||
|
|
||||||
|
@item
|
||||||
|
Include, immediately after the copyright notices, a license notice
|
||||||
|
giving the public permission to use the Modified Version under the
|
||||||
|
terms of this License, in the form shown in the Addendum below.
|
||||||
|
|
||||||
|
@item
|
||||||
|
Preserve in that license notice the full lists of Invariant Sections
|
||||||
|
and required Cover Texts given in the Document's license notice.
|
||||||
|
|
||||||
|
@item
|
||||||
|
Include an unaltered copy of this License.
|
||||||
|
|
||||||
|
@item
|
||||||
|
Preserve the section Entitled ``History'', Preserve its Title, and add
|
||||||
|
to it an item stating at least the title, year, new authors, and
|
||||||
|
publisher of the Modified Version as given on the Title Page. If
|
||||||
|
there is no section Entitled ``History'' in the Document, create one
|
||||||
|
stating the title, year, authors, and publisher of the Document as
|
||||||
|
given on its Title Page, then add an item describing the Modified
|
||||||
|
Version as stated in the previous sentence.
|
||||||
|
|
||||||
|
@item
|
||||||
|
Preserve the network location, if any, given in the Document for
|
||||||
|
public access to a Transparent copy of the Document, and likewise
|
||||||
|
the network locations given in the Document for previous versions
|
||||||
|
it was based on. These may be placed in the ``History'' section.
|
||||||
|
You may omit a network location for a work that was published at
|
||||||
|
least four years before the Document itself, or if the original
|
||||||
|
publisher of the version it refers to gives permission.
|
||||||
|
|
||||||
|
@item
|
||||||
|
For any section Entitled ``Acknowledgements'' or ``Dedications'', Preserve
|
||||||
|
the Title of the section, and preserve in the section all the
|
||||||
|
substance and tone of each of the contributor acknowledgements and/or
|
||||||
|
dedications given therein.
|
||||||
|
|
||||||
|
@item
|
||||||
|
Preserve all the Invariant Sections of the Document,
|
||||||
|
unaltered in their text and in their titles. Section numbers
|
||||||
|
or the equivalent are not considered part of the section titles.
|
||||||
|
|
||||||
|
@item
|
||||||
|
Delete any section Entitled ``Endorsements''. Such a section
|
||||||
|
may not be included in the Modified Version.
|
||||||
|
|
||||||
|
@item
|
||||||
|
Do not retitle any existing section to be Entitled ``Endorsements'' or
|
||||||
|
to conflict in title with any Invariant Section.
|
||||||
|
|
||||||
|
@item
|
||||||
|
Preserve any Warranty Disclaimers.
|
||||||
|
@end enumerate
|
||||||
|
|
||||||
|
If the Modified Version includes new front-matter sections or
|
||||||
|
appendices that qualify as Secondary Sections and contain no material
|
||||||
|
copied from the Document, you may at your option designate some or all
|
||||||
|
of these sections as invariant. To do this, add their titles to the
|
||||||
|
list of Invariant Sections in the Modified Version's license notice.
|
||||||
|
These titles must be distinct from any other section titles.
|
||||||
|
|
||||||
|
You may add a section Entitled ``Endorsements'', provided it contains
|
||||||
|
nothing but endorsements of your Modified Version by various
|
||||||
|
parties---for example, statements of peer review or that the text has
|
||||||
|
been approved by an organization as the authoritative definition of a
|
||||||
|
standard.
|
||||||
|
|
||||||
|
You may add a passage of up to five words as a Front-Cover Text, and a
|
||||||
|
passage of up to 25 words as a Back-Cover Text, to the end of the list
|
||||||
|
of Cover Texts in the Modified Version. Only one passage of
|
||||||
|
Front-Cover Text and one of Back-Cover Text may be added by (or
|
||||||
|
through arrangements made by) any one entity. If the Document already
|
||||||
|
includes a cover text for the same cover, previously added by you or
|
||||||
|
by arrangement made by the same entity you are acting on behalf of,
|
||||||
|
you may not add another; but you may replace the old one, on explicit
|
||||||
|
permission from the previous publisher that added the old one.
|
||||||
|
|
||||||
|
The author(s) and publisher(s) of the Document do not by this License
|
||||||
|
give permission to use their names for publicity for or to assert or
|
||||||
|
imply endorsement of any Modified Version.
|
||||||
|
|
||||||
|
@item
|
||||||
|
COMBINING DOCUMENTS
|
||||||
|
|
||||||
|
You may combine the Document with other documents released under this
|
||||||
|
License, under the terms defined in section 4 above for modified
|
||||||
|
versions, provided that you include in the combination all of the
|
||||||
|
Invariant Sections of all of the original documents, unmodified, and
|
||||||
|
list them all as Invariant Sections of your combined work in its
|
||||||
|
license notice, and that you preserve all their Warranty Disclaimers.
|
||||||
|
|
||||||
|
The combined work need only contain one copy of this License, and
|
||||||
|
multiple identical Invariant Sections may be replaced with a single
|
||||||
|
copy. If there are multiple Invariant Sections with the same name but
|
||||||
|
different contents, make the title of each such section unique by
|
||||||
|
adding at the end of it, in parentheses, the name of the original
|
||||||
|
author or publisher of that section if known, or else a unique number.
|
||||||
|
Make the same adjustment to the section titles in the list of
|
||||||
|
Invariant Sections in the license notice of the combined work.
|
||||||
|
|
||||||
|
In the combination, you must combine any sections Entitled ``History''
|
||||||
|
in the various original documents, forming one section Entitled
|
||||||
|
``History''; likewise combine any sections Entitled ``Acknowledgements'',
|
||||||
|
and any sections Entitled ``Dedications''. You must delete all
|
||||||
|
sections Entitled ``Endorsements.''
|
||||||
|
|
||||||
|
@item
|
||||||
|
COLLECTIONS OF DOCUMENTS
|
||||||
|
|
||||||
|
You may make a collection consisting of the Document and other documents
|
||||||
|
released under this License, and replace the individual copies of this
|
||||||
|
License in the various documents with a single copy that is included in
|
||||||
|
the collection, provided that you follow the rules of this License for
|
||||||
|
verbatim copying of each of the documents in all other respects.
|
||||||
|
|
||||||
|
You may extract a single document from such a collection, and distribute
|
||||||
|
it individually under this License, provided you insert a copy of this
|
||||||
|
License into the extracted document, and follow this License in all
|
||||||
|
other respects regarding verbatim copying of that document.
|
||||||
|
|
||||||
|
@item
|
||||||
|
AGGREGATION WITH INDEPENDENT WORKS
|
||||||
|
|
||||||
|
A compilation of the Document or its derivatives with other separate
|
||||||
|
and independent documents or works, in or on a volume of a storage or
|
||||||
|
distribution medium, is called an ``aggregate'' if the copyright
|
||||||
|
resulting from the compilation is not used to limit the legal rights
|
||||||
|
of the compilation's users beyond what the individual works permit.
|
||||||
|
When the Document is included in an aggregate, this License does not
|
||||||
|
apply to the other works in the aggregate which are not themselves
|
||||||
|
derivative works of the Document.
|
||||||
|
|
||||||
|
If the Cover Text requirement of section 3 is applicable to these
|
||||||
|
copies of the Document, then if the Document is less than one half of
|
||||||
|
the entire aggregate, the Document's Cover Texts may be placed on
|
||||||
|
covers that bracket the Document within the aggregate, or the
|
||||||
|
electronic equivalent of covers if the Document is in electronic form.
|
||||||
|
Otherwise they must appear on printed covers that bracket the whole
|
||||||
|
aggregate.
|
||||||
|
|
||||||
|
@item
|
||||||
|
TRANSLATION
|
||||||
|
|
||||||
|
Translation is considered a kind of modification, so you may
|
||||||
|
distribute translations of the Document under the terms of section 4.
|
||||||
|
Replacing Invariant Sections with translations requires special
|
||||||
|
permission from their copyright holders, but you may include
|
||||||
|
translations of some or all Invariant Sections in addition to the
|
||||||
|
original versions of these Invariant Sections. You may include a
|
||||||
|
translation of this License, and all the license notices in the
|
||||||
|
Document, and any Warranty Disclaimers, provided that you also include
|
||||||
|
the original English version of this License and the original versions
|
||||||
|
of those notices and disclaimers. In case of a disagreement between
|
||||||
|
the translation and the original version of this License or a notice
|
||||||
|
or disclaimer, the original version will prevail.
|
||||||
|
|
||||||
|
If a section in the Document is Entitled ``Acknowledgements'',
|
||||||
|
``Dedications'', or ``History'', the requirement (section 4) to Preserve
|
||||||
|
its Title (section 1) will typically require changing the actual
|
||||||
|
title.
|
||||||
|
|
||||||
|
@item
|
||||||
|
TERMINATION
|
||||||
|
|
||||||
|
You may not copy, modify, sublicense, or distribute the Document
|
||||||
|
except as expressly provided under this License. Any attempt
|
||||||
|
otherwise to copy, modify, sublicense, or distribute it is void, and
|
||||||
|
will automatically terminate your rights under this License.
|
||||||
|
|
||||||
|
However, if you cease all violation of this License, then your license
|
||||||
|
from a particular copyright holder is reinstated (a) provisionally,
|
||||||
|
unless and until the copyright holder explicitly and finally
|
||||||
|
terminates your license, and (b) permanently, if the copyright holder
|
||||||
|
fails to notify you of the violation by some reasonable means prior to
|
||||||
|
60 days after the cessation.
|
||||||
|
|
||||||
|
Moreover, your license from a particular copyright holder is
|
||||||
|
reinstated permanently if the copyright holder notifies you of the
|
||||||
|
violation by some reasonable means, this is the first time you have
|
||||||
|
received notice of violation of this License (for any work) from that
|
||||||
|
copyright holder, and you cure the violation prior to 30 days after
|
||||||
|
your receipt of the notice.
|
||||||
|
|
||||||
|
Termination of your rights under this section does not terminate the
|
||||||
|
licenses of parties who have received copies or rights from you under
|
||||||
|
this License. If your rights have been terminated and not permanently
|
||||||
|
reinstated, receipt of a copy of some or all of the same material does
|
||||||
|
not give you any rights to use it.
|
||||||
|
|
||||||
|
@item
|
||||||
|
FUTURE REVISIONS OF THIS LICENSE
|
||||||
|
|
||||||
|
The Free Software Foundation may publish new, revised versions
|
||||||
|
of the GNU Free Documentation License from time to time. Such new
|
||||||
|
versions will be similar in spirit to the present version, but may
|
||||||
|
differ in detail to address new problems or concerns. See
|
||||||
|
@uref{http://www.gnu.org/copyleft/}.
|
||||||
|
|
||||||
|
Each version of the License is given a distinguishing version number.
|
||||||
|
If the Document specifies that a particular numbered version of this
|
||||||
|
License ``or any later version'' applies to it, you have the option of
|
||||||
|
following the terms and conditions either of that specified version or
|
||||||
|
of any later version that has been published (not as a draft) by the
|
||||||
|
Free Software Foundation. If the Document does not specify a version
|
||||||
|
number of this License, you may choose any version ever published (not
|
||||||
|
as a draft) by the Free Software Foundation. If the Document
|
||||||
|
specifies that a proxy can decide which future versions of this
|
||||||
|
License can be used, that proxy's public statement of acceptance of a
|
||||||
|
version permanently authorizes you to choose that version for the
|
||||||
|
Document.
|
||||||
|
|
||||||
|
@item
|
||||||
|
RELICENSING
|
||||||
|
|
||||||
|
``Massive Multiauthor Collaboration Site'' (or ``MMC Site'') means any
|
||||||
|
World Wide Web server that publishes copyrightable works and also
|
||||||
|
provides prominent facilities for anybody to edit those works. A
|
||||||
|
public wiki that anybody can edit is an example of such a server. A
|
||||||
|
``Massive Multiauthor Collaboration'' (or ``MMC'') contained in the
|
||||||
|
site means any set of copyrightable works thus published on the MMC
|
||||||
|
site.
|
||||||
|
|
||||||
|
``CC-BY-SA'' means the Creative Commons Attribution-Share Alike 3.0
|
||||||
|
license published by Creative Commons Corporation, a not-for-profit
|
||||||
|
corporation with a principal place of business in San Francisco,
|
||||||
|
California, as well as future copyleft versions of that license
|
||||||
|
published by that same organization.
|
||||||
|
|
||||||
|
``Incorporate'' means to publish or republish a Document, in whole or
|
||||||
|
in part, as part of another Document.
|
||||||
|
|
||||||
|
An MMC is ``eligible for relicensing'' if it is licensed under this
|
||||||
|
License, and if all works that were first published under this License
|
||||||
|
somewhere other than this MMC, and subsequently incorporated in whole
|
||||||
|
or in part into the MMC, (1) had no cover texts or invariant sections,
|
||||||
|
and (2) were thus incorporated prior to November 1, 2008.
|
||||||
|
|
||||||
|
The operator of an MMC Site may republish an MMC contained in the site
|
||||||
|
under CC-BY-SA on the same site at any time before August 1, 2009,
|
||||||
|
provided the MMC is eligible for relicensing.
|
||||||
|
|
||||||
|
@end enumerate
|
||||||
|
|
||||||
|
@page
|
||||||
|
@heading ADDENDUM: How to use this License for your documents
|
||||||
|
|
||||||
|
To use this License in a document you have written, include a copy of
|
||||||
|
the License in the document and put the following copyright and
|
||||||
|
license notices just after the title page:
|
||||||
|
|
||||||
|
@smallexample
|
||||||
|
@group
|
||||||
|
Copyright (C) @var{year} @var{your name}.
|
||||||
|
Permission is granted to copy, distribute and/or modify this document
|
||||||
|
under the terms of the GNU Free Documentation License, Version 1.3
|
||||||
|
or any later version published by the Free Software Foundation;
|
||||||
|
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
|
||||||
|
Texts. A copy of the license is included in the section entitled ``GNU
|
||||||
|
Free Documentation License''.
|
||||||
|
@end group
|
||||||
|
@end smallexample
|
||||||
|
|
||||||
|
If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
|
||||||
|
replace the ``with@dots{}Texts.''@: line with this:
|
||||||
|
|
||||||
|
@smallexample
|
||||||
|
@group
|
||||||
|
with the Invariant Sections being @var{list their titles}, with
|
||||||
|
the Front-Cover Texts being @var{list}, and with the Back-Cover Texts
|
||||||
|
being @var{list}.
|
||||||
|
@end group
|
||||||
|
@end smallexample
|
||||||
|
|
||||||
|
If you have Invariant Sections without Cover Texts, or some other
|
||||||
|
combination of the three, merge those two alternatives to suit the
|
||||||
|
situation.
|
||||||
|
|
||||||
|
If your document contains nontrivial examples of program code, we
|
||||||
|
recommend releasing these examples in parallel under your choice of
|
||||||
|
free software license, such as the GNU General Public License,
|
||||||
|
to permit their use in free software.
|
||||||
|
|
||||||
|
@c Local Variables:
|
||||||
|
@c ispell-local-pdict: "ispell-dict"
|
||||||
|
@c End:
|
|
@ -0,0 +1,91 @@
|
||||||
|
<!--#include virtual="/server/header.html" -->
|
||||||
|
<!-- Parent-Version: 1.77 -->
|
||||||
|
<title>%%TITLE%% - GNU Project - Free Software Foundation</title>
|
||||||
|
<!--#include virtual="/server/banner.html" -->
|
||||||
|
<h2>%%TITLE%%</h2>
|
||||||
|
|
||||||
|
<address>Free Software Foundation</address>
|
||||||
|
<address>last updated %%DATE%%</address>
|
||||||
|
|
||||||
|
<p>This manual (%%PACKAGE%%) is available in the following formats:</p>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li><a href="%%PACKAGE%%.html">HTML
|
||||||
|
(%%HTML_MONO_SIZE%%K bytes)</a> - entirely on one web page.</li>
|
||||||
|
<li><a href="html_node/index.html">HTML</a> - with one web page per
|
||||||
|
node.</li>
|
||||||
|
%%IF HTML_SECTION%%
|
||||||
|
<li><a href="html_section/index.html">HTML</a> - with one web page per
|
||||||
|
section.</li>
|
||||||
|
%%ENDIF HTML_SECTION%%
|
||||||
|
%%IF HTML_CHAPTER%%
|
||||||
|
<li><a href="html_chapter/index.html">HTML</a> - with one web page per
|
||||||
|
chapter.</li>
|
||||||
|
%%ENDIF HTML_CHAPTER%%
|
||||||
|
<li><a href="%%PACKAGE%%.html.gz">HTML compressed
|
||||||
|
(%%HTML_MONO_GZ_SIZE%%K gzipped characters)</a> - entirely on
|
||||||
|
one web page.</li>
|
||||||
|
<li><a href="%%PACKAGE%%.html_node.tar.gz">HTML compressed
|
||||||
|
(%%HTML_NODE_TGZ_SIZE%%K gzipped tar file)</a> -
|
||||||
|
with one web page per node.</li>
|
||||||
|
%%IF HTML_SECTION%%
|
||||||
|
<li><a href="%%PACKAGE%%.html_section.tar.gz">HTML compressed
|
||||||
|
(%%HTML_SECTION_TGZ_SIZE%%K gzipped tar file)</a> -
|
||||||
|
with one web page per section.</li>
|
||||||
|
%%ENDIF HTML_SECTION%%
|
||||||
|
%%IF HTML_CHAPTER%%
|
||||||
|
<li><a href="%%PACKAGE%%.html_chapter.tar.gz">HTML compressed
|
||||||
|
(%%HTML_CHAPTER_TGZ_SIZE%%K gzipped tar file)</a> -
|
||||||
|
with one web page per chapter.</li>
|
||||||
|
%%ENDIF HTML_CHAPTER%%
|
||||||
|
<li><a href="%%PACKAGE%%.info.tar.gz">Info document
|
||||||
|
(%%INFO_TGZ_SIZE%%K bytes gzipped tar file)</a>.</li>
|
||||||
|
<li><a href="%%PACKAGE%%.txt">ASCII text
|
||||||
|
(%%ASCII_SIZE%%K bytes)</a>.</li>
|
||||||
|
<li><a href="%%PACKAGE%%.txt.gz">ASCII text compressed
|
||||||
|
(%%ASCII_GZ_SIZE%%K bytes gzipped)</a>.</li>
|
||||||
|
<li><a href="%%PACKAGE%%.dvi.gz">TeX dvi file
|
||||||
|
(%%DVI_GZ_SIZE%%K bytes gzipped)</a>.</li>
|
||||||
|
<li><a href="%%PACKAGE%%.pdf">PDF file
|
||||||
|
(%%PDF_SIZE%%K bytes)</a>.</li>
|
||||||
|
<li><a href="%%PACKAGE%%.texi.tar.gz">Texinfo source
|
||||||
|
(%%TEXI_TGZ_SIZE%%K bytes gzipped tar file).</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>You can <a href="https://shop.fsf.org/">buy printed copies of
|
||||||
|
some manuals</a> (among other items) from the Free Software Foundation;
|
||||||
|
this helps support FSF activities.</p>
|
||||||
|
|
||||||
|
<p>(This page generated by the <a href="%%SCRIPTURL%%">%%SCRIPTNAME%%
|
||||||
|
script</a>.)</p>
|
||||||
|
|
||||||
|
<!-- If needed, change the copyright block at the bottom. In general,
|
||||||
|
all pages on the GNU web server should have the section about
|
||||||
|
verbatim copying. Please do NOT remove this without talking
|
||||||
|
with the webmasters first.
|
||||||
|
Please make sure the copyright date is consistent with the document
|
||||||
|
and that it is like this: "2001, 2002", not this: "2001-2002". -->
|
||||||
|
</div><!-- for id="content", starts in the include above -->
|
||||||
|
<!--#include virtual="/server/footer.html" -->
|
||||||
|
<div id="footer">
|
||||||
|
<div class="unprintable">
|
||||||
|
|
||||||
|
<p>Please send general FSF & GNU inquiries to
|
||||||
|
<a href="mailto:gnu@gnu.org"><gnu@gnu.org></a>.
|
||||||
|
There are also <a href="/contact/">other ways to contact</a>
|
||||||
|
the FSF. Broken links and other corrections or suggestions can be sent
|
||||||
|
to <a href="mailto:%%EMAIL%%"><%%EMAIL%%></a>.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p>Copyright © 2018 Free Software Foundation, Inc.</p>
|
||||||
|
|
||||||
|
<p>This page is licensed under a <a rel="license"
|
||||||
|
href="https://creativecommons.org/licenses/by-nd/3.0/us/">Creative
|
||||||
|
Commons Attribution-NoDerivs 3.0 United States License</a>.</p>
|
||||||
|
|
||||||
|
<!--#include virtual="/server/bottom-notes.html" -->
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,13 @@
|
||||||
|
-*- org -*-
|
||||||
|
#+TITLE: GNU Mes images
|
||||||
|
|
||||||
|
Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
|
|
||||||
|
Copying and distribution of this file, with or without modification,
|
||||||
|
are permitted in any medium without royalty provided the copyright
|
||||||
|
notice and this notice are preserved.
|
||||||
|
|
||||||
|
gcc-mesboot-graph.dot
|
||||||
|
This graph is generated from Guix wip-bootstrap, doing:
|
||||||
|
~/src/guix/core-updates/pre-inst-env guix graph --type=bag -e '(@@ (gnu packages commencement) gcc-mesboot)' > doc/images/gcc-mesboot-graph.dot
|
||||||
|
dot -T png doc/images/gcc-mesboot-graph.dot > doc/images/gcc-mesboot-graph.png
|
|
@ -0,0 +1,123 @@
|
||||||
|
digraph "Guix bag" {
|
||||||
|
"/gnu/store/q8f5yjxp0kcdn2mwqf83bvhal71cnr71-gcc-mesboot-4.9.4.drv" [label = "gcc-mesboot@4.9.4", shape = box, fontname = Helvetica];
|
||||||
|
"/gnu/store/q8f5yjxp0kcdn2mwqf83bvhal71cnr71-gcc-mesboot-4.9.4.drv" -> "/gnu/store/2lpg626q4x8v7hgqajywpq1rc8y72hzx-binutils-mesboot-2.20.1a.drv" [color = magenta];
|
||||||
|
"/gnu/store/q8f5yjxp0kcdn2mwqf83bvhal71cnr71-gcc-mesboot-4.9.4.drv" -> "/gnu/store/7v6fpp5msmjbhmprikrfcj047016gd54-gcc-mesboot1-wrapper-4.7.4.drv" [color = magenta];
|
||||||
|
"/gnu/store/q8f5yjxp0kcdn2mwqf83bvhal71cnr71-gcc-mesboot-4.9.4.drv" -> "/gnu/store/7pllq0crksfkr7856y1pawcy4scc7l4q-gcc-mesboot1-4.7.4.drv" [color = magenta];
|
||||||
|
"/gnu/store/q8f5yjxp0kcdn2mwqf83bvhal71cnr71-gcc-mesboot-4.9.4.drv" -> "/gnu/store/lp6fycqqd8adndlfylh4mlihm0qakxzw-glibc-mesboot-2.16.0.drv" [color = magenta];
|
||||||
|
"/gnu/store/q8f5yjxp0kcdn2mwqf83bvhal71cnr71-gcc-mesboot-4.9.4.drv" -> "/gnu/store/7wqw4023spvggi15vcxyxvivxa4rmmv8-bootstrap-binaries-0.drv" [color = magenta];
|
||||||
|
"/gnu/store/q8f5yjxp0kcdn2mwqf83bvhal71cnr71-gcc-mesboot-4.9.4.drv" -> "/gnu/store/7wqw4023spvggi15vcxyxvivxa4rmmv8-bootstrap-binaries-0.drv" [color = magenta];
|
||||||
|
"/gnu/store/q8f5yjxp0kcdn2mwqf83bvhal71cnr71-gcc-mesboot-4.9.4.drv" -> "/gnu/store/r50fj43103526ga6pi2f9jkk4gvaav7m-diffutils-mesboot-2.7.drv" [color = magenta];
|
||||||
|
"/gnu/store/q8f5yjxp0kcdn2mwqf83bvhal71cnr71-gcc-mesboot-4.9.4.drv" -> "/gnu/store/r0z9bix88pz0wf6sgcn9185iwcsdracs-linux-libre-headers-bootstrap-0.drv" [color = magenta];
|
||||||
|
"/gnu/store/q8f5yjxp0kcdn2mwqf83bvhal71cnr71-gcc-mesboot-4.9.4.drv" -> "/gnu/store/5ad88jy4a1gpbslzdiksk7zjyh28wzkr-make-mesboot-3.82.drv" [color = magenta];
|
||||||
|
"/gnu/store/2lpg626q4x8v7hgqajywpq1rc8y72hzx-binutils-mesboot-2.20.1a.drv" [label = "binutils-mesboot@2.20.1a", shape = box, fontname = Helvetica];
|
||||||
|
"/gnu/store/2lpg626q4x8v7hgqajywpq1rc8y72hzx-binutils-mesboot-2.20.1a.drv" -> "/gnu/store/x9shp86cz9f4rb5xvhs37zzxg1ngi4dr-binutils-mesboot0-2.20.1a.drv" [color = magenta];
|
||||||
|
"/gnu/store/2lpg626q4x8v7hgqajywpq1rc8y72hzx-binutils-mesboot-2.20.1a.drv" -> "/gnu/store/2633565gzh4jqh7c5zf6i0iy9yxqigcv-glibc-mesboot0-2.2.5.drv" [color = magenta];
|
||||||
|
"/gnu/store/2lpg626q4x8v7hgqajywpq1rc8y72hzx-binutils-mesboot-2.20.1a.drv" -> "/gnu/store/slnyk8gbnvfwy1m1was8myivpss58idd-gcc-mesboot0-2.95.3.drv" [color = magenta];
|
||||||
|
"/gnu/store/2lpg626q4x8v7hgqajywpq1rc8y72hzx-binutils-mesboot-2.20.1a.drv" -> "/gnu/store/7wqw4023spvggi15vcxyxvivxa4rmmv8-bootstrap-binaries-0.drv" [color = magenta];
|
||||||
|
"/gnu/store/2lpg626q4x8v7hgqajywpq1rc8y72hzx-binutils-mesboot-2.20.1a.drv" -> "/gnu/store/7wqw4023spvggi15vcxyxvivxa4rmmv8-bootstrap-binaries-0.drv" [color = magenta];
|
||||||
|
"/gnu/store/2lpg626q4x8v7hgqajywpq1rc8y72hzx-binutils-mesboot-2.20.1a.drv" -> "/gnu/store/r50fj43103526ga6pi2f9jkk4gvaav7m-diffutils-mesboot-2.7.drv" [color = magenta];
|
||||||
|
"/gnu/store/2lpg626q4x8v7hgqajywpq1rc8y72hzx-binutils-mesboot-2.20.1a.drv" -> "/gnu/store/r0z9bix88pz0wf6sgcn9185iwcsdracs-linux-libre-headers-bootstrap-0.drv" [color = magenta];
|
||||||
|
"/gnu/store/2lpg626q4x8v7hgqajywpq1rc8y72hzx-binutils-mesboot-2.20.1a.drv" -> "/gnu/store/57da9mdiqhyn72m8wv00pdvzqi2ng4xb-make-mesboot0-3.80.drv" [color = magenta];
|
||||||
|
"/gnu/store/x9shp86cz9f4rb5xvhs37zzxg1ngi4dr-binutils-mesboot0-2.20.1a.drv" [label = "binutils-mesboot0@2.20.1a", shape = box, fontname = Helvetica];
|
||||||
|
"/gnu/store/x9shp86cz9f4rb5xvhs37zzxg1ngi4dr-binutils-mesboot0-2.20.1a.drv" -> "/gnu/store/fglx0fz62bygkdxxg878j7x9pfl37zhh-tcc-boot-0.9.27.drv" [color = red];
|
||||||
|
"/gnu/store/x9shp86cz9f4rb5xvhs37zzxg1ngi4dr-binutils-mesboot0-2.20.1a.drv" -> "/gnu/store/7wqw4023spvggi15vcxyxvivxa4rmmv8-bootstrap-binaries-0.drv" [color = red];
|
||||||
|
"/gnu/store/x9shp86cz9f4rb5xvhs37zzxg1ngi4dr-binutils-mesboot0-2.20.1a.drv" -> "/gnu/store/7wqw4023spvggi15vcxyxvivxa4rmmv8-bootstrap-binaries-0.drv" [color = red];
|
||||||
|
"/gnu/store/x9shp86cz9f4rb5xvhs37zzxg1ngi4dr-binutils-mesboot0-2.20.1a.drv" -> "/gnu/store/r50fj43103526ga6pi2f9jkk4gvaav7m-diffutils-mesboot-2.7.drv" [color = red];
|
||||||
|
"/gnu/store/x9shp86cz9f4rb5xvhs37zzxg1ngi4dr-binutils-mesboot0-2.20.1a.drv" -> "/gnu/store/57da9mdiqhyn72m8wv00pdvzqi2ng4xb-make-mesboot0-3.80.drv" [color = red];
|
||||||
|
"/gnu/store/fglx0fz62bygkdxxg878j7x9pfl37zhh-tcc-boot-0.9.27.drv" [label = "tcc-boot@0.9.27", shape = box, fontname = Helvetica];
|
||||||
|
"/gnu/store/fglx0fz62bygkdxxg878j7x9pfl37zhh-tcc-boot-0.9.27.drv" -> "/gnu/store/mw6swkryp89aml4jzac5lm8kmcv5k6gy-mes-boot-0.19.drv" [color = dimgrey];
|
||||||
|
"/gnu/store/fglx0fz62bygkdxxg878j7x9pfl37zhh-tcc-boot-0.9.27.drv" -> "/gnu/store/nvhjn6b5hi4mj7wnjxrmj0dmdigq9m2z-tcc-boot0-0.9.26-6.c004e9a.drv" [color = dimgrey];
|
||||||
|
"/gnu/store/fglx0fz62bygkdxxg878j7x9pfl37zhh-tcc-boot-0.9.27.drv" -> "/gnu/store/7wqw4023spvggi15vcxyxvivxa4rmmv8-bootstrap-binaries-0.drv" [color = dimgrey];
|
||||||
|
"/gnu/store/mw6swkryp89aml4jzac5lm8kmcv5k6gy-mes-boot-0.19.drv" [label = "mes-boot@0.19", shape = box, fontname = Helvetica];
|
||||||
|
"/gnu/store/mw6swkryp89aml4jzac5lm8kmcv5k6gy-mes-boot-0.19.drv" -> "/gnu/store/msykyiih9lwrd86x00vs00i8s5ipjks4-bootstrap-mescc-tools-0.5.2.drv" [color = darkgoldenrod];
|
||||||
|
"/gnu/store/mw6swkryp89aml4jzac5lm8kmcv5k6gy-mes-boot-0.19.drv" -> "/gnu/store/7wqw4023spvggi15vcxyxvivxa4rmmv8-bootstrap-binaries-0.drv" [color = darkgoldenrod];
|
||||||
|
"/gnu/store/mw6swkryp89aml4jzac5lm8kmcv5k6gy-mes-boot-0.19.drv" -> "/gnu/store/cfw60j3987wrvb26f2bpbw5l5q6q53fj-bootstrap-mes-0.drv" [color = darkgoldenrod];
|
||||||
|
"/gnu/store/msykyiih9lwrd86x00vs00i8s5ipjks4-bootstrap-mescc-tools-0.5.2.drv" [label = "bootstrap-mescc-tools@0.5.2", shape = box, fontname = Helvetica];
|
||||||
|
"/gnu/store/7wqw4023spvggi15vcxyxvivxa4rmmv8-bootstrap-binaries-0.drv" [label = "bootstrap-binaries@0", shape = box, fontname = Helvetica];
|
||||||
|
"/gnu/store/cfw60j3987wrvb26f2bpbw5l5q6q53fj-bootstrap-mes-0.drv" [label = "bootstrap-mes@0", shape = box, fontname = Helvetica];
|
||||||
|
"/gnu/store/nvhjn6b5hi4mj7wnjxrmj0dmdigq9m2z-tcc-boot0-0.9.26-6.c004e9a.drv" [label = "tcc-boot0@0.9.26-6.c004e9a", shape = box, fontname = Helvetica];
|
||||||
|
"/gnu/store/nvhjn6b5hi4mj7wnjxrmj0dmdigq9m2z-tcc-boot0-0.9.26-6.c004e9a.drv" -> "/gnu/store/mw6swkryp89aml4jzac5lm8kmcv5k6gy-mes-boot-0.19.drv" [color = magenta];
|
||||||
|
"/gnu/store/nvhjn6b5hi4mj7wnjxrmj0dmdigq9m2z-tcc-boot0-0.9.26-6.c004e9a.drv" -> "/gnu/store/msykyiih9lwrd86x00vs00i8s5ipjks4-bootstrap-mescc-tools-0.5.2.drv" [color = magenta];
|
||||||
|
"/gnu/store/nvhjn6b5hi4mj7wnjxrmj0dmdigq9m2z-tcc-boot0-0.9.26-6.c004e9a.drv" -> "/gnu/store/7wqw4023spvggi15vcxyxvivxa4rmmv8-bootstrap-binaries-0.drv" [color = magenta];
|
||||||
|
"/gnu/store/nvhjn6b5hi4mj7wnjxrmj0dmdigq9m2z-tcc-boot0-0.9.26-6.c004e9a.drv" -> "/gnu/store/cfw60j3987wrvb26f2bpbw5l5q6q53fj-bootstrap-mes-0.drv" [color = magenta];
|
||||||
|
"/gnu/store/r50fj43103526ga6pi2f9jkk4gvaav7m-diffutils-mesboot-2.7.drv" [label = "diffutils-mesboot@2.7", shape = box, fontname = Helvetica];
|
||||||
|
"/gnu/store/r50fj43103526ga6pi2f9jkk4gvaav7m-diffutils-mesboot-2.7.drv" -> "/gnu/store/mw6swkryp89aml4jzac5lm8kmcv5k6gy-mes-boot-0.19.drv" [color = peachpuff4];
|
||||||
|
"/gnu/store/r50fj43103526ga6pi2f9jkk4gvaav7m-diffutils-mesboot-2.7.drv" -> "/gnu/store/fglx0fz62bygkdxxg878j7x9pfl37zhh-tcc-boot-0.9.27.drv" [color = peachpuff4];
|
||||||
|
"/gnu/store/r50fj43103526ga6pi2f9jkk4gvaav7m-diffutils-mesboot-2.7.drv" -> "/gnu/store/7wqw4023spvggi15vcxyxvivxa4rmmv8-bootstrap-binaries-0.drv" [color = peachpuff4];
|
||||||
|
"/gnu/store/r50fj43103526ga6pi2f9jkk4gvaav7m-diffutils-mesboot-2.7.drv" -> "/gnu/store/7wqw4023spvggi15vcxyxvivxa4rmmv8-bootstrap-binaries-0.drv" [color = peachpuff4];
|
||||||
|
"/gnu/store/r50fj43103526ga6pi2f9jkk4gvaav7m-diffutils-mesboot-2.7.drv" -> "/gnu/store/57da9mdiqhyn72m8wv00pdvzqi2ng4xb-make-mesboot0-3.80.drv" [color = peachpuff4];
|
||||||
|
"/gnu/store/57da9mdiqhyn72m8wv00pdvzqi2ng4xb-make-mesboot0-3.80.drv" [label = "make-mesboot0@3.80", shape = box, fontname = Helvetica];
|
||||||
|
"/gnu/store/57da9mdiqhyn72m8wv00pdvzqi2ng4xb-make-mesboot0-3.80.drv" -> "/gnu/store/fglx0fz62bygkdxxg878j7x9pfl37zhh-tcc-boot-0.9.27.drv" [color = dimgrey];
|
||||||
|
"/gnu/store/57da9mdiqhyn72m8wv00pdvzqi2ng4xb-make-mesboot0-3.80.drv" -> "/gnu/store/7wqw4023spvggi15vcxyxvivxa4rmmv8-bootstrap-binaries-0.drv" [color = dimgrey];
|
||||||
|
"/gnu/store/57da9mdiqhyn72m8wv00pdvzqi2ng4xb-make-mesboot0-3.80.drv" -> "/gnu/store/7wqw4023spvggi15vcxyxvivxa4rmmv8-bootstrap-binaries-0.drv" [color = dimgrey];
|
||||||
|
"/gnu/store/2633565gzh4jqh7c5zf6i0iy9yxqigcv-glibc-mesboot0-2.2.5.drv" [label = "glibc-mesboot0@2.2.5", shape = box, fontname = Helvetica];
|
||||||
|
"/gnu/store/2633565gzh4jqh7c5zf6i0iy9yxqigcv-glibc-mesboot0-2.2.5.drv" -> "/gnu/store/x9shp86cz9f4rb5xvhs37zzxg1ngi4dr-binutils-mesboot0-2.20.1a.drv" [color = red];
|
||||||
|
"/gnu/store/2633565gzh4jqh7c5zf6i0iy9yxqigcv-glibc-mesboot0-2.2.5.drv" -> "/gnu/store/kcyh6k46ijm9nsq1as26rr0aq7rkx4f7-gcc-core-mesboot-2.95.3.drv" [color = red];
|
||||||
|
"/gnu/store/2633565gzh4jqh7c5zf6i0iy9yxqigcv-glibc-mesboot0-2.2.5.drv" -> "/gnu/store/7wqw4023spvggi15vcxyxvivxa4rmmv8-bootstrap-binaries-0.drv" [color = red];
|
||||||
|
"/gnu/store/2633565gzh4jqh7c5zf6i0iy9yxqigcv-glibc-mesboot0-2.2.5.drv" -> "/gnu/store/7wqw4023spvggi15vcxyxvivxa4rmmv8-bootstrap-binaries-0.drv" [color = red];
|
||||||
|
"/gnu/store/2633565gzh4jqh7c5zf6i0iy9yxqigcv-glibc-mesboot0-2.2.5.drv" -> "/gnu/store/r50fj43103526ga6pi2f9jkk4gvaav7m-diffutils-mesboot-2.7.drv" [color = red];
|
||||||
|
"/gnu/store/2633565gzh4jqh7c5zf6i0iy9yxqigcv-glibc-mesboot0-2.2.5.drv" -> "/gnu/store/hnxdqmhjdvh1ra9ar4lxl25xf6a7bhzz-mesboot-headers-0.19.drv" [color = red];
|
||||||
|
"/gnu/store/2633565gzh4jqh7c5zf6i0iy9yxqigcv-glibc-mesboot0-2.2.5.drv" -> "/gnu/store/57da9mdiqhyn72m8wv00pdvzqi2ng4xb-make-mesboot0-3.80.drv" [color = red];
|
||||||
|
"/gnu/store/kcyh6k46ijm9nsq1as26rr0aq7rkx4f7-gcc-core-mesboot-2.95.3.drv" [label = "gcc-core-mesboot@2.95.3", shape = box, fontname = Helvetica];
|
||||||
|
"/gnu/store/kcyh6k46ijm9nsq1as26rr0aq7rkx4f7-gcc-core-mesboot-2.95.3.drv" -> "/gnu/store/x9shp86cz9f4rb5xvhs37zzxg1ngi4dr-binutils-mesboot0-2.20.1a.drv" [color = dimgrey];
|
||||||
|
"/gnu/store/kcyh6k46ijm9nsq1as26rr0aq7rkx4f7-gcc-core-mesboot-2.95.3.drv" -> "/gnu/store/fglx0fz62bygkdxxg878j7x9pfl37zhh-tcc-boot-0.9.27.drv" [color = dimgrey];
|
||||||
|
"/gnu/store/kcyh6k46ijm9nsq1as26rr0aq7rkx4f7-gcc-core-mesboot-2.95.3.drv" -> "/gnu/store/7wqw4023spvggi15vcxyxvivxa4rmmv8-bootstrap-binaries-0.drv" [color = dimgrey];
|
||||||
|
"/gnu/store/kcyh6k46ijm9nsq1as26rr0aq7rkx4f7-gcc-core-mesboot-2.95.3.drv" -> "/gnu/store/7wqw4023spvggi15vcxyxvivxa4rmmv8-bootstrap-binaries-0.drv" [color = dimgrey];
|
||||||
|
"/gnu/store/kcyh6k46ijm9nsq1as26rr0aq7rkx4f7-gcc-core-mesboot-2.95.3.drv" -> "/gnu/store/r50fj43103526ga6pi2f9jkk4gvaav7m-diffutils-mesboot-2.7.drv" [color = dimgrey];
|
||||||
|
"/gnu/store/kcyh6k46ijm9nsq1as26rr0aq7rkx4f7-gcc-core-mesboot-2.95.3.drv" -> "/gnu/store/57da9mdiqhyn72m8wv00pdvzqi2ng4xb-make-mesboot0-3.80.drv" [color = dimgrey];
|
||||||
|
"/gnu/store/hnxdqmhjdvh1ra9ar4lxl25xf6a7bhzz-mesboot-headers-0.19.drv" [label = "mesboot-headers@0.19", shape = box, fontname = Helvetica];
|
||||||
|
"/gnu/store/hnxdqmhjdvh1ra9ar4lxl25xf6a7bhzz-mesboot-headers-0.19.drv" -> "/gnu/store/7wqw4023spvggi15vcxyxvivxa4rmmv8-bootstrap-binaries-0.drv" [color = blue];
|
||||||
|
"/gnu/store/hnxdqmhjdvh1ra9ar4lxl25xf6a7bhzz-mesboot-headers-0.19.drv" -> "/gnu/store/r0z9bix88pz0wf6sgcn9185iwcsdracs-linux-libre-headers-bootstrap-0.drv" [color = blue];
|
||||||
|
"/gnu/store/r0z9bix88pz0wf6sgcn9185iwcsdracs-linux-libre-headers-bootstrap-0.drv" [label = "linux-libre-headers-bootstrap@0", shape = box, fontname = Helvetica];
|
||||||
|
"/gnu/store/slnyk8gbnvfwy1m1was8myivpss58idd-gcc-mesboot0-2.95.3.drv" [label = "gcc-mesboot0@2.95.3", shape = box, fontname = Helvetica];
|
||||||
|
"/gnu/store/slnyk8gbnvfwy1m1was8myivpss58idd-gcc-mesboot0-2.95.3.drv" -> "/gnu/store/x9shp86cz9f4rb5xvhs37zzxg1ngi4dr-binutils-mesboot0-2.20.1a.drv" [color = darkseagreen];
|
||||||
|
"/gnu/store/slnyk8gbnvfwy1m1was8myivpss58idd-gcc-mesboot0-2.95.3.drv" -> "/gnu/store/kcyh6k46ijm9nsq1as26rr0aq7rkx4f7-gcc-core-mesboot-2.95.3.drv" [color = darkseagreen];
|
||||||
|
"/gnu/store/slnyk8gbnvfwy1m1was8myivpss58idd-gcc-mesboot0-2.95.3.drv" -> "/gnu/store/2633565gzh4jqh7c5zf6i0iy9yxqigcv-glibc-mesboot0-2.2.5.drv" [color = darkseagreen];
|
||||||
|
"/gnu/store/slnyk8gbnvfwy1m1was8myivpss58idd-gcc-mesboot0-2.95.3.drv" -> "/gnu/store/7wqw4023spvggi15vcxyxvivxa4rmmv8-bootstrap-binaries-0.drv" [color = darkseagreen];
|
||||||
|
"/gnu/store/slnyk8gbnvfwy1m1was8myivpss58idd-gcc-mesboot0-2.95.3.drv" -> "/gnu/store/7wqw4023spvggi15vcxyxvivxa4rmmv8-bootstrap-binaries-0.drv" [color = darkseagreen];
|
||||||
|
"/gnu/store/slnyk8gbnvfwy1m1was8myivpss58idd-gcc-mesboot0-2.95.3.drv" -> "/gnu/store/r50fj43103526ga6pi2f9jkk4gvaav7m-diffutils-mesboot-2.7.drv" [color = darkseagreen];
|
||||||
|
"/gnu/store/slnyk8gbnvfwy1m1was8myivpss58idd-gcc-mesboot0-2.95.3.drv" -> "/gnu/store/r0z9bix88pz0wf6sgcn9185iwcsdracs-linux-libre-headers-bootstrap-0.drv" [color = darkseagreen];
|
||||||
|
"/gnu/store/slnyk8gbnvfwy1m1was8myivpss58idd-gcc-mesboot0-2.95.3.drv" -> "/gnu/store/57da9mdiqhyn72m8wv00pdvzqi2ng4xb-make-mesboot0-3.80.drv" [color = darkseagreen];
|
||||||
|
"/gnu/store/7v6fpp5msmjbhmprikrfcj047016gd54-gcc-mesboot1-wrapper-4.7.4.drv" [label = "gcc-mesboot1-wrapper@4.7.4", shape = box, fontname = Helvetica];
|
||||||
|
"/gnu/store/7v6fpp5msmjbhmprikrfcj047016gd54-gcc-mesboot1-wrapper-4.7.4.drv" -> "/gnu/store/7wqw4023spvggi15vcxyxvivxa4rmmv8-bootstrap-binaries-0.drv" [color = red];
|
||||||
|
"/gnu/store/7v6fpp5msmjbhmprikrfcj047016gd54-gcc-mesboot1-wrapper-4.7.4.drv" -> "/gnu/store/lp6fycqqd8adndlfylh4mlihm0qakxzw-glibc-mesboot-2.16.0.drv" [color = red];
|
||||||
|
"/gnu/store/7v6fpp5msmjbhmprikrfcj047016gd54-gcc-mesboot1-wrapper-4.7.4.drv" -> "/gnu/store/7pllq0crksfkr7856y1pawcy4scc7l4q-gcc-mesboot1-4.7.4.drv" [color = red];
|
||||||
|
"/gnu/store/lp6fycqqd8adndlfylh4mlihm0qakxzw-glibc-mesboot-2.16.0.drv" [label = "glibc-mesboot@2.16.0", shape = box, fontname = Helvetica];
|
||||||
|
"/gnu/store/lp6fycqqd8adndlfylh4mlihm0qakxzw-glibc-mesboot-2.16.0.drv" -> "/gnu/store/2lpg626q4x8v7hgqajywpq1rc8y72hzx-binutils-mesboot-2.20.1a.drv" [color = magenta];
|
||||||
|
"/gnu/store/lp6fycqqd8adndlfylh4mlihm0qakxzw-glibc-mesboot-2.16.0.drv" -> "/gnu/store/2633565gzh4jqh7c5zf6i0iy9yxqigcv-glibc-mesboot0-2.2.5.drv" [color = magenta];
|
||||||
|
"/gnu/store/lp6fycqqd8adndlfylh4mlihm0qakxzw-glibc-mesboot-2.16.0.drv" -> "/gnu/store/p9sl13frcs2wdcddkh20hc51l7lpavza-glibc-headers-mesboot-2.16.0.drv" [color = magenta];
|
||||||
|
"/gnu/store/lp6fycqqd8adndlfylh4mlihm0qakxzw-glibc-mesboot-2.16.0.drv" -> "/gnu/store/7pllq0crksfkr7856y1pawcy4scc7l4q-gcc-mesboot1-4.7.4.drv" [color = magenta];
|
||||||
|
"/gnu/store/lp6fycqqd8adndlfylh4mlihm0qakxzw-glibc-mesboot-2.16.0.drv" -> "/gnu/store/7wqw4023spvggi15vcxyxvivxa4rmmv8-bootstrap-binaries-0.drv" [color = magenta];
|
||||||
|
"/gnu/store/lp6fycqqd8adndlfylh4mlihm0qakxzw-glibc-mesboot-2.16.0.drv" -> "/gnu/store/7wqw4023spvggi15vcxyxvivxa4rmmv8-bootstrap-binaries-0.drv" [color = magenta];
|
||||||
|
"/gnu/store/lp6fycqqd8adndlfylh4mlihm0qakxzw-glibc-mesboot-2.16.0.drv" -> "/gnu/store/r50fj43103526ga6pi2f9jkk4gvaav7m-diffutils-mesboot-2.7.drv" [color = magenta];
|
||||||
|
"/gnu/store/lp6fycqqd8adndlfylh4mlihm0qakxzw-glibc-mesboot-2.16.0.drv" -> "/gnu/store/r0z9bix88pz0wf6sgcn9185iwcsdracs-linux-libre-headers-bootstrap-0.drv" [color = magenta];
|
||||||
|
"/gnu/store/lp6fycqqd8adndlfylh4mlihm0qakxzw-glibc-mesboot-2.16.0.drv" -> "/gnu/store/5ad88jy4a1gpbslzdiksk7zjyh28wzkr-make-mesboot-3.82.drv" [color = magenta];
|
||||||
|
"/gnu/store/p9sl13frcs2wdcddkh20hc51l7lpavza-glibc-headers-mesboot-2.16.0.drv" [label = "glibc-headers-mesboot@2.16.0", shape = box, fontname = Helvetica];
|
||||||
|
"/gnu/store/p9sl13frcs2wdcddkh20hc51l7lpavza-glibc-headers-mesboot-2.16.0.drv" -> "/gnu/store/2lpg626q4x8v7hgqajywpq1rc8y72hzx-binutils-mesboot-2.20.1a.drv" [color = darkgoldenrod];
|
||||||
|
"/gnu/store/p9sl13frcs2wdcddkh20hc51l7lpavza-glibc-headers-mesboot-2.16.0.drv" -> "/gnu/store/2633565gzh4jqh7c5zf6i0iy9yxqigcv-glibc-mesboot0-2.2.5.drv" [color = darkgoldenrod];
|
||||||
|
"/gnu/store/p9sl13frcs2wdcddkh20hc51l7lpavza-glibc-headers-mesboot-2.16.0.drv" -> "/gnu/store/7pllq0crksfkr7856y1pawcy4scc7l4q-gcc-mesboot1-4.7.4.drv" [color = darkgoldenrod];
|
||||||
|
"/gnu/store/p9sl13frcs2wdcddkh20hc51l7lpavza-glibc-headers-mesboot-2.16.0.drv" -> "/gnu/store/hnxdqmhjdvh1ra9ar4lxl25xf6a7bhzz-mesboot-headers-0.19.drv" [color = darkgoldenrod];
|
||||||
|
"/gnu/store/p9sl13frcs2wdcddkh20hc51l7lpavza-glibc-headers-mesboot-2.16.0.drv" -> "/gnu/store/7wqw4023spvggi15vcxyxvivxa4rmmv8-bootstrap-binaries-0.drv" [color = darkgoldenrod];
|
||||||
|
"/gnu/store/p9sl13frcs2wdcddkh20hc51l7lpavza-glibc-headers-mesboot-2.16.0.drv" -> "/gnu/store/7wqw4023spvggi15vcxyxvivxa4rmmv8-bootstrap-binaries-0.drv" [color = darkgoldenrod];
|
||||||
|
"/gnu/store/p9sl13frcs2wdcddkh20hc51l7lpavza-glibc-headers-mesboot-2.16.0.drv" -> "/gnu/store/r50fj43103526ga6pi2f9jkk4gvaav7m-diffutils-mesboot-2.7.drv" [color = darkgoldenrod];
|
||||||
|
"/gnu/store/p9sl13frcs2wdcddkh20hc51l7lpavza-glibc-headers-mesboot-2.16.0.drv" -> "/gnu/store/r0z9bix88pz0wf6sgcn9185iwcsdracs-linux-libre-headers-bootstrap-0.drv" [color = darkgoldenrod];
|
||||||
|
"/gnu/store/p9sl13frcs2wdcddkh20hc51l7lpavza-glibc-headers-mesboot-2.16.0.drv" -> "/gnu/store/5ad88jy4a1gpbslzdiksk7zjyh28wzkr-make-mesboot-3.82.drv" [color = darkgoldenrod];
|
||||||
|
"/gnu/store/7pllq0crksfkr7856y1pawcy4scc7l4q-gcc-mesboot1-4.7.4.drv" [label = "gcc-mesboot1@4.7.4", shape = box, fontname = Helvetica];
|
||||||
|
"/gnu/store/7pllq0crksfkr7856y1pawcy4scc7l4q-gcc-mesboot1-4.7.4.drv" -> "/gnu/store/2lpg626q4x8v7hgqajywpq1rc8y72hzx-binutils-mesboot-2.20.1a.drv" [color = cyan3];
|
||||||
|
"/gnu/store/7pllq0crksfkr7856y1pawcy4scc7l4q-gcc-mesboot1-4.7.4.drv" -> "/gnu/store/slnyk8gbnvfwy1m1was8myivpss58idd-gcc-mesboot0-2.95.3.drv" [color = cyan3];
|
||||||
|
"/gnu/store/7pllq0crksfkr7856y1pawcy4scc7l4q-gcc-mesboot1-4.7.4.drv" -> "/gnu/store/2633565gzh4jqh7c5zf6i0iy9yxqigcv-glibc-mesboot0-2.2.5.drv" [color = cyan3];
|
||||||
|
"/gnu/store/7pllq0crksfkr7856y1pawcy4scc7l4q-gcc-mesboot1-4.7.4.drv" -> "/gnu/store/7wqw4023spvggi15vcxyxvivxa4rmmv8-bootstrap-binaries-0.drv" [color = cyan3];
|
||||||
|
"/gnu/store/7pllq0crksfkr7856y1pawcy4scc7l4q-gcc-mesboot1-4.7.4.drv" -> "/gnu/store/7wqw4023spvggi15vcxyxvivxa4rmmv8-bootstrap-binaries-0.drv" [color = cyan3];
|
||||||
|
"/gnu/store/7pllq0crksfkr7856y1pawcy4scc7l4q-gcc-mesboot1-4.7.4.drv" -> "/gnu/store/r50fj43103526ga6pi2f9jkk4gvaav7m-diffutils-mesboot-2.7.drv" [color = cyan3];
|
||||||
|
"/gnu/store/7pllq0crksfkr7856y1pawcy4scc7l4q-gcc-mesboot1-4.7.4.drv" -> "/gnu/store/r0z9bix88pz0wf6sgcn9185iwcsdracs-linux-libre-headers-bootstrap-0.drv" [color = cyan3];
|
||||||
|
"/gnu/store/7pllq0crksfkr7856y1pawcy4scc7l4q-gcc-mesboot1-4.7.4.drv" -> "/gnu/store/5ad88jy4a1gpbslzdiksk7zjyh28wzkr-make-mesboot-3.82.drv" [color = cyan3];
|
||||||
|
"/gnu/store/5ad88jy4a1gpbslzdiksk7zjyh28wzkr-make-mesboot-3.82.drv" [label = "make-mesboot@3.82", shape = box, fontname = Helvetica];
|
||||||
|
"/gnu/store/5ad88jy4a1gpbslzdiksk7zjyh28wzkr-make-mesboot-3.82.drv" -> "/gnu/store/x9shp86cz9f4rb5xvhs37zzxg1ngi4dr-binutils-mesboot0-2.20.1a.drv" [color = dimgrey];
|
||||||
|
"/gnu/store/5ad88jy4a1gpbslzdiksk7zjyh28wzkr-make-mesboot-3.82.drv" -> "/gnu/store/2633565gzh4jqh7c5zf6i0iy9yxqigcv-glibc-mesboot0-2.2.5.drv" [color = dimgrey];
|
||||||
|
"/gnu/store/5ad88jy4a1gpbslzdiksk7zjyh28wzkr-make-mesboot-3.82.drv" -> "/gnu/store/slnyk8gbnvfwy1m1was8myivpss58idd-gcc-mesboot0-2.95.3.drv" [color = dimgrey];
|
||||||
|
"/gnu/store/5ad88jy4a1gpbslzdiksk7zjyh28wzkr-make-mesboot-3.82.drv" -> "/gnu/store/57da9mdiqhyn72m8wv00pdvzqi2ng4xb-make-mesboot0-3.80.drv" [color = dimgrey];
|
||||||
|
"/gnu/store/5ad88jy4a1gpbslzdiksk7zjyh28wzkr-make-mesboot-3.82.drv" -> "/gnu/store/7wqw4023spvggi15vcxyxvivxa4rmmv8-bootstrap-binaries-0.drv" [color = dimgrey];
|
||||||
|
"/gnu/store/5ad88jy4a1gpbslzdiksk7zjyh28wzkr-make-mesboot-3.82.drv" -> "/gnu/store/7wqw4023spvggi15vcxyxvivxa4rmmv8-bootstrap-binaries-0.drv" [color = dimgrey];
|
||||||
|
"/gnu/store/5ad88jy4a1gpbslzdiksk7zjyh28wzkr-make-mesboot-3.82.drv" -> "/gnu/store/r0z9bix88pz0wf6sgcn9185iwcsdracs-linux-libre-headers-bootstrap-0.drv" [color = dimgrey];
|
||||||
|
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,43 @@
|
||||||
|
;;; guix.scm -- Guix package definition
|
||||||
|
|
||||||
|
;;; GNU Mes --- Maxwell Equations of Software
|
||||||
|
;;; Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
|
;;;
|
||||||
|
;;; This file is part of GNU Mes.
|
||||||
|
;;;
|
||||||
|
;;; GNU 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.
|
||||||
|
;;;
|
||||||
|
;;; GNU 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 GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
;;; Commentary:
|
||||||
|
;;
|
||||||
|
;; GNU Guix development package. To build and install, run:
|
||||||
|
;;
|
||||||
|
;; guix package -f guix.scm
|
||||||
|
;;
|
||||||
|
;; To build it, but not install it, run:
|
||||||
|
;;
|
||||||
|
;; guix build -f guix.scm
|
||||||
|
;;
|
||||||
|
;; To use as the basis for a development environment, run:
|
||||||
|
;;
|
||||||
|
;; guix environment -l guix.scm
|
||||||
|
;;
|
||||||
|
;;; Code:
|
||||||
|
|
||||||
|
(define %source-dir (dirname (current-filename)))
|
||||||
|
(add-to-load-path (string-append %source-dir "/guix"))
|
||||||
|
|
||||||
|
(use-modules (git mes))
|
||||||
|
|
||||||
|
;; Return it here so `guix build/environment/package' can consume it directly.
|
||||||
|
mes.git
|
|
@ -0,0 +1,175 @@
|
||||||
|
;;; GNU Mes --- Maxwell Equations of Software
|
||||||
|
;;; Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
|
;;;
|
||||||
|
;;; This file is part of GNU Mes.
|
||||||
|
;;;
|
||||||
|
;;; Also borrowing code from:
|
||||||
|
;;; guile-sdl2 --- FFI bindings for SDL2
|
||||||
|
;;; Copyright © 2015 David Thompson <davet@gnu.org>
|
||||||
|
;;;
|
||||||
|
;;; GNU 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.
|
||||||
|
;;;
|
||||||
|
;;; GNU 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 GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
(define-module (git mes)
|
||||||
|
#:use-module (srfi srfi-1)
|
||||||
|
#:use-module (srfi srfi-26)
|
||||||
|
#:use-module (ice-9 match)
|
||||||
|
#:use-module (ice-9 popen)
|
||||||
|
#:use-module (ice-9 rdelim)
|
||||||
|
#:use-module (gnu packages)
|
||||||
|
#:use-module (gnu packages base)
|
||||||
|
#:use-module (gnu packages commencement)
|
||||||
|
#:use-module (gnu packages cross-base)
|
||||||
|
#:use-module (gnu packages gcc)
|
||||||
|
#:use-module (gnu packages graphviz)
|
||||||
|
#:use-module (gnu packages guile)
|
||||||
|
#:use-module (gnu packages man)
|
||||||
|
#:use-module (gnu packages mes)
|
||||||
|
#:use-module (gnu packages package-management)
|
||||||
|
#:use-module (gnu packages version-control)
|
||||||
|
#:use-module (gnu packages perl)
|
||||||
|
#:use-module (gnu packages pkg-config)
|
||||||
|
#:use-module (gnu packages texinfo)
|
||||||
|
#:use-module (guix build-system gnu)
|
||||||
|
#:use-module (guix build-system trivial)
|
||||||
|
#:use-module (guix gexp)
|
||||||
|
#:use-module (guix download)
|
||||||
|
#:use-module (guix git-download)
|
||||||
|
#:use-module (guix licenses)
|
||||||
|
#:use-module (guix packages))
|
||||||
|
|
||||||
|
(define %source-dir (getcwd))
|
||||||
|
|
||||||
|
(define-public mescc-tools
|
||||||
|
(package
|
||||||
|
(name "mescc-tools")
|
||||||
|
(version "0.6.1")
|
||||||
|
(source (origin
|
||||||
|
(method url-fetch)
|
||||||
|
(uri (string-append
|
||||||
|
"http://git.savannah.nongnu.org/cgit/mescc-tools.git/snapshot/"
|
||||||
|
name "-Release_" version
|
||||||
|
".tar.gz"))
|
||||||
|
(file-name (string-append name "-" version ".tar.gz"))
|
||||||
|
(sha256
|
||||||
|
(base32
|
||||||
|
"06jpvq6xfjzn2al6b4rdwd3zv3h4cvilc4n9gqcnjr9cr6wjpw2n"))))
|
||||||
|
(build-system gnu-build-system)
|
||||||
|
(supported-systems '("i686-linux" "x86_64-linux"))
|
||||||
|
(arguments
|
||||||
|
`(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
|
||||||
|
"CC=gcc")
|
||||||
|
#:test-target "test"
|
||||||
|
#:phases (modify-phases %standard-phases
|
||||||
|
(delete 'configure))))
|
||||||
|
(synopsis "Tools for the full source bootstrapping process")
|
||||||
|
(description
|
||||||
|
"Mescc-tools is a collection of tools for use in a full source
|
||||||
|
bootstrapping process. It consists of the M1 macro assembler, the hex2
|
||||||
|
linker, the blood-elf symbol table generator, the kaem shell, exec_enable and
|
||||||
|
get_machine.")
|
||||||
|
(home-page "https://savannah.nongnu.org/projects/mescc-tools")
|
||||||
|
(license gpl3+)))
|
||||||
|
|
||||||
|
(define-public nyacc
|
||||||
|
(package
|
||||||
|
(name "nyacc")
|
||||||
|
(version "0.99.0")
|
||||||
|
(source (origin
|
||||||
|
(method url-fetch)
|
||||||
|
(uri (string-append "mirror://savannah/nyacc/nyacc-"
|
||||||
|
version ".tar.gz"))
|
||||||
|
(sha256
|
||||||
|
(base32
|
||||||
|
"0hl5qxx19i4x1r0839sxm19ziqq65g4hy97yik81cc2yb9yvgyv3"))
|
||||||
|
(modules '((guix build utils)))
|
||||||
|
(snippet
|
||||||
|
'(begin
|
||||||
|
(substitute* (find-files "." "^Makefile\\.in$")
|
||||||
|
(("^SITE_SCM_DIR =.*")
|
||||||
|
"SITE_SCM_DIR = \
|
||||||
|
@prefix@/share/guile/site/@GUILE_EFFECTIVE_VERSION@\n")
|
||||||
|
(("^SITE_SCM_GO_DIR =.*")
|
||||||
|
"SITE_SCM_GO_DIR = \
|
||||||
|
@prefix@/lib/guile/@GUILE_EFFECTIVE_VERSION@/site-ccache\n")
|
||||||
|
(("^INFODIR =.*")
|
||||||
|
"INFODIR = @prefix@/share/info\n")
|
||||||
|
(("^DOCDIR =.*")
|
||||||
|
"DOCDIR = @prefix@/share/doc/$(PACKAGE_TARNAME)\n"))
|
||||||
|
#t))))
|
||||||
|
(build-system gnu-build-system)
|
||||||
|
(native-inputs
|
||||||
|
`(("pkg-config" ,pkg-config)))
|
||||||
|
(inputs
|
||||||
|
`(("guile" ,guile-2.2)))
|
||||||
|
(synopsis "LALR(1) Parser Generator in Guile")
|
||||||
|
(description
|
||||||
|
"NYACC is an LALR(1) parser generator implemented in Guile.
|
||||||
|
The syntax and nomenclature should be considered not stable. It comes with
|
||||||
|
extensive examples, including parsers for the Javascript and C99 languages.")
|
||||||
|
(home-page "https://savannah.nongnu.org/projects/nyacc")
|
||||||
|
(license (list gpl3+ lgpl3+))))
|
||||||
|
|
||||||
|
(define-public mes
|
||||||
|
(let ((triplet "i686-unknown-linux-gnu")
|
||||||
|
(version "0.22"))
|
||||||
|
(package
|
||||||
|
(name "mes")
|
||||||
|
(version version)
|
||||||
|
(source (origin
|
||||||
|
(method url-fetch)
|
||||||
|
(uri (string-append
|
||||||
|
"https://ftp.gnu.org/pub/gnu/mes/mes-" version ".tar.gz"))
|
||||||
|
(sha256
|
||||||
|
(base32 #!mes!# "04pajp8v31na34ls4730ig5f6miiplhdvkmsb9ls1b8bbmw2vb4n"))))
|
||||||
|
(build-system gnu-build-system)
|
||||||
|
(supported-systems '("i686-linux" "x86_64-linux"))
|
||||||
|
(propagated-inputs
|
||||||
|
`(("mescc-tools" ,mescc-tools)
|
||||||
|
("nyacc" ,nyacc)))
|
||||||
|
(native-inputs
|
||||||
|
`(("guile" ,guile-2.2)
|
||||||
|
,@(if (string-prefix? "x86_64-linux" (or (%current-target-system)
|
||||||
|
(%current-system)))
|
||||||
|
;; Use cross-compiler rather than #:system "i686-linux" to get
|
||||||
|
;; MesCC 64 bit .go files installed ready for use with Guile.
|
||||||
|
`(("i686-linux-binutils" ,(cross-binutils triplet))
|
||||||
|
("i686-linux-gcc" ,(cross-gcc triplet)))
|
||||||
|
'())
|
||||||
|
("graphviz" ,graphviz)
|
||||||
|
("help2man" ,help2man)
|
||||||
|
("perl" ,perl) ; build-aux/gitlog-to-changelog
|
||||||
|
("texinfo" ,texinfo)))
|
||||||
|
(arguments
|
||||||
|
`(#:strip-binaries? #f)) ; binutil's strip b0rkes MesCC/M1/hex2 binaries
|
||||||
|
(synopsis "Scheme interpreter and C compiler for full source bootstrapping")
|
||||||
|
(description
|
||||||
|
"GNU Mes--Maxwell Equations of Software--brings the Reduced Binary Seed
|
||||||
|
bootstrap to Guix and aims to help create full source bootstrapping for
|
||||||
|
GNU/Linux distributions. It consists of a mutual self-hosting Scheme
|
||||||
|
interpreter in C and a Nyacc-based C compiler in Scheme and is compatible with
|
||||||
|
Guile.")
|
||||||
|
(home-page "https://www.gnu.org/software/mes")
|
||||||
|
(license gpl3+))))
|
||||||
|
|
||||||
|
(define-public mes.git
|
||||||
|
(let ((version "0.22")
|
||||||
|
(revision "0")
|
||||||
|
(commit (read-string (open-pipe "git show HEAD | head -1 | cut -d ' ' -f 2" OPEN_READ))))
|
||||||
|
(package
|
||||||
|
(inherit mes)
|
||||||
|
(name "mes.git")
|
||||||
|
(version (string-append version "-" revision "." (string-take commit 7)))
|
||||||
|
(source (local-file %source-dir
|
||||||
|
#:recursive? #t
|
||||||
|
#:select? (git-predicate %source-dir))))))
|
|
@ -0,0 +1,44 @@
|
||||||
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
|
* Copyright © 2017 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
|
*
|
||||||
|
* This file is part of GNU Mes.
|
||||||
|
*
|
||||||
|
* GNU 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.
|
||||||
|
*
|
||||||
|
* GNU 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 GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#ifndef __MES_ALLOCA_H
|
||||||
|
#define __MES_ALLOCA_H 1
|
||||||
|
|
||||||
|
#if SYSTEM_LIBC
|
||||||
|
#ifndef _GNU_SOURCE
|
||||||
|
#define _GNU_SOURCE
|
||||||
|
#endif
|
||||||
|
#undef __MES_ALLOCA_H
|
||||||
|
#include_next <alloca.h>
|
||||||
|
|
||||||
|
#else // ! SYSTEM_LIBC
|
||||||
|
|
||||||
|
#include <sys/types.h>
|
||||||
|
|
||||||
|
#if _ALLOCA_UNSIGNED
|
||||||
|
void *alloca (unsigned size);
|
||||||
|
#elif _ALLOCA_CHAR
|
||||||
|
char *alloca (int);
|
||||||
|
#else
|
||||||
|
void *alloca (size_t size);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // ! SYSTEM_LIBC
|
||||||
|
|
||||||
|
#endif // __MES_ALLOCA_H
|
|
@ -0,0 +1,56 @@
|
||||||
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
|
* Copyright (C) 1996 Free Software Foundation, Inc.
|
||||||
|
* Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
|
*
|
||||||
|
* This file is part of GNU Mes.
|
||||||
|
*
|
||||||
|
* GNU 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.
|
||||||
|
*
|
||||||
|
* GNU 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 GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#ifndef __MES_AR_H
|
||||||
|
#define __MES_AR_H 1
|
||||||
|
|
||||||
|
#if SYSTEM_LIBC
|
||||||
|
#ifndef _GNU_SOURCE
|
||||||
|
#define _GNU_SOURCE
|
||||||
|
#endif
|
||||||
|
#undef __MES_AR_H
|
||||||
|
#include_next <ar.h>
|
||||||
|
|
||||||
|
#else // ! SYSTEM_LIBC
|
||||||
|
|
||||||
|
// Taken from GNU C Library 2.2.5
|
||||||
|
|
||||||
|
/* Archive files start with the ARMAG identifying string. Then follows a
|
||||||
|
`struct ar_hdr', and as many bytes of member file data as its `ar_size'
|
||||||
|
member indicates, for each member file. */
|
||||||
|
|
||||||
|
#define ARMAG "!<arch>\n" /* String that begins an archive file. */
|
||||||
|
#define SARMAG 8 /* Size of that string. */
|
||||||
|
|
||||||
|
#define ARFMAG "`\n" /* String in ar_fmag at end of each header. */
|
||||||
|
|
||||||
|
struct ar_hdr
|
||||||
|
{
|
||||||
|
char ar_name[16]; /* Member file name, sometimes / terminated. */
|
||||||
|
char ar_date[12]; /* File date, decimal seconds since Epoch. */
|
||||||
|
char ar_uid[6], ar_gid[6]; /* User and group IDs, in ASCII decimal. */
|
||||||
|
char ar_mode[8]; /* File mode, in ASCII octal. */
|
||||||
|
char ar_size[10]; /* File size, in ASCII decimal. */
|
||||||
|
char ar_fmag[2]; /* Always contains ARFMAG. */
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // ! SYSTEM_LIBC
|
||||||
|
|
||||||
|
#endif // __MES_ARGZ_H
|
|
@ -0,0 +1,40 @@
|
||||||
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
|
* Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
|
*
|
||||||
|
* This file is part of GNU Mes.
|
||||||
|
*
|
||||||
|
* GNU 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.
|
||||||
|
*
|
||||||
|
* GNU 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 GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#ifndef __MES_ARGZ_H
|
||||||
|
#define __MES_ARGZ_H 1
|
||||||
|
|
||||||
|
#if SYSTEM_LIBC
|
||||||
|
#ifndef _GNU_SOURCE
|
||||||
|
#define _GNU_SOURCE
|
||||||
|
#endif
|
||||||
|
#undef __MES_ARGZ_H
|
||||||
|
#include_next <argz.h>
|
||||||
|
|
||||||
|
#else // ! SYSTEM_LIBC
|
||||||
|
|
||||||
|
#include <mes/lib-mini.h>
|
||||||
|
|
||||||
|
size_t __argz_count (char const *argz, size_t len);
|
||||||
|
void __argz_extract (char const *argz, size_t len, char **argv);
|
||||||
|
size_t __argz_extract_count (char const *argz, size_t len, char **argv);
|
||||||
|
|
||||||
|
#endif // ! SYSTEM_LIBC
|
||||||
|
|
||||||
|
#endif // __MES_ARGZ_H
|
|
@ -0,0 +1,34 @@
|
||||||
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
|
* Copyright © 2017 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
|
*
|
||||||
|
* This file is part of GNU Mes.
|
||||||
|
*
|
||||||
|
* GNU 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.
|
||||||
|
*
|
||||||
|
* GNU 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 GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#ifndef __MES_ASSERT_H
|
||||||
|
#define __MES_ASSERT_H 1
|
||||||
|
|
||||||
|
#if SYSTEM_LIBC
|
||||||
|
#ifndef _GNU_SOURCE
|
||||||
|
#define _GNU_SOURCE
|
||||||
|
#endif
|
||||||
|
#undef __MES_ASSERT_H
|
||||||
|
#include_next <assert.h>
|
||||||
|
#else // ! SYSTEM_LIBC
|
||||||
|
#define assert(x) ((x) ? (void)0 : __assert_fail (#x))
|
||||||
|
void __assert_fail (char *s);
|
||||||
|
#endif // ! SYSTEM_LIBC
|
||||||
|
|
||||||
|
#endif // __MES_ASSERT_H
|
|
@ -0,0 +1,51 @@
|
||||||
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
|
* Copyright © 2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
|
*
|
||||||
|
* This file is part of GNU Mes.
|
||||||
|
*
|
||||||
|
* GNU 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.
|
||||||
|
*
|
||||||
|
* GNU 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 GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#ifndef __MES_CTYPE_H
|
||||||
|
#define __MES_CTYPE_H 1
|
||||||
|
|
||||||
|
#if SYSTEM_LIBC
|
||||||
|
#ifndef _GNU_SOURCE
|
||||||
|
#define _GNU_SOURCE
|
||||||
|
#endif
|
||||||
|
#undef __MES_CTYPE_H
|
||||||
|
#include_next <ctype.h>
|
||||||
|
|
||||||
|
#else // ! SYSTEM_LIBC
|
||||||
|
#include <endian.h>
|
||||||
|
|
||||||
|
int isalnum (int c);
|
||||||
|
int isalpha (int c);
|
||||||
|
int isascii (int c);
|
||||||
|
int iscntrl (int c);
|
||||||
|
int isdigit (int c);
|
||||||
|
int isgraph (int c);
|
||||||
|
int islower (int c);
|
||||||
|
int isnumber (int c, int base);
|
||||||
|
int isprint (int c);
|
||||||
|
int ispunct (int c);
|
||||||
|
int isspace (int c);
|
||||||
|
int isupper (int c);
|
||||||
|
int isxdigit (int c);
|
||||||
|
int tolower (int c);
|
||||||
|
int toupper (int c);
|
||||||
|
|
||||||
|
#endif // ! SYSTEM_LIBC
|
||||||
|
|
||||||
|
#endif // __MES_CTYPE_H
|
|
@ -0,0 +1,76 @@
|
||||||
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
|
* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
|
||||||
|
* Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
|
*
|
||||||
|
* This file is part of GNU Mes.
|
||||||
|
*
|
||||||
|
* GNU 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.
|
||||||
|
*
|
||||||
|
* GNU 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 GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __MES_DIRENT_H
|
||||||
|
#define __MES_DIRENT_H 1
|
||||||
|
|
||||||
|
#if SYSTEM_LIBC
|
||||||
|
#ifndef _GNU_SOURCE
|
||||||
|
#define _GNU_SOURCE
|
||||||
|
#endif
|
||||||
|
#undef __MES_DIRENT_H
|
||||||
|
#include_next <dirent.h>
|
||||||
|
|
||||||
|
#else // ! SYSTEM_LIBC
|
||||||
|
|
||||||
|
#include <dirstream.h>
|
||||||
|
|
||||||
|
// Taken from GNU C Library 1.06.4, 2.2.5
|
||||||
|
|
||||||
|
/*
|
||||||
|
* POSIX Standard: 5.1.2 Directory Operations <dirent.h>
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stddef.h>
|
||||||
|
|
||||||
|
int __getdirentries (int filedes, char *buffer, size_t nbytes, off_t * basep);
|
||||||
|
|
||||||
|
struct dirent
|
||||||
|
{
|
||||||
|
ino_t d_ino;
|
||||||
|
off_t d_off;
|
||||||
|
unsigned short int d_reclen;
|
||||||
|
#if 0
|
||||||
|
unsigned char d_type;
|
||||||
|
#endif
|
||||||
|
char d_name[256]; /* We must not include limits.h! */
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Open a directory stream on NAME.
|
||||||
|
Return a DIR stream on the directory, or NULL if it could not be opened. */
|
||||||
|
DIR *opendir (char const *name);
|
||||||
|
|
||||||
|
/* Close the directory stream DIRP.
|
||||||
|
Return 0 if successful, -1 if not. */
|
||||||
|
int closedir (DIR * dirp);
|
||||||
|
|
||||||
|
/* Read a directory entry from DIRP.
|
||||||
|
Return a pointer to a `struct dirent' describing the entry,
|
||||||
|
or NULL for EOF or error. The storage returned may be overwritten
|
||||||
|
by a later readdir call on the same DIR stream. */
|
||||||
|
struct dirent *readdir (DIR * dirp);
|
||||||
|
|
||||||
|
/* Rewind DIRP to the beginning of the directory. */
|
||||||
|
extern void rewinddir (DIR * dirp);
|
||||||
|
|
||||||
|
#endif // ! SYSTEM_LIBC
|
||||||
|
|
||||||
|
#endif // __MES_DIRENT_H
|
|
@ -0,0 +1,55 @@
|
||||||
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
|
*Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc.
|
||||||
|
* Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
|
*
|
||||||
|
* This file is part of GNU Mes.
|
||||||
|
*
|
||||||
|
* GNU 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.
|
||||||
|
*
|
||||||
|
* GNU 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 GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __MES_DIRSTREAM_H
|
||||||
|
#define __MES_DIRSTREAM_H 1
|
||||||
|
|
||||||
|
#if SYSTEM_LIBC && HAVE_DIRSTREAM_H
|
||||||
|
#ifndef _GNU_SOURCE
|
||||||
|
#define _GNU_SOURCE
|
||||||
|
#endif
|
||||||
|
#undef __MES_DIRSTREAM_H
|
||||||
|
#include_next <dirstream.h>
|
||||||
|
|
||||||
|
#else // ! SYSTEM_LIBC
|
||||||
|
|
||||||
|
#include <sys/types.h>
|
||||||
|
|
||||||
|
// Taken from GNU C Library 2.2.5
|
||||||
|
|
||||||
|
/* Directory stream type. */
|
||||||
|
struct __dirstream
|
||||||
|
{
|
||||||
|
int fd; /* File descriptor. */
|
||||||
|
|
||||||
|
char *data; /* Directory block. */
|
||||||
|
size_t allocation; /* Space allocated for the block. */
|
||||||
|
size_t size; /* Total valid data in the block. */
|
||||||
|
size_t offset; /* Current offset into the block. */
|
||||||
|
|
||||||
|
off_t filepos; /* Position of next entry to read. */
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct __dirstream DIR;
|
||||||
|
|
||||||
|
#endif // ! SYSTEM_LIBC
|
||||||
|
|
||||||
|
#endif // __MES_DIRSTREAM_H
|
|
@ -0,0 +1,44 @@
|
||||||
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
|
* Copyright © 2017 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
|
*
|
||||||
|
* This file is part of GNU Mes.
|
||||||
|
*
|
||||||
|
* GNU 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.
|
||||||
|
*
|
||||||
|
* GNU 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 GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#ifndef __MES_DLFCN_H
|
||||||
|
#define __MES_DLFCN_H 1
|
||||||
|
|
||||||
|
#if SYSTEM_LIBC
|
||||||
|
#undef __MES_DLFCN_H
|
||||||
|
#include_next <dlfcn.h>
|
||||||
|
|
||||||
|
#else // ! SYSTEM_LIBC
|
||||||
|
|
||||||
|
#define RTLD_LAZY 0x00001
|
||||||
|
#define RTLD_NOW 0x00002
|
||||||
|
#define RTLD_BINDING_MASK 0x3
|
||||||
|
#define RTLD_NOLOAD 0x00004
|
||||||
|
#define RTLD_DEEPBIND 0x00008
|
||||||
|
#define RTLD_GLOBAL 0x00100
|
||||||
|
#define RTLD_LOCAL 0
|
||||||
|
#define RTLD_NODELETE 0x01000
|
||||||
|
#define RTLD_DEFAULT 0
|
||||||
|
|
||||||
|
void *dlopen (char const *filename, int flags);
|
||||||
|
int dlclose (void *handle);
|
||||||
|
|
||||||
|
#endif // ! SYSTEM_LIBC
|
||||||
|
|
||||||
|
#endif // __MES_DLFCN_H
|
|
@ -0,0 +1,36 @@
|
||||||
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
|
* Copyright © 2017 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
|
*
|
||||||
|
* This file is part of GNU Mes.
|
||||||
|
*
|
||||||
|
* GNU 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.
|
||||||
|
*
|
||||||
|
* GNU 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 GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#ifndef __MES_ENDIAN_H
|
||||||
|
#define __MES_ENDIAN_H 1
|
||||||
|
|
||||||
|
#if SYSTEM_LIBC
|
||||||
|
#ifndef _GNU_SOURCE
|
||||||
|
#define _GNU_SOURCE
|
||||||
|
#endif
|
||||||
|
#undef __MES_ENDIAN_H
|
||||||
|
#include_next <endian.h>
|
||||||
|
|
||||||
|
#else // ! SYSTEM_LIBC
|
||||||
|
#define __LITTLE_ENDIAN 1234
|
||||||
|
#define __BIG_ENDIAN 4321
|
||||||
|
#define __BYTE_ORDER __LITTLE_ENDIAN
|
||||||
|
#endif // ! SYSTEM_LIBC
|
||||||
|
|
||||||
|
#endif // __MES_ENDIAN_H
|
|
@ -0,0 +1,72 @@
|
||||||
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
|
* Copyright © 2017,2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
|
*
|
||||||
|
* This file is part of GNU Mes.
|
||||||
|
*
|
||||||
|
* GNU 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.
|
||||||
|
*
|
||||||
|
* GNU 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 GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#ifndef __MES_ERRNO_H
|
||||||
|
#define __MES_ERRNO_H 1
|
||||||
|
|
||||||
|
#if SYSTEM_LIBC
|
||||||
|
#ifndef _GNU_SOURCE
|
||||||
|
#define _GNU_SOURCE
|
||||||
|
#endif
|
||||||
|
#undef __MES_ERRNO_H
|
||||||
|
#include_next <errno.h>
|
||||||
|
#else // ! SYSTEM_LIBC
|
||||||
|
|
||||||
|
#ifndef __MES_ERRNO_T
|
||||||
|
#define __MES_ERRNO_T 1
|
||||||
|
typedef int error_t;
|
||||||
|
int errno;
|
||||||
|
#endif // !__MES_ERRNO_T
|
||||||
|
|
||||||
|
int errno;
|
||||||
|
#define ENOENT 2
|
||||||
|
#define EINTR 4
|
||||||
|
#define EIO 5
|
||||||
|
#define ENXIO 6
|
||||||
|
#define E2BIG 7
|
||||||
|
#define ENOEXEC 8
|
||||||
|
#define EBADF 9
|
||||||
|
#define ECHILD 10
|
||||||
|
#define EAGAIN 11
|
||||||
|
#define ENOMEM 12
|
||||||
|
#define EACCES 13
|
||||||
|
#define EEXIST 17
|
||||||
|
#define EXDEV 18
|
||||||
|
#define ENOTDIR 20
|
||||||
|
#define EISDIR 21
|
||||||
|
#define EINVAL 22
|
||||||
|
#define EMFILE 24
|
||||||
|
#define ENOSPC 28
|
||||||
|
#define ESPIPE 29
|
||||||
|
#define EPIPE 32
|
||||||
|
#define ERANGE 34
|
||||||
|
|
||||||
|
#define ENAMETOOLONG 36
|
||||||
|
#define ENOSYS 38
|
||||||
|
#define ELOOP 40
|
||||||
|
|
||||||
|
#if !__MESC__
|
||||||
|
//extern char const *const sys_errlist[];
|
||||||
|
extern char *sys_errlist[];
|
||||||
|
extern int sys_nerr;
|
||||||
|
#endif // !__MESC__
|
||||||
|
|
||||||
|
#endif // ! SYSTEM_LIBC
|
||||||
|
|
||||||
|
#endif // __MES_ERRNO_H
|
|
@ -0,0 +1,70 @@
|
||||||
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
|
* Copyright © 2017 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
|
*
|
||||||
|
* This file is part of GNU Mes.
|
||||||
|
*
|
||||||
|
* GNU 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.
|
||||||
|
*
|
||||||
|
* GNU 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 GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#ifndef __MES_FCNTL_H
|
||||||
|
#define __MES_FCNTL_H 1
|
||||||
|
|
||||||
|
#if SYSTEM_LIBC
|
||||||
|
#ifndef _GNU_SOURCE
|
||||||
|
#define _GNU_SOURCE
|
||||||
|
#endif
|
||||||
|
#undef __MES_FCNTL_H
|
||||||
|
#include_next <fcntl.h>
|
||||||
|
|
||||||
|
#else // ! SYSTEM_LIBC
|
||||||
|
|
||||||
|
// *INDENT-OFF*
|
||||||
|
#if __linux__
|
||||||
|
#define O_RDONLY 0
|
||||||
|
#define O_WRONLY 1
|
||||||
|
#define O_RDWR 2
|
||||||
|
#define O_CREAT 0x40
|
||||||
|
#define O_EXCL 0x80
|
||||||
|
#define O_TRUNC 0x200
|
||||||
|
#define O_APPEND 0x400
|
||||||
|
#define O_DIRECTORY 0x10000
|
||||||
|
#elif __GNU__
|
||||||
|
#define O_RDONLY 1
|
||||||
|
#define O_WRONLY 2
|
||||||
|
#define O_RDWR 3
|
||||||
|
#define O_CREAT 0x10
|
||||||
|
#define O_APPEND 0x100
|
||||||
|
#define O_TRUNC 0x10000
|
||||||
|
#else
|
||||||
|
#error platform not supported
|
||||||
|
#endif
|
||||||
|
// *INDENT-ON*
|
||||||
|
|
||||||
|
#define FD_CLOEXEC 1
|
||||||
|
|
||||||
|
#define F_DUPFD 0
|
||||||
|
#define F_GETFD 1
|
||||||
|
#define F_SETFD 2
|
||||||
|
#define F_GETFL 3
|
||||||
|
#define F_SETFL 4
|
||||||
|
|
||||||
|
#define creat(file_name, mode) open (file_name, O_WRONLY | O_CREAT | O_TRUNC, mode)
|
||||||
|
int dup (int old);
|
||||||
|
int dup2 (int old, int new);
|
||||||
|
int fcntl (int filedes, int command, ...);
|
||||||
|
int open (char const *s, int flags, ...);
|
||||||
|
|
||||||
|
#endif // ! SYSTEM_LIBC
|
||||||
|
|
||||||
|
#endif // __MES_FCNTL_H
|
|
@ -0,0 +1,28 @@
|
||||||
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
|
* Copyright © 2017 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
|
*
|
||||||
|
* This file is part of GNU Mes.
|
||||||
|
*
|
||||||
|
* GNU 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.
|
||||||
|
*
|
||||||
|
* GNU 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 GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#ifndef __MES_FEATURES_H
|
||||||
|
#define __MES_FEATURES_H 1
|
||||||
|
|
||||||
|
#if SYSTEM_LIBC
|
||||||
|
#undef __MES_FEATURES_H
|
||||||
|
#include_next <features.h>
|
||||||
|
#endif // (SYSTEM_LIBC)
|
||||||
|
|
||||||
|
#endif // __MES_FEATURES_H
|
|
@ -0,0 +1,34 @@
|
||||||
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
|
* Copyright © 2017 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
|
*
|
||||||
|
* This file is part of GNU Mes.
|
||||||
|
*
|
||||||
|
* GNU 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.
|
||||||
|
*
|
||||||
|
* GNU 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 GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#ifndef __MES_FLOAT_H
|
||||||
|
#define __MES_FLOAT_H 1
|
||||||
|
|
||||||
|
#if SYSTEM_LIBC
|
||||||
|
#undef __MES_FLOAT_H
|
||||||
|
#include_next <float.h>
|
||||||
|
#else // ! SYSTEM_LIBC
|
||||||
|
|
||||||
|
#define MIN_EXP -1021
|
||||||
|
#define DBL_MIN_EXP -1021
|
||||||
|
#define LDBL_MIN_EXP -1021
|
||||||
|
|
||||||
|
#endif // ! SYSTEM_LIBC
|
||||||
|
|
||||||
|
#endif // __MES_FLOAT_H
|
|
@ -0,0 +1,62 @@
|
||||||
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
|
* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
|
||||||
|
* Copyright © 2017,2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
|
*
|
||||||
|
* This file is part of GNU Mes.
|
||||||
|
*
|
||||||
|
* GNU 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.
|
||||||
|
*
|
||||||
|
* GNU 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 GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#ifndef __MES_GETOPT_H
|
||||||
|
#define __MES_GETOPT_H 1
|
||||||
|
|
||||||
|
#if SYSTEM_LIBC
|
||||||
|
#ifndef _GNU_SOURCE
|
||||||
|
#define _GNU_SOURCE
|
||||||
|
#endif
|
||||||
|
#undef __MES_GETOPT_H
|
||||||
|
#include_next <getopt.h>
|
||||||
|
|
||||||
|
#else // ! SYSTEM_LIBC
|
||||||
|
#include <endian.h>
|
||||||
|
int isdigit (int);
|
||||||
|
int isxdigit (int);
|
||||||
|
|
||||||
|
char *optarg;
|
||||||
|
int optind;
|
||||||
|
int opterr;
|
||||||
|
struct option
|
||||||
|
{
|
||||||
|
char const *name;
|
||||||
|
int has_arg;
|
||||||
|
int *flag;
|
||||||
|
int val;
|
||||||
|
};
|
||||||
|
|
||||||
|
enum _argtype
|
||||||
|
{
|
||||||
|
no_argument,
|
||||||
|
required_argument,
|
||||||
|
optional_argument
|
||||||
|
};
|
||||||
|
|
||||||
|
int getopt (int argc, char *const *argv, char const *options);
|
||||||
|
int getopt_long (int argc, char *const *argv, char const *options,
|
||||||
|
struct option const *long_options, int *opt_index);
|
||||||
|
int getopt_long_only (int argc, char *const *argv, char const *options,
|
||||||
|
struct option const *long_options, int *opt_index);
|
||||||
|
|
||||||
|
#endif // ! SYSTEM_LIBC
|
||||||
|
|
||||||
|
#endif // __MES_GETOPT_H
|
|
@ -0,0 +1,393 @@
|
||||||
|
/* C declarations for Hurd server interfaces
|
||||||
|
Copyright (C) 1993, 1994, 1995, 1996, 1998, 1999, 2001, 2002,
|
||||||
|
2010 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
This file is part of the GNU Hurd.
|
||||||
|
|
||||||
|
The GNU Hurd 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 2, or (at your option)
|
||||||
|
any later version.
|
||||||
|
|
||||||
|
The GNU Hurd 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 the GNU Hurd; see the file COPYING. If not, write to
|
||||||
|
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||||
|
|
||||||
|
#ifndef _HURD_TYPES_H
|
||||||
|
#define _HURD_TYPES_H
|
||||||
|
|
||||||
|
#ifndef _FILE_OFFSET_BITS
|
||||||
|
#define _FILE_OFFSET_BITS 32
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <time.h> /* For struct timespec. */
|
||||||
|
#include <mach/std_types.h> /* For mach_port_t et al. */
|
||||||
|
#include <mach/message.h> /* For mach_msg_id_t et al. */
|
||||||
|
#include <sys/types.h> /* For pid_t and uid_t. */
|
||||||
|
|
||||||
|
/* A string identifying this release of the GNU Hurd. Our
|
||||||
|
interpretation of the term "release" is that it refers to a set of
|
||||||
|
server interface definitions. A "version" in Posix terminology is
|
||||||
|
a distribution of the Hurd; there may be more than one distribution
|
||||||
|
without changing the release number. */
|
||||||
|
#define HURD_RELEASE "0.0"
|
||||||
|
|
||||||
|
|
||||||
|
/* Simple type declarations */
|
||||||
|
|
||||||
|
/* These types identify certain kinds of ports used by the Hurd. */
|
||||||
|
typedef mach_port_t file_t;
|
||||||
|
typedef mach_port_t fsys_t;
|
||||||
|
typedef mach_port_t io_t;
|
||||||
|
typedef mach_port_t process_t;
|
||||||
|
typedef mach_port_t auth_t;
|
||||||
|
typedef mach_port_t socket_t;
|
||||||
|
typedef mach_port_t pf_t; /* Protocol family */
|
||||||
|
typedef mach_port_t addr_port_t;
|
||||||
|
typedef mach_port_t startup_t;
|
||||||
|
typedef mach_port_t fs_notify_t;
|
||||||
|
typedef mach_port_t exec_startup_t;
|
||||||
|
typedef mach_port_t interrupt_t;
|
||||||
|
typedef mach_port_t proccoll_t;
|
||||||
|
typedef mach_port_t ctty_t;
|
||||||
|
|
||||||
|
#include <errno.h> /* Defines `error_t'. */
|
||||||
|
|
||||||
|
/* These names exist only because of MiG deficiencies.
|
||||||
|
You should not use them in C source; use the normal C types instead. */
|
||||||
|
typedef char *data_t;
|
||||||
|
typedef const char *const_data_t;
|
||||||
|
typedef char string_t [1024];
|
||||||
|
typedef int *intarray_t;
|
||||||
|
typedef const int *const_intarray_t;
|
||||||
|
typedef int *fd_mask_t;
|
||||||
|
typedef const int *const_fd_mask_t;
|
||||||
|
typedef mach_port_t *portarray_t;
|
||||||
|
typedef const mach_port_t *const_portarray_t;
|
||||||
|
typedef pid_t *pidarray_t;
|
||||||
|
typedef const pid_t *const_pidarray_t;
|
||||||
|
typedef uid_t *idarray_t;
|
||||||
|
typedef const uid_t *const_idarray_t;
|
||||||
|
#if 0
|
||||||
|
typedef __loff_t *off_array_t;
|
||||||
|
typedef const __loff_t *const_off_array_t;
|
||||||
|
#endif
|
||||||
|
typedef struct rusage rusage_t;
|
||||||
|
typedef struct flock flock_t;
|
||||||
|
typedef struct utsname utsname_t;
|
||||||
|
#if _FILE_OFFSET_BITS == 64
|
||||||
|
typedef struct stat io_statbuf_t;
|
||||||
|
typedef struct statfs fsys_statfsbuf_t;
|
||||||
|
#else
|
||||||
|
typedef struct stat64 io_statbuf_t;
|
||||||
|
typedef struct statfs64 fsys_statfsbuf_t;
|
||||||
|
#endif
|
||||||
|
typedef struct timespec timespec_t;
|
||||||
|
|
||||||
|
|
||||||
|
/* Parameters and flags in RPC calls */
|
||||||
|
|
||||||
|
/* Many such parameters and flags are also defined in various libc
|
||||||
|
headers. */
|
||||||
|
|
||||||
|
/* Bits for flags in fs.defs:file_exec_paths and exec.defs:exec_* calls: */
|
||||||
|
#define EXEC_NEWTASK 0x00000001 /* Create new task; kill old one. */
|
||||||
|
#define EXEC_SECURE 0x00000002 /* Use secure values of portarray, etc. */
|
||||||
|
#define EXEC_DEFAULTS 0x00000004 /* Use defaults for unspecified ports. */
|
||||||
|
#define EXEC_SIGTRAP 0x00000008 /* Simulate SIGTRAP on startup. */
|
||||||
|
/* This flag is passed through by the exec server but not examined by it. */
|
||||||
|
#define EXEC_STACK_ARGS 0x00000010 /* Use arguments from stack, not RPC. */
|
||||||
|
|
||||||
|
/* Bits for flags in fs.defs:file_set_translator call: */
|
||||||
|
#define FS_TRANS_FORCE 0x00000001 /* Must use translator(no sht circuit) */
|
||||||
|
#define FS_TRANS_EXCL 0x00000002 /* Don't do it if already translated. */
|
||||||
|
#define FS_TRANS_SET 0x00000004 /* Set or clear translator */
|
||||||
|
#define FS_TRANS_ORPHAN 0x00000008 /* Orphan the active translator. */
|
||||||
|
|
||||||
|
/* Values for retry field in fs.defs:dir_lookup call: */
|
||||||
|
enum retry_type
|
||||||
|
{
|
||||||
|
FS_RETRY_NORMAL = 1, /* Retry normally if retry_name is not null. */
|
||||||
|
FS_RETRY_REAUTH = 2, /* Retry after reauthenticating retry port.
|
||||||
|
Even if the retry name is null, a retry
|
||||||
|
is still necessary with this code after the
|
||||||
|
reauthentication is complete. */
|
||||||
|
FS_RETRY_MAGICAL = 3, /* Retry string is magical. */
|
||||||
|
/* "tty" means controlling tty;
|
||||||
|
|
||||||
|
"fd/%u" means file descriptor N;
|
||||||
|
|
||||||
|
"machtype/..." means replace `machtype' with the numbers in decimal
|
||||||
|
returned by the user's kernel as the cpu_type (N) and
|
||||||
|
cpu_subtype (M) (producing N/M/...) and then retry
|
||||||
|
as for FS_RETRY_NORMAL.
|
||||||
|
|
||||||
|
"/..." means retry "...", but starting from the users root directory.
|
||||||
|
|
||||||
|
"pid/..." means replace `pid' with the PID of the current process in %u
|
||||||
|
format and then retry as for FS_RETRY_NORMAL.
|
||||||
|
*/
|
||||||
|
};
|
||||||
|
typedef enum retry_type retry_type;
|
||||||
|
|
||||||
|
/* Types for fs_notify.defs:dir_changed call: */
|
||||||
|
enum dir_changed_type
|
||||||
|
{
|
||||||
|
DIR_CHANGED_NULL, /* Always sent first for sync. */
|
||||||
|
DIR_CHANGED_NEW, /* Specified name has been added. */
|
||||||
|
DIR_CHANGED_UNLINK, /* Specified name has been removed. */
|
||||||
|
DIR_CHANGED_RENUMBER, /* Name has been the target of rename. */
|
||||||
|
};
|
||||||
|
typedef enum dir_changed_type dir_changed_type_t;
|
||||||
|
|
||||||
|
/* Types for fs_notify.defs:file_changed call: */
|
||||||
|
enum file_changed_type
|
||||||
|
{
|
||||||
|
FILE_CHANGED_NULL, /* Always sent first for sync. */
|
||||||
|
FILE_CHANGED_WRITE, /* File data has been written. */
|
||||||
|
FILE_CHANGED_EXTEND, /* File has grown. */
|
||||||
|
FILE_CHANGED_TRUNCATE, /* File has been truncated. */
|
||||||
|
FILE_CHANGED_META, /* Stat information has changed, and none
|
||||||
|
of the previous three apply. Not sent
|
||||||
|
for changes in node times. */
|
||||||
|
};
|
||||||
|
typedef enum file_changed_type file_changed_type_t;
|
||||||
|
|
||||||
|
/* Select types for io.defs:io_select call: */
|
||||||
|
#define SELECT_READ 0x00000001
|
||||||
|
#define SELECT_WRITE 0x00000002
|
||||||
|
#define SELECT_URG 0x00000004
|
||||||
|
|
||||||
|
/* Flags for fsys.defs:fsys_goaway. Also, these flags are sent as the
|
||||||
|
oldtrans_flags in fs.defs:file_set_translator to describe how to
|
||||||
|
terminate the old translator. */
|
||||||
|
#define FSYS_GOAWAY_NOWAIT 0x00000001 /* Return immediately. */
|
||||||
|
#define FSYS_GOAWAY_NOSYNC 0x00000002 /* Don't update physical media. */
|
||||||
|
#define FSYS_GOAWAY_FORCE 0x00000004 /* Go away despite current users. */
|
||||||
|
#define FSYS_GOAWAY_UNLINK 0x00000008 /* Go away only if non-directory. */
|
||||||
|
#define FSYS_GOAWAY_RECURSE 0x00000010 /* Shutdown children too. */
|
||||||
|
|
||||||
|
/* Types of ports the terminal driver can run on top of;
|
||||||
|
used in term.defs:term_get_bottom_type. */
|
||||||
|
enum term_bottom_type
|
||||||
|
{
|
||||||
|
TERM_ON_MACHDEV,
|
||||||
|
TERM_ON_HURDIO,
|
||||||
|
TERM_ON_MASTERPTY,
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Types of storage, as returned by file_get_storage_info.
|
||||||
|
|
||||||
|
STORAGE_DEVICE is a mach device_t (for random access devices)
|
||||||
|
STORAGE_HURD_FILE is a hurd file_t (as if a file were mapped)
|
||||||
|
STORAGE_TASK is a task_t (the storage is in the vm of the task)
|
||||||
|
STORAGE_MEMORY is a memory object port
|
||||||
|
STORAGE_ZERO is a fixed-size constant source of zeros
|
||||||
|
STORAGE_INTERLEAVE is a set of other storage types interleaved at a fixed
|
||||||
|
interval
|
||||||
|
STORAGE_CONCAT is a set of other storage types concatenated end-to-end
|
||||||
|
STORAGE_LAYER is a set of storage types, representing the same address
|
||||||
|
range; all will be written too, and will be read in turn until one
|
||||||
|
succeeds
|
||||||
|
STORAGE_REMAP is a layer on top of another store that remaps its blocks
|
||||||
|
STORAGE_COPY is a memory snapshot of another store
|
||||||
|
STORAGE_NETWORK means that the file is stored elsewhere on the
|
||||||
|
network; all the remaining fields contan type-specific information.
|
||||||
|
STORAGE_OTHER means none of these apply; and should be used when no
|
||||||
|
meaningful answer can be given
|
||||||
|
|
||||||
|
The vectors returned by file_get_storage_info encode each of the above
|
||||||
|
(note that the first int is always the storage type). There are four:
|
||||||
|
ports, ints, offsets (off_t), and data (char); each type of store uses the
|
||||||
|
following entries in each vector:
|
||||||
|
|
||||||
|
-type- -ports- -ints- -offsets- -data- -kids-
|
||||||
|
device DEVICE TY, FL, BS, NR, NL, ML NR * (OFFS, LEN) NL + ML -
|
||||||
|
file FILE TY, FL, BS, NR, NL, ML NR * (OFFS, LEN) NL + ML -
|
||||||
|
memory MEMOBJ TY, FL, BS, NR, NL, ML NR * (OFFS, LEN) NL + ML -
|
||||||
|
task TASK TY, FL, BS, NR, NL, ML NR * (OFFS, LEN) NL + ML -
|
||||||
|
(the data for the above is a name (incl '\0') and a misc data block)
|
||||||
|
null - TY, FL SIZE - -
|
||||||
|
(BS is 1)
|
||||||
|
ileave - TY, FL, IL, NC - - NC
|
||||||
|
(BS is the LCM of its children; SIZE is the minimum of theirs * IL)
|
||||||
|
concat - TY, FL, NC - - NC
|
||||||
|
(BS is the LCM of its children; SIZE is the sum of theirs)
|
||||||
|
layer - TY, FL, NC - - NC
|
||||||
|
(BS is the LCM of its children; SIZE is the minimum of theirs)
|
||||||
|
remap - TY, FL, NR NR * (OFFS, LEN) - 1
|
||||||
|
(BS and SIZE are that of the child)
|
||||||
|
copy - TY, FL, SIZE - DATA -
|
||||||
|
(DATA is preceded by padding to the next page boundary, and is
|
||||||
|
SIZE bytes long itself)
|
||||||
|
|
||||||
|
For ileave, concat, and layer, the children are encoded following the parent.
|
||||||
|
The first int must always be TY.
|
||||||
|
|
||||||
|
key: TY = type code, FL = flags, BS = block size, NR = num runs,
|
||||||
|
NL = name len, ML = misc len, NC = num children,
|
||||||
|
IL = interleave (bytes), SIZE = Size of storage (blocks),
|
||||||
|
LEN = run length (blocks), OFFS = run offset (blocks),
|
||||||
|
|
||||||
|
The NR * (OFFS, LEN) offsets for some of the types is the set of block
|
||||||
|
ranges in the underlying address space that, concatenated, make up the
|
||||||
|
contents of the storage -- for instance, doing file_get_storage_info on a
|
||||||
|
file may return storage of type STORAGE_DEVICE, and the accompanying block
|
||||||
|
ranges are the set of blocks on the given device that correspond to that
|
||||||
|
file. Any OFFS == -1 designates a hole in the address range. Note that
|
||||||
|
the total size (SIZE) for these types is the sum of their LEN's.
|
||||||
|
|
||||||
|
The optional NAME returned by some types (if NL != 0) is a type specific
|
||||||
|
name for the same object referenced by the port also returned. E.g.:
|
||||||
|
device -- The mach device name
|
||||||
|
file -- The file name (unreliable, as the root may not be the same)
|
||||||
|
task -- The pid
|
||||||
|
Unless it is MACH_PORT_NULL, the port should generally be used instead of
|
||||||
|
trying to regenerate it from the associated name, which is intended more for
|
||||||
|
printing messages, etc. */
|
||||||
|
enum file_storage_class
|
||||||
|
{
|
||||||
|
STORAGE_OTHER,
|
||||||
|
STORAGE_DEVICE,
|
||||||
|
STORAGE_HURD_FILE,
|
||||||
|
STORAGE_NETWORK,
|
||||||
|
STORAGE_MEMORY,
|
||||||
|
STORAGE_TASK,
|
||||||
|
STORAGE_ZERO,
|
||||||
|
STORAGE_CONCAT,
|
||||||
|
STORAGE_INTERLEAVE,
|
||||||
|
STORAGE_LAYER,
|
||||||
|
STORAGE_REMAP,
|
||||||
|
STORAGE_COPY,
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Flags for the flags word returned by some types . */
|
||||||
|
#define STORAGE_MUTATED 0x00000001 /* data as stored is munged from file */
|
||||||
|
|
||||||
|
/* Data types */
|
||||||
|
|
||||||
|
#include <mach/task_info.h>
|
||||||
|
#include <mach/thread_info.h>
|
||||||
|
#ifndef THREAD_SCHED_INFO
|
||||||
|
#include <mach/policy.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Flags sent in proc_getprocinfo request. */
|
||||||
|
#define PI_FETCH_TASKINFO 0x0001
|
||||||
|
#define PI_FETCH_TASKEVENTS 0x0020
|
||||||
|
#define PI_FETCH_THREADS 0x0002
|
||||||
|
#define PI_FETCH_THREAD_BASIC 0x0004
|
||||||
|
#define PI_FETCH_THREAD_SCHED 0x0008
|
||||||
|
#define PI_FETCH_THREAD_WAITS 0x0010
|
||||||
|
|
||||||
|
struct procinfo
|
||||||
|
{
|
||||||
|
int state;
|
||||||
|
uid_t owner;
|
||||||
|
pid_t ppid;
|
||||||
|
pid_t pgrp;
|
||||||
|
pid_t session;
|
||||||
|
pid_t logincollection;
|
||||||
|
int exitstatus;
|
||||||
|
int sigcode;
|
||||||
|
|
||||||
|
int nthreads; /* size of pi_threadinfos */
|
||||||
|
|
||||||
|
struct task_basic_info taskinfo;
|
||||||
|
struct task_events_info taskevents;
|
||||||
|
#ifdef TASK_SCHED_TIMESHARE_INFO
|
||||||
|
struct policy_timeshare_base timeshare_base_info;
|
||||||
|
#endif
|
||||||
|
struct
|
||||||
|
{
|
||||||
|
int died; /* this thread died in the middle of call */
|
||||||
|
mach_msg_id_t rpc_block; /* thread is blocked on this RPC */
|
||||||
|
struct thread_basic_info pis_bi;
|
||||||
|
#ifdef THREAD_SCHED_INFO
|
||||||
|
struct thread_sched_info pis_si;
|
||||||
|
#else
|
||||||
|
struct policy_infos pis_pi;
|
||||||
|
#endif
|
||||||
|
} threadinfos[0];
|
||||||
|
};
|
||||||
|
typedef int *procinfo_t;
|
||||||
|
typedef const int *const_procinfo_t;
|
||||||
|
|
||||||
|
/* Bits in struct procinfo state: */
|
||||||
|
#define PI_STOPPED 0x00000001 /* Proc server thinks is stopped. */
|
||||||
|
#define PI_EXECED 0x00000002 /* Has called proc_exec. */
|
||||||
|
#define PI_WAITING 0x00000004 /* Process is waiting for child to exit */
|
||||||
|
#define PI_ORPHAN 0x00000008 /* Process group is orphaned. */
|
||||||
|
#define PI_NOMSG 0x00000010 /* Process has no message port. */
|
||||||
|
#define PI_SESSLD 0x00000020 /* Session leader. */
|
||||||
|
#define PI_NOTOWNED 0x0000040 /* Process has no owner. */
|
||||||
|
#define PI_NOPARENT 0x0000080 /* Hasn't identified a parent. */
|
||||||
|
#define PI_ZOMBIE 0x00000100 /* Has no associated task. */
|
||||||
|
#define PI_TRACED 0x00000200 /* Process is being traced */
|
||||||
|
#define PI_GETMSG 0x00000400 /* Process is blocked in proc_getmsgport. */
|
||||||
|
#define PI_LOGINLD 0x00000800 /* Process is leader of login collection */
|
||||||
|
|
||||||
|
|
||||||
|
/* Conventions */
|
||||||
|
|
||||||
|
|
||||||
|
/* st_fstype in struct stat and fsys_stb_type in fsys_statfsbuf is one of: */
|
||||||
|
#define FSTYPE_UFS 0x00000000 /* 4.x BSD Fast File System */
|
||||||
|
#define FSTYPE_NFS 0x00000001 /* Network File System ala Sun */
|
||||||
|
#define FSTYPE_GFS 0x00000002 /* GNU file system */
|
||||||
|
#define FSTYPE_LFS 0x00000003 /* Logging File System ala Sprite */
|
||||||
|
#define FSTYPE_SYSV 0x00000004 /* Old U*x filesystem ala System V */
|
||||||
|
#define FSTYPE_FTP 0x00000005 /* Transparent FTP */
|
||||||
|
#define FSTYPE_TAR 0x00000006 /* Transparent TAR */
|
||||||
|
#define FSTYPE_AR 0x00000007 /* Transparent AR */
|
||||||
|
#define FSTYPE_CPIO 0x00000008 /* Transparent CPIO */
|
||||||
|
#define FSTYPE_MSLOSS 0x00000009 /* MS-DOS */
|
||||||
|
#define FSTYPE_CPM 0x0000000a /* CP/M */
|
||||||
|
#define FSTYPE_HFS 0x0000000b /* Don't ask */
|
||||||
|
#define FSTYPE_DTFS 0x0000000c /* used by desktop to provide more info */
|
||||||
|
#define FSTYPE_GRFS 0x0000000d /* GNU Remote File System */
|
||||||
|
#define FSTYPE_TERM 0x0000000e /* GNU Terminal driver */
|
||||||
|
#define FSTYPE_DEV 0x0000000f /* GNU Special file server */
|
||||||
|
#define FSTYPE_PROC 0x00000010 /* /proc filesystem ala Version 9 */
|
||||||
|
#define FSTYPE_IFSOCK 0x00000011 /* PF_LOCAL socket naming point */
|
||||||
|
#define FSTYPE_AFS 0x00000012 /* Andrew File System 3.xx */
|
||||||
|
#define FSTYPE_DFS 0x00000013 /* Distributed File Sys (OSF) == AFS 4.xx */
|
||||||
|
#define FSTYPE_PROC9 0x00000014 /* /proc filesystem ala Plan 9 */
|
||||||
|
#define FSTYPE_SOCKET 0x00000015 /* io_t that isn't a file but a socket */
|
||||||
|
#define FSTYPE_MISC 0x00000016 /* generic trivfs server */
|
||||||
|
#define FSTYPE_EXT2FS 0x00000017 /* Linux filesystem by Remy Card */
|
||||||
|
#define FSTYPE_HTTP 0x00000018 /* Transparent HTTP */
|
||||||
|
#define FSTYPE_MEMFS 0x00000019 /* In-core filesystem */
|
||||||
|
#define FSTYPE_ISO9660 0x0000001a /* ISO9660 */
|
||||||
|
|
||||||
|
/* Standard port assignments for file_exec_paths and exec_* */
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
INIT_PORT_CWDIR,
|
||||||
|
INIT_PORT_CRDIR,
|
||||||
|
INIT_PORT_AUTH,
|
||||||
|
INIT_PORT_PROC,
|
||||||
|
INIT_PORT_CTTYID,
|
||||||
|
/* If MACH_PORT_NULL is given for the bootstrap port,
|
||||||
|
the bootstrap port of the old task is used. */
|
||||||
|
INIT_PORT_BOOTSTRAP,
|
||||||
|
INIT_PORT_MAX
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Standard ints for file_exec_paths and exec_* */
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
INIT_UMASK,
|
||||||
|
INIT_SIGMASK,
|
||||||
|
INIT_SIGIGN,
|
||||||
|
INIT_SIGPENDING,
|
||||||
|
INIT_TRACEMASK,
|
||||||
|
INIT_INT_MAX,
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // _HURD_TYPES_H
|
|
@ -0,0 +1,84 @@
|
||||||
|
/*
|
||||||
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
|
* Copyright © 2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
|
*
|
||||||
|
* This file is part of GNU Mes.
|
||||||
|
*
|
||||||
|
* GNU 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.
|
||||||
|
*
|
||||||
|
* GNU 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 GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __MES_GNU_HURD_H
|
||||||
|
#define __MES_GNU_HURD_H
|
||||||
|
|
||||||
|
#define _GNU_SOURCE 1
|
||||||
|
#define __USE_GNU 1
|
||||||
|
|
||||||
|
#include <errno.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
|
||||||
|
#ifndef _BITS_TYPES_H
|
||||||
|
#ifndef _LOFF_T
|
||||||
|
#define _LOFF_T
|
||||||
|
typedef off64_t loff_t;
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <mach/mach_types.h>
|
||||||
|
#include <mach/message.h>
|
||||||
|
#include <mach/port.h>
|
||||||
|
|
||||||
|
struct hurd_startup_data
|
||||||
|
{
|
||||||
|
int flags;
|
||||||
|
|
||||||
|
mach_port_t *dtable;
|
||||||
|
mach_msg_type_number_t dtable_count;
|
||||||
|
|
||||||
|
char *argp;
|
||||||
|
int arg_size;
|
||||||
|
|
||||||
|
char *envp;
|
||||||
|
int env_size;
|
||||||
|
|
||||||
|
mach_port_t *portarray;
|
||||||
|
mach_msg_type_number_t portarray_count;
|
||||||
|
|
||||||
|
int *intarray;
|
||||||
|
mach_msg_type_number_t intarray_count;
|
||||||
|
|
||||||
|
vm_address_t stack_base;
|
||||||
|
vm_size_t stack_count;
|
||||||
|
|
||||||
|
vm_address_t phdr;
|
||||||
|
vm_size_t phdr_count;
|
||||||
|
|
||||||
|
vm_address_t user_entry;
|
||||||
|
};
|
||||||
|
|
||||||
|
#define _HURD_DTABLE_MAX 1024
|
||||||
|
extern mach_port_t _hurd_dtable[_HURD_DTABLE_MAX];
|
||||||
|
extern int _hurd_dtable_count;
|
||||||
|
extern struct hurd_startup_data _hurd_startup_data;
|
||||||
|
|
||||||
|
#define _HURD_ARGV_MAX 1000
|
||||||
|
#define _HURD_ENVV_MAX 1000
|
||||||
|
extern size_t __argc;
|
||||||
|
extern char *__argv[_HURD_ARGV_MAX];
|
||||||
|
extern char *__envv[_HURD_ENVV_MAX];
|
||||||
|
|
||||||
|
mach_port_t fd_get (int filedes);
|
||||||
|
error_t fd_write (mach_port_t port, void const *buffer, size_t *size, loff_t offset);
|
||||||
|
error_t fd_read (mach_port_t port, void *buffer, size_t *size, loff_t offset);
|
||||||
|
|
||||||
|
#endif // __MES_GNU_HURD_H
|
|
@ -0,0 +1,144 @@
|
||||||
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
|
* Copyright © 2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
|
*
|
||||||
|
* This file is part of GNU Mes.
|
||||||
|
*
|
||||||
|
* GNU 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.
|
||||||
|
*
|
||||||
|
* GNU 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 GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __MES_GNU_SYSCALL_H
|
||||||
|
#define __MES_GNU_SYSCALL_H
|
||||||
|
|
||||||
|
#define _GNU_SOURCE 1
|
||||||
|
#define __USE_GNU 1
|
||||||
|
|
||||||
|
#include <mach/mach_types.h>
|
||||||
|
#include <mach/port.h>
|
||||||
|
#include <mach/message.h>
|
||||||
|
#include <gnu/hurd.h>
|
||||||
|
#include <gnu/hurd-types.h>
|
||||||
|
|
||||||
|
// mach/mach.defs
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
SYS__task_terminate = 2008,
|
||||||
|
SYS__vm_allocate = 2021,
|
||||||
|
SYS__vm_statistics = 2030,
|
||||||
|
SYS__task_get_special_port = 2058,
|
||||||
|
};
|
||||||
|
|
||||||
|
// hurd/fsys.defs
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
SYS__dir_lookup = 20018,
|
||||||
|
};
|
||||||
|
|
||||||
|
// hurd/io.defs
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
SYS__io_write = 21000,
|
||||||
|
SYS__io_read,
|
||||||
|
};
|
||||||
|
|
||||||
|
// hurd/process.defs
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
SYS__proc_mark_exit = 24025,
|
||||||
|
};
|
||||||
|
|
||||||
|
// hurd/startup.defs
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
SYS__exec_startup_get_info = 30500,
|
||||||
|
};
|
||||||
|
|
||||||
|
extern mach_msg_type_t mach_msg_type_int32;
|
||||||
|
extern mach_msg_type_t mach_msg_type_int64;
|
||||||
|
extern mach_msg_type_long_t mach_msg_type_pointer;
|
||||||
|
|
||||||
|
struct mach_msg
|
||||||
|
{
|
||||||
|
mach_msg_header_t header;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct mach_msg_1
|
||||||
|
{
|
||||||
|
mach_msg_header_t header;
|
||||||
|
mach_msg_type_t type_one; int one;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct mach_msg_2
|
||||||
|
{
|
||||||
|
mach_msg_header_t header;
|
||||||
|
mach_msg_type_t type_one; int one;
|
||||||
|
mach_msg_type_t type_two; int two;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct mach_msg_loff_int
|
||||||
|
{
|
||||||
|
mach_msg_header_t header;
|
||||||
|
mach_msg_type_t type_one; loff_t one;
|
||||||
|
mach_msg_type_t type_two; int two;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct mach_msg_startup_info
|
||||||
|
{
|
||||||
|
mach_msg_header_t header;
|
||||||
|
mach_msg_type_t RetCodeType;
|
||||||
|
kern_return_t RetCode;
|
||||||
|
mach_msg_type_t user_entryType;
|
||||||
|
vm_address_t user_entry;
|
||||||
|
mach_msg_type_t phdrType;
|
||||||
|
vm_address_t phdr;
|
||||||
|
mach_msg_type_t phdr_sizeType;
|
||||||
|
vm_size_t phdr_size;
|
||||||
|
mach_msg_type_t stack_baseType;
|
||||||
|
vm_address_t stack_base;
|
||||||
|
mach_msg_type_t stack_sizeType;
|
||||||
|
vm_size_t stack_size;
|
||||||
|
mach_msg_type_t flagsType;
|
||||||
|
int flags;
|
||||||
|
mach_msg_type_long_t argvType;
|
||||||
|
char *argv;
|
||||||
|
mach_msg_type_long_t envpType;
|
||||||
|
char *envp;
|
||||||
|
mach_msg_type_long_t dtableType;
|
||||||
|
mach_port_t *dtable;
|
||||||
|
mach_msg_type_long_t portarrayType;
|
||||||
|
mach_port_t *portarray;
|
||||||
|
mach_msg_type_long_t intarrayType;
|
||||||
|
int *intarray;
|
||||||
|
};
|
||||||
|
|
||||||
|
kern_return_t __syscall (mach_port_t port, int sys_call);
|
||||||
|
kern_return_t __syscall2 (mach_port_t port, int sys_call, int one, int two);
|
||||||
|
kern_return_t __syscall_get (mach_port_t port, int sys_call, mach_msg_header_t *message, size_t size);
|
||||||
|
kern_return_t __syscall_put (mach_port_t port, int sys_call, mach_msg_header_t *message, size_t size);
|
||||||
|
|
||||||
|
// mach.defs
|
||||||
|
kern_return_t __task_terminate (mach_port_t task);
|
||||||
|
kern_return_t __task_get_special_port (mach_port_t task, int which, mach_port_t *port);
|
||||||
|
kern_return_t __vm_allocate (mach_port_t task, vm_address_t *address, vm_size_t size, boolean_t anywhere);
|
||||||
|
kern_return_t __vm_statistics (mach_port_t task, vm_statistics_data_t *vm_stats);
|
||||||
|
|
||||||
|
// process.defs
|
||||||
|
kern_return_t __proc_mark_exit (mach_port_t process, int one, int two);
|
||||||
|
kern_return_t __exec_startup_get_data (mach_port_t bootstrap, struct hurd_startup_data *data);
|
||||||
|
|
||||||
|
// io.c
|
||||||
|
kern_return_t __io_write (io_t io_object, data_t data, mach_msg_type_number_t size, loff_t offset, vm_size_t *wrote);
|
||||||
|
kern_return_t __io_read (io_t io, data_t *data, mach_msg_type_number_t *read, loff_t offset, vm_size_t size);
|
||||||
|
|
||||||
|
#endif // __MES_GNU_SYSCALL_H
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue