Commit graph

79 commits

Author SHA1 Message Date
Jan Nieuwenhuizen 2cc6d5a012
build: Use mesar instead of ar.
* scripts/mesar.in: Rename from ar.in.  Update users.
* build-aux/build.sh.in (LIBS): Update.
* build-aux/check.sh.in (recheck): Likwise.
* build-aux/install.sh.in (DESTDIR): Likwise.
* configure (main): Likwise.
* configure.sh (mes_system): Likwise.
* .gitignore: Update.
2019-09-09 16:04:16 +02:00
Jan Nieuwenhuizen 9628f38be3
build: Uniquify config macros.
* configure (main): Rename VERSION to MES_VERSION, pkgdatadir to
MES_PKGDATADIR.  Update users.
* configure.sh (mes_system): Likewise.
* src/mes.c (mes_symbols): Update.
(open_boot): Update.
* scaffold/cons-mes.c (main): Update.
* simple.sh: Update.
2019-07-26 18:20:32 +02:00
Jan Nieuwenhuizen 2e98d03699
build: Resurrect --with-cheating.
* build-aux/config.sh.in (SCHEME): New substitute.
* build-aux/config.make.in: Likewise.
* configure: Substitute them.
2019-07-20 18:56:58 +02:00
Jan Nieuwenhuizen 1ba8bf539a
build: Use bash if available to avoid dash problems.
* configure: Set SHELL to bash.
* configure.sh: Likewise.
* build-aux/test-suite.sh (TEST_LOGS):
* build-aux/export.make: Export SHELL.
* build-aux/config.sh.in (SHELL): New substitute, export.
* build-aux/config.make.in (SHELL): New substitute.
* build-aux/GNUmakefile.in (build, check, install, uninstall): Use
$SHELL to avoid dash problems.
* build-aux/check-mescc.sh: Likewise.
* build-aux/build.sh.in: Likewise.
* build-aux/check-mes.sh: Likewise.
* build-aux/check.sh.in: Likewise.
2019-06-25 21:40:43 +02:00
Jan Nieuwenhuizen 78b3c85f15
build: Cater for ARM.
* configure: Cater for ARM.
* configure.sh: Likewise
* build-aux/GNUmakefile.in: Likewise.
* build-aux/bootstrap.sh.in: Likewise.
* module/mescc.scm (parse-opts): Likewise.
* src/mes.c (mes_environment): Likewise.
* build-aux/build.sh.in: Likewise.
* build-aux/config.sh Likewise.
* build-aux/install.sh.in: Likewise.
* module/mes/guile.scm: Likewise.
* scripts/mescc.scm.in: Likewise.
* module/mescc/mescc.scm (arch-get): New function.
(arch-get-info): New function.
(arch-get-define): New function.
(arch-get-m1-options): New function.
(arch-get-Architecture): New function.
(mescc:preprocess c->info, E->info, M1->hex2, hex2->elf,
M1->blood-elf, arch-find): Use them.
2019-05-22 17:55:20 +02:00
Jan Nieuwenhuizen 5dc245e739
build: Simplify.
core: Make mes src/ c files separate compilation units.

* include/mes/constants.h: New file.
* include/mes/macros.h: New file.
* include/mes/mes.h: New file.
* src/gc.c: Update.
* src/hash.c: Update.
* src/lib.c: Update.
* src/math.c: Update.
* src/mes.c: Update.
* src/module.c: Update.
* src/posix.c: Update.
* src/reader.c: Update.
* src/string.c: Update.
* src/struct.c: Update.
* src/vector.c: Update.

    mes: Update datadir.

* src/mes.c (g_datadir): New global.
(open_boot): Rename from read_boot.
(read_boot): New function.
* mes/module/mes/boot-0.scm: Move from boot-0.scm.in
* configure: Update.
* configure.sh: Update.

    mescc: Create libraries from separate files.

* .gitignore: Update.
* build-aux/bootstrap-mes.sh: Remove.
* build-aux/bootstrap.sh.in: Remove.
* build-aux/build-guile.sh: Update.
* build-aux/build-mes.sh: Update.
* build-aux/build-scaffold.sh: New file.
* build-aux/build.sh.in: Update.
* build-aux/cc.sh: Update.
* build-aux/check-tcc.sh: Remove.
* build-aux/config.sh.in: New file.
* build-aux/config.sh: Remove.
* build-aux/install.sh.in: Update.
* build-aux/test-boot.sh: New file.
* build-aux/test-c.sh: New file.
* build-aux/test-driver: New file.
* build-aux/test-suite.sh: New file.
* build-aux/trace.sh: Update.
* build-aux/uninstall.sh.in: Update.
* configure: Update.
* configure.sh: Update.
* lib/linux/x86-mes-mescc/crt1.c: Move from lib/linux/x86-mes.
* lib/linux/x86-mes-mescc/mini.c: Likewise.
* lib/linux/x86_64-mes-mescc/crt1.c: Move from lib/linux/x86_64-mes.
* lib/linux/x86_64-mes-mescc/mini.c: Likewise.
* lib/linux/x86-mes-gcc/syscall.c: Rename from mes.c.
* lib/linux/x86-mes-mescc/syscall.c: Likewise.
* lib/linux/x86_64-mes-gcc/syscall.c: Likewise.
* lib/linux/x86_64-mes-mescc/syscall.c: Likewise.
* lib/mes/mes_open.c: Include config.h.
* lib/tests/stdio/70-printf-hello.c: Likewise.
* lib/tests/stdio/70-printf-simple.c: Likewise.
* scaffold/gc-test.sh: New file.
* simple.sh: Update.
2019-06-08 15:36:22 +02:00
Jan Nieuwenhuizen 35a69e77d1
build: Fix --disable-silent-rules. Thanks ng0!
* configure (main): Substitute V as string value.
* build-aux/trace.sh: Typo.  Fixes using V=0.
* build-aux/config.status.in (V): New substitute.
* build-aux/config.make.in (V): New substiute.
2019-05-29 16:55:57 +02:00
Jan (janneke) Nieuwenhuizen 9f4a4e47b2
build: Debian make check and install fixes.
* configure (main): Oops, typo: mandir uses --infodir.
* build-aux/check.sh.in: Run check-mescc.sh with bash.
* build-aux/config.sh (CFLAGS, CPPFLAGS, HEX2FLAGS, LDFLAGS, M1FLAGS):
unset.
* build-aux/install.sh.in: Use BASHOPTS to check for bash; on Debian
dash is used and has $SHELL=/bin/bash.  Use ${DESTDIR}@...
2019-05-15 15:18:38 +02:00
Jan Nieuwenhuizen 48a0bf181d
build: Replace POSIX, posix_p by WITH_GLIBC, wip_glibc_p.
* build-aux/build-mes.sh: Replace POSIX, posix_p by WITH_GLIBC, wip_glibc_p.
* build-aux/build.sh.in: Likewise.
* build-aux/cc.sh (link): Likewise.
* build-aux/config.make.in (with_glibc_p): Likewise.
* build-aux/config.sh (libc): Likewise.
(CPPFLAGS): Likewise.
* build-aux/config.status.in (with_glibc_p): Likewise.
* build-aux/test.sh: Likewise.
* configure (main): Likewise.
* configure.sh (subst): Likewise.
(mes_arch): Likewise.
* include/libmes.h: Likewise.
* include/linux/x86_64/syscall.h: Likewise.
* lib/libmes.c: Likewise.
* lib/tests/stdio/70-printf-hello.c (main): Likewise.
* lib/tests/stdio/70-printf-simple.c (main): Likewise.
* lib/tests/stdio/80-sscanf.c (main): Likewise.
* lib/tests/stdlib/50-malloc.c: Likewise.
* module/mescc/preprocess.scm (c99-input->full-ast): Likewise.
* scaffold/cons-mes.c: Likewise.
* scaffold/lib/stdlib/malloc.c: Likewise.
* scaffold/micro-mes.c: Likewise.
* scaffold/tests/61-array.c (getenv): Likewise.
* scaffold/tiny-mes.c: Likewise.
* src/mes.c: Likewise.
2019-03-23 21:44:00 +01:00
Jan Nieuwenhuizen d7159d607a
build: Configure: remove temp files.
* configure (gulp-pipe*): Remove .error.
(check-header-c): Remove .config.c.
(check-compile-c): Likewise.
(check-link-c): Likewise.
2019-02-18 07:22:50 +01:00
Jan Nieuwenhuizen b2056c105d
Release 0.19.
* configure (VERSION): Update to 0.19.
(main): Likewise.
* configure.sh (VERSION): Likewise.
* guix/git/mes.scm (mes, mes.git): Likewise.
2018-12-16 14:51:18 +01:00
Jan Nieuwenhuizen 8f8852ccff
build: Support building with Gash.
* build-aux/install.sh: Replace variables with substitution.
* build-aux/bootstrap.sh: New file.
* configure: Substitute it.
* configure.sh: Likewise.  Be friendly to Gash.
* .gitignore: Ignore it.
2018-11-24 21:07:31 +01:00
Jan Nieuwenhuizen 6b841a0cab
mescc: Run without shell.
* mes/module/mescc.mes: New file.
* module/mescc.scm: Include it.
* scripts/mescc.scm.in: New file.
* scripts/mescc.in: Use it; Make pure shell.
* configure: Substitute it.
* configure.sh: Substitute it.
* build-aux/install.sh.in: Install it.
2018-11-25 13:21:03 +01:00
Jan Nieuwenhuizen 17aeba8dc7
build: configure: Support Mes.
* configure: Support Mes.
2018-11-11 10:38:02 +01:00
Jan Nieuwenhuizen 6b5ac57602
build: Simplify: cater for one compiler at a time.
* build-aux/build-cc.sh: Remove.
* build-aux/build-cc32.sh: Remove.
* build-aux/build-cc64.sh: Remove.
* build-aux/build-x86_64-mes.sh: Remove.
* build-aux/cc-mes.sh: Remove.
* build-aux/cc-x86_64-mes.sh: Remove.
* build-aux/cc32-mes.sh: Remove.
* build-aux/cc64-mes.sh: Remove.
* build-aux/test64.sh: Remove.
* build-aux/bootstrap-mes.sh: New file.
* build-aux/config.make.in: New file.
* build-aux/config.status.in: New file.
* build-aux/test-cc.sh: New file.
* .gitignore: Update.
* build-aux/GNUmakefile.in: Update.
* build-aux/build-guile.sh: Update.
* build-aux/build-mes.sh: Update.
* build-aux/build.sh.in: Update.
* build-aux/cc.sh: Update.
* build-aux/check-boot.sh: Update.
* build-aux/check-mes.sh: Update.
* build-aux/check-mescc.sh: Update.
* build-aux/check-tcc.sh: Update.
* build-aux/check.sh.in: Update.
* build-aux/config.sh: Update.
* build-aux/export.make: Update.
* build-aux/install.sh.in: Update.
* build-aux/pre-inst-env.in: Update.
* build-aux/test.sh: Update.
* build-aux/uninstall.sh.in: Update.
* configure: Update.
* configure.sh: Update.
* module/mescc/i386/as.scm: Update.
* module/mescc/preprocess.scm: Update.
* module/mescc/x86_64/as.scm: Update.
* scripts/mescc.in: Update.
* tests/psyntax.test: Update.
2018-11-06 20:29:35 +01:00
Jan Nieuwenhuizen 3c9274ce2d
build: configure: Make dot optional.
* configure: Make dot optional.
2018-11-18 14:30:47 +01:00
Jan Nieuwenhuizen 33f37f2747
build: x86_64 bootstrap build fixes and workaround.
* configure: Substitute @arch@ (WAS: ARCH).  Update users.
* configure.sh: Substitute @arch@.
* build-aux/build-mes.sh: Use $GUILE for x86_64 build.
* build-aux/install.sh.in: Install mes.S, mes.x86_64-mes-S too.
Prune *.E, *.out.
2018-10-10 22:16:44 +02:00
Jan Nieuwenhuizen 761cdc65ed
Release 0.18.
* configure (VERSION): Update to 0.18.
(main): Likewise.
* configure.sh (VERSION): Likewise.
* guix/git/mes.scm (mes, mes.git): Likewise.
* guix/mescc-tools-boot.patch: New file.
2018-10-04 23:15:25 +02:00
Jan Nieuwenhuizen bb6d786736
doc: Release update.
* BOOTSTRAP: Update.
* HACKING: Update.
* NEWS: Update.
* README: Update.
* doc/mes.texi (Submitting Patches): Fix misquoting, misattribution.
2018-09-05 07:05:08 +02:00
Jan Nieuwenhuizen 5fb94529b9
Release 0.17.1.
* configure (VERSION): Update to 0.17.1.
(main): Likewise.
* configure.sh (VERSION): Likewise.
* build-aux/GNUmakefile.in (gen-announce): Likewise.
* guix/git/mes.scm (mes, mes.git): Likewise.
2018-09-03 19:57:22 +02:00
Jan Nieuwenhuizen 46e0641e9c
mescc: Mes C Library: Add x86_64 libc-mini support.
* lib/linux/x86-mes-gcc/mini.c: Rename from lib/linux/mini-gcc.c.
* lib/linux/x86-mes/mini.c: Rename from lib/linux/mini-mes.c.
* lib/linux/x86_64-mes-gcc/crt1.c: Rename from lib/linux/x86_64/crt1.c.
* lib/linux/x86_64-mes-gcc/mini.c: New file.
* build-aux/build-cc.sh: Build libc-mini, scaffold/main, scaffold/hello.
* build-aux/cc64.sh: New file.
2018-08-10 17:05:01 +02:00
Jan Nieuwenhuizen d3d1cb6a37
Release 0.17.
* configure (VERSION): Update to 0.17.
2018-07-22 14:10:35 +02:00
Jan Nieuwenhuizen ce3d25395e
build: Non-bootstrap install fixes.
* configure (main): Fix default bindir.
* build-aux/GNUmakefile.in (PHONY_TARGETS): Remove src/mes.  Fixes
  re-build upon install.
