squash! stat
* configure (main): Copy <srcdest>include/<kernel>/<arch>/*.h to include/. * configure.sh: Likewise. * .gitignore: Ignore them. Add copyright header. * build-aux/bootstrap.sh.in (AM_CPPFLAGS): Replace <srcdest>include/<kernel>/<cpu> with built ../include. * build-aux/build.sh.in (AM_CPPFLAGS): Likewise. * build-aux/install.sh.in: Also install built include.
This commit is contained in:
parent
cb49899215
commit
7cbe2b1152
|
@ -1,3 +1,21 @@
|
|||
# GNU Mes --- Maxwell Equations of Software
|
||||
# Copyright © 2016,2017,2019,2020,2022 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/>.
|
||||
|
||||
*-
|
||||
*~
|
||||
.#*
|
||||
|
@ -117,7 +135,9 @@
|
|||
/doc/images/gcc-mesboot-graph.pdf
|
||||
/doc/web/
|
||||
/config.sh
|
||||
/include/kernel-stat.h
|
||||
/include/mes/config.h
|
||||
/include/syscall.h
|
||||
/gcc-lib
|
||||
/mescc-lib
|
||||
/bin
|
||||
|
|
|
@ -50,7 +50,7 @@ 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"
|
||||
AM_CPPFLAGS="-D HAVE_CONFIG_H=1 -I ${srcdest}include -I ../include -I include"
|
||||
AM_CFLAGS="-L ${srcdest}lib"
|
||||
|
||||
mkdir -p $mes_cpu-mes
|
||||
|
@ -113,7 +113,7 @@ $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"
|
||||
AM_CPPFLAGS="-D HAVE_CONFIG_H=1 -I ${srcdest}include -I ../include -I include"
|
||||
AM_CFLAGS="-L ${srcdest}lib"
|
||||
|
||||
objects=
|
||||
|
|
|
@ -66,9 +66,8 @@ fi
|
|||
AM_CPPFLAGS="
|
||||
-D HAVE_CONFIG_H=1
|
||||
-I ${srcdest}lib
|
||||
-I include
|
||||
-I ${srcdest}include
|
||||
-I ${srcdest}include/$mes_kernel/$mes_cpu
|
||||
-I ../include
|
||||
"
|
||||
if test $mes_kernel = gnu; then
|
||||
AM_CPPFLAGS="$AM_CPPFLAGS
|
||||
|
@ -93,9 +92,9 @@ fi
|
|||
AM_CPPFLAGS="
|
||||
-D HAVE_CONFIG_H=1
|
||||
-I ${srcdest}lib
|
||||
-I include
|
||||
-I ${srcdest}include
|
||||
-I ${srcdest}include/$mes_kernel/$mes_cpu
|
||||
-I ../include
|
||||
-I include
|
||||
"
|
||||
if test "$compiler" != bootstrap; then
|
||||
${SHELL} ${srcdest}build-aux/build-mes.sh
|
||||
|
@ -137,9 +136,9 @@ fi
|
|||
AM_CPPFLAGS="
|
||||
-D HAVE_CONFIG_H=1
|
||||
-I ${srcdest}lib
|
||||
-I include
|
||||
-I ${srcdest}include
|
||||
-I ${srcdest}include/$mes_kernel/$mes_cpu
|
||||
-I ../include
|
||||
-I include
|
||||
"
|
||||
compiler=mescc
|
||||
AR=${MESAR-"${srcdest}pre-inst-env mesar"}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#! @SHELL@
|
||||
|
||||
# GNU Mes --- Maxwell Equations of Software
|
||||
# Copyright © 2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
# Copyright © 2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
#
|
||||
# This file is part of GNU Mes.
|
||||
#
|
||||
|
@ -99,6 +99,7 @@ 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 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
|
||||
|
|
|
@ -707,6 +707,13 @@ See \"Porting GNU Mes\" in the manual, or try --with-courage\n" mes-system)
|
|||
#define MES_VERSION \"" VERSION "\"
|
||||
")))))
|
||||
(substitute (string-append srcdest "build-aux/config.make.in") pairs #:target ".config.make"))
|
||||
(let ((arch-dir (string-append srcdest "include/" mes-kernel "/" mes-cpu)))
|
||||
(define (copy-header file-name)
|
||||
(system* "cp" "-f" "-v"
|
||||
(string-append arch-dir "/" file-name)
|
||||
(string-append "include/" file-name)))
|
||||
(system* "mkdir" "-p" "include")
|
||||
(for-each copy-header '("kernel-stat.h" "syscall.h")))
|
||||
|
||||
(let ((make (and=> (file-name "make" deps) basename)))
|
||||
(display (string-append "
|
||||
|
|
|
@ -271,6 +271,10 @@ cat >> include/mes/config.h <<EOF
|
|||
#define MES_VERSION "$VERSION"
|
||||
EOF
|
||||
|
||||
mkdir -p include
|
||||
cp -f -v ${srcdest}include/${mes_kernel}/${mes_cpu}/kernel-stat.h include
|
||||
cp -f -v ${srcdest}include/${mes_kernel}/${mes_cpu}/syscall.h include
|
||||
|
||||
cat <<EOF
|
||||
GNU Mes is configured for
|
||||
compiler: $compiler
|
||||
|
|
|
@ -46,7 +46,7 @@ struct stat
|
|||
unsigned long __pad0;
|
||||
unsigned long __pad1;
|
||||
};
|
||||
#if HAVE_LONG_LONG
|
||||
#if __SIZEOF_LONG_LONG__ == 8
|
||||
struct stat64
|
||||
{
|
||||
unsigned long long st_dev;
|
||||
|
|
|
@ -46,7 +46,7 @@ struct stat
|
|||
unsigned long __pad0;
|
||||
unsigned long __pad1;
|
||||
};
|
||||
#if HAVE_LONG_LONG
|
||||
#if __SIZEOF_LONG_LONG__ == 8
|
||||
struct stat64
|
||||
{
|
||||
unsigned long long st_dev;
|
||||
|
|
|
@ -22,11 +22,6 @@
|
|||
#include <syscall.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#if (__i386__ || __arm__) && SYS_stat64 && HAVE_LONG_LONG
|
||||
#undef SYS_stat
|
||||
#define SYS_stat SYS_stat64
|
||||
#endif
|
||||
|
||||
int
|
||||
stat (char const *file_name, struct stat *statbuf)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue