mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-12-27 04:55:01 +08:00
53c7ffe7dd
2004-11-04 Geoffrey Keating <geoffk@apple.com> * Makefile.def: Build fixincludes for the host, too. * Makefile.in: Regenerate. * configure.in (host_tools): Add fixincludes. * configure: Regenerate. Index: fixincludes/ChangeLog 2004-11-04 Geoffrey Keating <geoffk@apple.com> * configure.ac: Add code to determine noncanonical_target, local_prefix, gcc_version; process mkheaders.in to make mkheaders. * configure: Regenerate. * fixinc.in: Move here from gcc/; fix many cross-hosting bugs. * mkfixinc.sh: Move here from gcc/; update for changes to fixinc.in. * mkheaders.in: Move here from gcc/; remove some unnecessary macros; update for changes to fixinc.in. * Makefile.in: Add many new macros. (install): New target. (mkheaders): New target. (fixinc.sh): New target. (all): Add mkheaders and fixinc.sh. * README-fixinc: Move here from gcc/. Index: gcc/ChangeLog 2004-11-04 Geoffrey Keating <geoffk@apple.com> * Makefile.in (distclean): Don't delete nonexistent fixinc/ directory. (install-mkheaders): Install the version built for the host, not for the build machine. * configure.ac: Always run fixincludes. (all_outputs): Remove mkheaders. * configure: Regenerate. * fixinc.in: Move to fixincludes/. * mkfixinc.sh: Likewise. * mkheaders.in: Likewise. * README-fixinc: Likewise. From-SVN: r90117
97 lines
2.9 KiB
Bash
97 lines
2.9 KiB
Bash
#!/bin/sh
|
|
|
|
# Copyright (C) 2002 Free Software Foundation, Inc.
|
|
|
|
#This file is part of GCC.
|
|
|
|
#GCC 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.
|
|
|
|
#GCC 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 GCC; see the file COPYING. If not, write to the Free
|
|
#Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
|
#02111-1307, USA.
|
|
|
|
# Basic information
|
|
target=@target@
|
|
target_noncanonical=@target_noncanonical@
|
|
version=@gcc_version@
|
|
|
|
VERBOSE=0
|
|
while [ x$1 = x-v ] ; do
|
|
shift
|
|
VERBOSE=`expr $VERBOSE + 1`
|
|
done
|
|
export VERBOSE
|
|
|
|
if [ x$1 = x--help ] ; then
|
|
echo "Usage: mkheaders [options] [prefix]"
|
|
echo "Options:"
|
|
echo " -v Print more output (may be repeated for even more output)"
|
|
echo " --help This help"
|
|
echo " --version Print version information"
|
|
exit 0
|
|
fi
|
|
|
|
if [ x$1 = x--version ] ; then
|
|
echo "mkheaders (GCC) version $version"
|
|
echo "Copyright 2002 Free Software Foundation, Inc."
|
|
echo "This program is free software; you may redistribute it under the"
|
|
echo "terms of the GNU General Public License. This program has"
|
|
echo "absolutely no warranty."
|
|
exit 0
|
|
fi
|
|
|
|
# Common prefix for installation directories.
|
|
if [ x$1 != x ] ; then
|
|
prefix=$1
|
|
else
|
|
prefix=@prefix@
|
|
fi
|
|
# Directory in which to put host dependent programs and libraries
|
|
exec_prefix=@exec_prefix@
|
|
# Directory in which to put the directories used by the compiler.
|
|
libdir=@libdir@
|
|
libexecdir=@libexecdir@
|
|
# Directory in which the compiler finds libraries, etc.
|
|
libsubdir=${libdir}/gcc/${target_noncanonical}/${version}
|
|
# Directory in which the compiler finds executables
|
|
libexecsubdir=${libexecdir}/gcc/${target_noncanonical}/${version}
|
|
|
|
itoolsdir=${libexecsubdir}/install-tools
|
|
itoolsdatadir=${libsubdir}/install-tools
|
|
incdir=${libsubdir}/include
|
|
|
|
. ${itoolsdatadir}/mkheaders.conf
|
|
|
|
cd ${itoolsdir}
|
|
rm -rf ${incdir}/*
|
|
|
|
if [ x${STMP_FIXINC} != x ] ; then
|
|
TARGET_MACHINE="${target}" target_canonical="${target}" \
|
|
MACRO_LIST="${itoolsdatadir}/macro_list" \
|
|
${SHELL} ./fixinc.sh ${incdir} \
|
|
${SYSTEM_HEADER_DIR} ${OTHER_FIXINCLUDES_DIRS}
|
|
rm -f ${incdir}/syslimits.h
|
|
if [ -f ${incdir}/limits.h ]; then
|
|
mv ${incdir}/limits.h ${incdir}/syslimits.h
|
|
else
|
|
cp ${itoolsdatadir}/gsyslimits.h ${incdir}/syslimits.h
|
|
fi
|
|
fi
|
|
|
|
cp ${itoolsdatadir}/include/* ${incdir}
|
|
|
|
if [ x${STMP_FIXPROTO} != x ] ; then
|
|
mkinstalldirs="${SHELL} ${itoolsdir}/mkinstalldirs"
|
|
export FIXPROTO_DEFINES mkinstalldirs
|
|
${SHELL} fixproto ${incdir} ${incdir} ${SYSTEM_HEADER_DIR} || exit 1
|
|
fi
|