OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [fixincludes/] [mkheaders.in] - Diff between revs 154 and 816

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 154 Rev 816
#!/bin/sh
#!/bin/sh
# Copyright (C) 2002, 2007 Free Software Foundation, Inc.
# Copyright (C) 2002, 2007 Free Software Foundation, Inc.
#This file is part of GCC.
#This file is part of GCC.
#GCC is free software; you can redistribute it and/or modify it under
#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
#the terms of the GNU General Public License as published by the Free
#Software Foundation; either version 2, or (at your option) any later
#Software Foundation; either version 2, or (at your option) any later
#version.
#version.
#GCC is distributed in the hope that it will be useful, but WITHOUT
#GCC is distributed in the hope that it will be useful, but WITHOUT
#ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
#ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
#FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
#FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
#for more details.
#for more details.
#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 GCC; see the file COPYING.  If not, write to the Free
#along with GCC; see the file COPYING.  If not, write to the Free
#Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#02110-1301, USA.
#02110-1301, USA.
# Basic information
# Basic information
target=@target@
target=@target@
target_noncanonical=@target_noncanonical@
target_noncanonical=@target_noncanonical@
version=@gcc_version@
version=@gcc_version@
VERBOSE=0
VERBOSE=0
while [ x$1 = x-v ] ; do
while [ x$1 = x-v ] ; do
    shift
    shift
    VERBOSE=`expr $VERBOSE + 1`
    VERBOSE=`expr $VERBOSE + 1`
done
done
export VERBOSE
export VERBOSE
if [ x$1 = x--help ] ; then
if [ x$1 = x--help ] ; then
    echo "Usage: mkheaders [options] [prefix [isysroot]]"
    echo "Usage: mkheaders [options] [prefix [isysroot]]"
    echo "Options:"
    echo "Options:"
    echo "  -v        Print more output (may be repeated for even more output)"
    echo "  -v        Print more output (may be repeated for even more output)"
    echo "  --help    This help"
    echo "  --help    This help"
    echo "  --version Print version information"
    echo "  --version Print version information"
    exit 0
    exit 0
fi
fi
if [ x$1 = x--version ] ; then
if [ x$1 = x--version ] ; then
    echo "mkheaders (GCC) version $version"
    echo "mkheaders (GCC) version $version"
    echo "Copyright 2002, 2007 Free Software Foundation, Inc."
    echo "Copyright 2002, 2007 Free Software Foundation, Inc."
    echo "This program is free software; you may redistribute it under the"
    echo "This program is free software; you may redistribute it under the"
    echo "terms of the GNU General Public License.  This program has"
    echo "terms of the GNU General Public License.  This program has"
    echo "absolutely no warranty."
    echo "absolutely no warranty."
    exit 0
    exit 0
fi
fi
# Common prefix for installation directories.
# Common prefix for installation directories.
if [ x$1 != x ] ; then
if [ x$1 != x ] ; then
  prefix=$1
  prefix=$1
  shift
  shift
else
else
  prefix=@prefix@
  prefix=@prefix@
fi
fi
# Allow for alternate isysroot in which to find headers
# Allow for alternate isysroot in which to find headers
if [ x$1 != x ] ; then
if [ x$1 != x ] ; then
  isysroot=$1
  isysroot=$1
  shift
  shift
else
else
  isysroot=
  isysroot=
fi
fi
# Directory in which to put host dependent programs and libraries
# Directory in which to put host dependent programs and libraries
exec_prefix=@exec_prefix@
exec_prefix=@exec_prefix@
# Directory in which to put the directories used by the compiler.
# Directory in which to put the directories used by the compiler.
libdir=@libdir@
libdir=@libdir@
libexecdir=@libexecdir@
libexecdir=@libexecdir@
# Directory in which the compiler finds libraries, etc.
# Directory in which the compiler finds libraries, etc.
libsubdir=${libdir}/gcc/${target_noncanonical}/${version}
libsubdir=${libdir}/gcc/${target_noncanonical}/${version}
# Directory in which the compiler finds executables
# Directory in which the compiler finds executables
libexecsubdir=${libexecdir}/gcc/${target_noncanonical}/${version}
libexecsubdir=${libexecdir}/gcc/${target_noncanonical}/${version}
itoolsdir=${libexecsubdir}/install-tools
itoolsdir=${libexecsubdir}/install-tools
itoolsdatadir=${libsubdir}/install-tools
itoolsdatadir=${libsubdir}/install-tools
incdir=${libsubdir}/include
incdir=${libsubdir}/include
. ${itoolsdatadir}/mkheaders.conf
. ${itoolsdatadir}/mkheaders.conf
cd ${itoolsdir}
cd ${itoolsdir}
rm -rf ${incdir}/*
rm -rf ${incdir}/*
if [ x${STMP_FIXINC} != x ] ; then
if [ x${STMP_FIXINC} != x ] ; then
        TARGET_MACHINE="${target}" target_canonical="${target}" \
        TARGET_MACHINE="${target}" target_canonical="${target}" \
            MACRO_LIST="${itoolsdatadir}/macro_list" \
            MACRO_LIST="${itoolsdatadir}/macro_list" \
            @SHELL@ ./fixinc.sh ${incdir} \
            @SHELL@ ./fixinc.sh ${incdir} \
            ${isysroot}${SYSTEM_HEADER_DIR} ${OTHER_FIXINCLUDES_DIRS}
            ${isysroot}${SYSTEM_HEADER_DIR} ${OTHER_FIXINCLUDES_DIRS}
        rm -f ${incdir}/syslimits.h
        rm -f ${incdir}/syslimits.h
        if [ -f ${incdir}/limits.h ]; then
        if [ -f ${incdir}/limits.h ]; then
          mv ${incdir}/limits.h ${incdir}/syslimits.h
          mv ${incdir}/limits.h ${incdir}/syslimits.h
        else
        else
          cp ${itoolsdatadir}/gsyslimits.h ${incdir}/syslimits.h
          cp ${itoolsdatadir}/gsyslimits.h ${incdir}/syslimits.h
        fi
        fi
fi
fi
cp ${itoolsdatadir}/include/* ${incdir}
cp ${itoolsdatadir}/include/* ${incdir}
if [ x${STMP_FIXPROTO} != x ] ; then
if [ x${STMP_FIXPROTO} != x ] ; then
  mkinstalldirs="@SHELL@ ${itoolsdir}/mkinstalldirs"
  mkinstalldirs="@SHELL@ ${itoolsdir}/mkinstalldirs"
  export FIXPROTO_DEFINES mkinstalldirs
  export FIXPROTO_DEFINES mkinstalldirs
  @SHELL@ fixproto ${incdir} ${incdir} ${isysroot}${SYSTEM_HEADER_DIR} || exit 1
  @SHELL@ fixproto ${incdir} ${incdir} ${isysroot}${SYSTEM_HEADER_DIR} || exit 1
fi
fi
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.