mes/build-aux/build-mes.sh
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

87 lines
2.6 KiB
Bash
Executable file

#! /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 [ ! "$config_status" ]; then
. ./config.status
fi
. ${srcdest}build-aux/config.sh
. ${srcdest}build-aux/trace.sh
. ${srcdest}build-aux/cc.sh
[ "$mes_p" ] && (program_prefix= compile lib/linux/$mes_arch/crt1)
[ "$mes_p" -a ! "$gcc_p" ] && cp -f lib/linux/$mes_arch/crt1.S lib/$mes_arch/crt1.S
[ "$mes_p" -a ! "$gcc_p" ] && cp -f lib/linux/$mes_arch/crt1.o lib/$mes_arch/crt1.o
[ ! "$mesc_p" -a ! "$with_glibc_p" ] && (program_prefix= compile lib/linux/$mes_arch/crt0)
[ "$mes_p" -a "$gcc_p" ] && (program_prefix= compile lib/linux/$mes_arch/crti)
[ "$mes_p" -a "$gcc_p" ] && (program_prefix= compile lib/linux/$mes_arch/crtn)
[ ! "$mes_p" -a ! "$mesc_p" ] && compile lib/libmes
[ ! "$mes_p" -a ! "$mesc_p" ] && archive lib/libmes
[ "$mes_p" ] && compile lib/libc-mini
[ "$mes_p" ] && archive lib/libc-mini
[ "$mes_p" ] && compile lib/libc
[ "$mes_p" ] && archive lib/libc
[ "$mes_p" ] && compile lib/libc+tcc
[ "$mes_p" ] && archive lib/libc+tcc
[ "$mes_p" ] && compile lib/libc+gnu
[ "$mes_p" ] && archive lib/libc+gnu
[ "$mes_p" -a ! "$mesc_p" ] && compile lib/libtcc1
[ "$mes_p" -a ! "$mesc_p" ] && archive lib/libtcc1
[ "$mes_p" -a ! "$mesc_p" ] && compile lib/libg
[ "$mes_p" -a ! "$mesc_p" ] && archive lib/libg
[ "$mes_p" -a ! "$mesc_p" ] && compile lib/libgetopt
[ "$mes_p" -a ! "$mesc_p" ] && archive lib/libgetopt
compile scaffold/main
(libc= link scaffold/main)
compile scaffold/hello
(libc="-l c-mini" link scaffold/hello)
compile scaffold/argv
(libc="-l c-mini" link scaffold/argv)
[ "$mes_p" ] && compile lib/tests/stdlib/50-malloc
[ "$mes_p" ] && link lib/tests/stdlib/50-malloc
[ "$mes_p" ] && compile lib/tests/posix/50-getenv
[ "$mes_p" ] && link lib/tests/posix/50-getenv
[ "$mes_p" ] && compile scaffold/micro-mes
[ "$mes_p" ] && link scaffold/micro-mes
[ "$mes_p" ] && compile scaffold/tiny-mes
[ "$mes_p" ] && link scaffold/tiny-mes
compile src/mes
link src/mes