* build-aux/install.sh.in: Fix tar arguments for scaffold files.
  Expand install directories.
2018-08-09 11:00:10 +02:00
Jan Nieuwenhuizen fa3cd8b9a5
build: configure: Oops, substitute @prefix@.
* build-aux/pre-inst-env.in (MES_PREFIX): Respect pre-set value.
* configure (main): Oops, substitute @prefix@.
* configure.sh (subst): Likewise.
2018-08-09 08:58:20 +02:00
Jan Nieuwenhuizen 4db4cb9090
build: Remove tinycc/test2 import.
* scaffold/tinycc/: Remove.
* build-aux/check-mescc.sh: Remove tinycc testing.
* build-aux/check-tcc.sh: New file.
* build-aux/check.sh.in: Use it.
* build-aux/config.sh: Update.
* build-aux/export.make: Update.
2018-07-26 19:36:03 +02:00
Jan Nieuwenhuizen f18e1fea36
build: Make build more autotools-like.
* build-aux/build.sh.in: Move from ./build.sh
* build-aux/check.sh.in: Likewise.
* build-aux/GNUmakefile.in: Likewise.
* build-aux/install.sh.in: Likewise.
* build-aux/uninstall.sh.in: Likewise.
* configure: Substitute them.
* configure.sh: Likewise.
* build-aux/build-cc.sh: Update: use ${srcdest} instead of ${top_builddest}.
* build-aux/build-cc32.sh: Likewise.
* build-aux/build-guile.sh: Likewise.
* build-aux/build-mes.sh: Likewise.
* build-aux/cc-mes.sh: Likewise.
* build-aux/cc.sh: Likewise.
* build-aux/cc32-mes.sh: Likewise.
* build-aux/check-boot.sh: Likewise.
* build-aux/check-mes.sh: Likewise.
* build-aux/check-mescc.sh: Likewise.
* build-aux/config.sh: Likewise.
* build-aux/export.make: Likewise.
* build-aux/mes-snarf.scm: Likewise.
* build-aux/pre-inst-env.in: Likewise.
* build-aux/test.sh: Likewise.
* build-aux/trace.sh: Likewise.
* module/mescc/mescc.scm: Likewise.
* scripts/mescc.in: Likewise.
* src/mes.c: Likewise.
* .gitignore: Likewise.
2018-07-25 08:14:13 +02:00
Jan Nieuwenhuizen 3140b0ed44
build: Support all `Standard targets' for users.
* GNUmakefile (distclean mostlyclean, maintainer-clean, html, dvi, ps,
  install-dvi, install-ps, install-html, installcheck): New target.
  (install-info): Remove fake target.
* configure (parse-opts): Add --srcdir.

xx
2018-07-23 20:03:57 +02:00
Jan Nieuwenhuizen 72cb975213
GNU Mes.
Throughout, make these changes

   Copyright headers: GNU Mes
   First mention of name: GNU Mes
   Website: https://www.gnu.org/software/mes
   Git:     git://git.savannah.gnu.org/mes.git
2018-07-22 14:24:36 +02:00
Jan Nieuwenhuizen 06e0dfe9ad
build: Generate gcc-mesboot-graph from .dot.
* doc/images/gcc-mesboot-graph.dot: New file.
* doc/images/gcc-mesboot-graph.png: Remove.
* GNUmakefile (${top_builddest}doc/images/gcc-mesboot-graph.png): New target.
* configure (det): Add check.
* build-aux/export.make: Export it.
* doc/mes.texi (The Mes Bootstrap Process): Describe new recipe.
* guix/git/mes.scm (mes): Add graphvis dependency.
2018-07-22 22:27:24 +02:00
Jan Nieuwenhuizen 53c0941937
guix: Refactor package setup.
Next to the convenient environment setup and package build from git

   guix environment -l .guix.scm
   guix build -f .guix.scm

we can now also build other included packages

    GUIX_PACKAGE_PATH=guix guix build mes@0.17
    GUIX_PACKAGE_PATH=guix guix build nyacc@0.80.42

* guix/git/mes.scm: Move from .guix.scm, make a module.
* .guix.scm: Move from guix.scm, use it.
* build-aux/manifest.scm: Update location.
* build-aux/pre-inst-env.in: Support it.
* configure: Check for guix.
* build-aux/export.make: Export GUIX.
* GNUmakefile (update-hash): New target.
2018-07-22 08:41:48 +02:00
Jan Nieuwenhuizen ceeaa6b50c
build: Respect --docdir.
* configure: Respect --docdir.
2018-07-22 14:44:50 +02:00
Jan Nieuwenhuizen 4203a427d0
build: Support --srcdir build.
* build-aux/config.sh: New file.
* build-aux/trace.sh: New file.
* build-aux/GNUmakefile.in: New file.
* configure: Support srcdir configure.
* GNUmakefile: Support srcdir build.
* build-aux/build-cc.sh: Likewise.
* build-aux/build-cc32.sh: Likewise.
* build-aux/build-guile.sh: Likewise.
* build-aux/build-mes.sh: Likewise.
* build-aux/cc-mes.sh: Likewise.
* build-aux/cc.sh: Likewise.
* build-aux/cc32-mes.sh: Likewise.
* build-aux/check-mes.sh: Likewise.
* build-aux/check-mescc.sh: Likewise.
* build-aux/export.make: Likewise.
* build-aux/mes-snarf.scm: Likewise.
* build-aux/pre-inst-env.in: Likewise.
* build-aux/test.sh: Likewise.
* build.sh: Likewise.
* check.sh: Likewise.
* install.sh: Likewise.
* module/mescc/mescc.scm: Likewise.
* scripts/mescc.in: Likewise.
* src/mes.c: Likewise.
2018-07-22 00:43:39 +02:00
Jan Nieuwenhuizen 4072046a2b
build: Refactor configure.
* configure: Refactor.
2018-07-21 21:20:48 +02:00
Jan Nieuwenhuizen 5d3fa50384
build: Prepare for autoconfiscation.
Make build system more in alignment with how autotools work.  This
will make transition easier.

* mes/module/mes/boot-0.scm.in: Update from module/mes/boot-0.scm.
* scripts/mescc.in: Update from scripts/mescc.
* build-aux/pre-inst-env.in: New file.
* build-aux/cc-mes.sh: Use pre-inst-env.
* configure: Substitute new .in files.
* install.sh: Do not substitute mescc, boot-0.scm.
2018-07-21 18:28:47 +02:00
Jan Nieuwenhuizen d769a3d3c1
build: Fix for handling missing makeinfo.
* configure (main): Update MAKEINFO.
2018-07-21 11:19:55 +02:00
Jan Nieuwenhuizen 6a48f4a814
Release 0.16.1
* configure (VERSION): Bump to 0.16.1.
2018-07-12 22:30:01 +02:00
Jan Nieuwenhuizen c5bf550fff
build: Handle CFLAGS, CPPFLAGS for Debian. 2018-07-12 22:30:00 +02:00
Jan Nieuwenhuizen c997abcae8
build: Have configure create a git archive.
* configure: Create git archive if necessary.
2018-07-12 22:30:00 +02:00
Jan Nieuwenhuizen ec7d9f5d57
build: Use GNU style lower case directory configure variable naming.
* GNUmakefile: Use GNU style lower case directory configure variable naming.
* HACKING: Likewise.
* INSTALL: Likewise.
* build-aux/build-cc.sh: Likewise.
* build-aux/build-cc32.sh: Likewise.
* build-aux/cc-mes.sh: Likewise.
* build-aux/cc.sh: Likewise.
* build-aux/cc32-mes.sh: Likewise.
* build-aux/export.make: Likewise.
* build-aux/setup-mes.sh: Likewise.
* build.sh: Likewise.
* check.sh: Likewise.
* configure: Likewise.
* doc/mes.texi: Likewise.
* install.sh: Likewise.
* scripts/mescc: Likewise.
2018-07-12 22:29:59 +02:00
Jan Nieuwenhuizen 72e147f53f
build: Build and install manual pages.
* build-aux/export.make: New file.
* GNUmakefile (man): New target.
  (doc): Depend on man.
  include build-aux/export.make, remove exports.
* guix.scm (mes): Add dependency on help2man.
* configure: Check for help2man.
* install.sh: Install manual pages if built.
2018-07-12 22:29:59 +02:00
Jan Nieuwenhuizen a4770c1eed
doc: Initial version.
* doc/mes.texi: New file.
* doc/fdl-1.3.texi: New file.
* AUTHORS: Mention it.
* GNUmakefile (doc, info, install-info): New targets.
* install.sh: Install info if available.
* guix: (mes): Add texinfo to native-inputs.
* configure: Check for makeinfo.
2018-07-12 22:29:59 +02:00
Jan Nieuwenhuizen f9a4e21972
Release 0.16.
* configure (VERSION): Bump to 0.16.
2018-06-25 19:27:19 +02:00
Jan Nieuwenhuizen 350d94aa77
build: Support tcc, create tinycc-seed with tcc.
* configure: check for tcc.
* build-aux/cc32-mes.sh: Rename from cc-mes-gcc.sh.  Support
  tcc.  Update users.
* build-aux/build-cc32-mes.sh: Rename from build-mes-gcc.sh.  Update users.
* GNUmakefile (mes-tcc): New target.
* .gitignore: Ignore mes-tcc arch output.
* lib/crt1.c (_start): Add "rm" constraint so satisfy tcc.
* lib/linux-gcc.c (_sys_call, _sys_call1 _sys_call2 _sys_call3): Likewise.
2018-06-24 09:28:23 +02:00
Jan Nieuwenhuizen d8e6046453
build: make seed: Update mescc-tools-seed too. 2018-06-16 06:37:20 +02:00
Jan Nieuwenhuizen 1b80c8a76f
Release 0.15.
* configure (VERSION): Bump to 0.15.
2018-06-10 21:10:54 +02:00
Jan Nieuwenhuizen b6b93f9f19
build: Resurrect non-bootstrap build.
* configure (parse-opts): Support mixing VAR=VALUE --prefix=PREFIX.
* guix.scm (mes): Remove setting PREFIX in make-flags.
* install.sh: Cater for Guix's setting read-only of scripts/diff.scm.
2018-06-12 07:05:33 +02:00
Jan Nieuwenhuizen 893c020ef4
build: Check for mes-seed, tinycc-seed.
* configure: Check for guile-tools, mes-seed, tinycc-seed.  Bugfix:
  Add cwd to load path.
2018-05-27 06:59:36 +02:00
Jan Nieuwenhuizen 4e50490aa2
Release 0.14.
* configure (VERSION): Bump to 0.14.
2018-05-20 12:47:01 +02:00
Jan Nieuwenhuizen c6d666bd67
build: Update configure.
* configure: Update.
2018-05-21 00:06:39 +02:00
Jan Nieuwenhuizen aa7cca0032
build: configure: Handle VAR=VALUE. Update help.
* configure: Handle VAR=VALUE.  Update help.
2018-05-06 08:46:32 +02:00