X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=fixincludes%2Fmkheaders.in;h=9109b057c536e303edd096d172373e2291928bce;hb=2d1d165ab2977e43abd515b06d85f9d4c23f6248;hp=8330ac47454a0f8228518e23a6bb96c1f2565cde;hpb=f4e1623043decd25fbe99d994c385b02eb52dc3a;p=pf3gnuchains%2Fgcc-fork.git diff --git a/fixincludes/mkheaders.in b/fixincludes/mkheaders.in index 8330ac47454..9109b057c53 100644 --- a/fixincludes/mkheaders.in +++ b/fixincludes/mkheaders.in @@ -1,12 +1,12 @@ #!/bin/sh -# Copyright (C) 2002 Free Software Foundation, Inc. +# Copyright (C) 2002, 2007, 2009 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 +#Software Foundation; either version 3, or (at your option) any later #version. #GCC is distributed in the hope that it will be useful, but WITHOUT @@ -15,9 +15,8 @@ #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. +#along with GCC; see the file COPYING3. If not see +#. # Basic information target=@target@ @@ -32,7 +31,7 @@ done export VERBOSE if [ x$1 = x--help ] ; then - echo "Usage: mkheaders [options] [prefix]" + echo "Usage: mkheaders [options] [prefix [isysroot]]" echo "Options:" echo " -v Print more output (may be repeated for even more output)" echo " --help This help" @@ -42,7 +41,7 @@ fi if [ x$1 = x--version ] ; then echo "mkheaders (GCC) version $version" - echo "Copyright 2002 Free Software Foundation, Inc." + echo "Copyright 2002, 2007, 2009 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." @@ -52,9 +51,19 @@ fi # Common prefix for installation directories. if [ x$1 != x ] ; then prefix=$1 + shift else prefix=@prefix@ fi + +# Allow for alternate isysroot in which to find headers +if [ x$1 != x ] ; then + isysroot=$1 + shift +else + isysroot= +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. @@ -67,30 +76,29 @@ libexecsubdir=${libexecdir}/gcc/${target_noncanonical}/${version} itoolsdir=${libexecsubdir}/install-tools itoolsdatadir=${libsubdir}/install-tools -incdir=${libsubdir}/include - -. ${itoolsdatadir}/mkheaders.conf +incdir=${libsubdir}/include-fixed +mkinstalldirs="@SHELL@ ${itoolsdir}/mkinstalldirs" cd ${itoolsdir} rm -rf ${incdir}/* -if [ x${STMP_FIXINC} != x ] ; then +for ml in `cat ${itoolsdatadir}/fixinc_list`; do + sysroot_headers_suffix=`echo ${ml} | sed -e 's/;.*$//'` + multi_dir=`echo ${ml} | sed -e 's/^[^;]*;//'` + subincdir=${incdir}${multi_dir} + . ${itoolsdatadir}/mkheaders.conf + 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 + @SHELL@ ./fixinc.sh ${subincdir} \ + ${isysroot}${SYSTEM_HEADER_DIR} ${OTHER_FIXINCLUDES_DIRS} + rm -f ${subincdir}/syslimits.h + if [ -f ${subincdir}/limits.h ]; then + mv ${subincdir}/limits.h ${subincdir}/syslimits.h else - cp ${itoolsdatadir}/gsyslimits.h ${incdir}/syslimits.h + cp ${itoolsdatadir}/gsyslimits.h ${subincdir}/syslimits.h fi -fi - -cp ${itoolsdatadir}/include/* ${incdir} + fi -if [ x${STMP_FIXPROTO} != x ] ; then - mkinstalldirs="@SHELL@ ${itoolsdir}/mkinstalldirs" - export FIXPROTO_DEFINES mkinstalldirs - @SHELL@ fixproto ${incdir} ${incdir} ${SYSTEM_HEADER_DIR} || exit 1 -fi + cp ${itoolsdatadir}/include${multi_dir}/limits.h ${subincdir} +done