source: svn/trunk/newcon3bcm2_21bu/toolchain/libexec/gcc/mips-linux-uclibc/3.4.2/install-tools/mkheaders

Last change on this file was 2, checked in by phkim, 11 years ago

1.phkim

  1. revision copy newcon3sk r27
  • Property svn:executable set to *
File size: 3.4 KB
Line 
1#!/bin/sh
2
3# Copyright (C) 2002 Free Software Foundation, Inc.
4
5#This file is part of GCC.
6
7#GCC is free software; you can redistribute it and/or modify it under
8#the terms of the GNU General Public License as published by the Free
9#Software Foundation; either version 2, or (at your option) any later
10#version.
11
12#GCC is distributed in the hope that it will be useful, but WITHOUT
13#ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14#FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
15#for more details.
16
17#You should have received a copy of the GNU General Public License
18#along with GCC; see the file COPYING.  If not, write to the Free
19#Software Foundation, 59 Temple Place - Suite 330, Boston, MA
20#02111-1307, USA.
21
22# Basic information
23target=mips-unknown-linux-uclibc
24target_noncanonical=mips-linux-uclibc
25version=3.4.2
26
27VERBOSE=0
28while [ x$1 = x-v ] ; do
29    shift
30    VERBOSE=`expr $VERBOSE + 1`
31done
32export VERBOSE
33
34if [ x$1 = x--help ] ; then
35    echo "Usage: mkheaders [options] [prefix]"
36    echo "Options:"
37    echo "  -v        Print more output (may be repeated for even more output)"
38    echo "  --help    This help"
39    echo "  --version Print version information"
40    exit 0
41fi
42
43if [ x$1 = x--version ] ; then
44    echo "mkheaders (GCC) version $version"
45    echo "Copyright 2002 Free Software Foundation, Inc."
46    echo "This program is free software; you may redistribute it under the"
47    echo "terms of the GNU General Public License.  This program has"
48    echo "absolutely no warranty."
49    exit 0
50fi
51
52# Common prefix for installation directories.
53if [ x$1 != x ] ; then
54  prefix=$1
55else
56  prefix=/opt/toolchains/uclibc-crosstools_linux-2.6.12.0_gcc-3.4.2_uclibc-0.9.28-20060113/
57fi
58# Directory in which to put localized header files. On the systems with
59# gcc as the native cc, `local_prefix' may not be `prefix' which is
60# `/usr'.
61# NOTE: local_prefix *should not* default from prefix.
62local_prefix=/usr/local
63# Directory in which to put host dependent programs and libraries
64exec_prefix=${prefix}
65# Directory in which to put the directories used by the compiler.
66libdir=${exec_prefix}/lib
67libexecdir=${exec_prefix}/libexec
68# Directory in which the compiler finds libraries, etc.
69libsubdir=${libdir}/gcc/${target_noncanonical}/${version}
70# Directory in which the compiler finds executables
71libexecsubdir=${libexecdir}/gcc/${target_noncanonical}/${version}
72# Since gcc_tooldir does not exist at build-time, use -B${build_tooldir}/bin/
73build_tooldir=${exec_prefix}/${target_noncanonical}
74# Directory to search for site-specific includes.
75local_includedir=${local_prefix}/include
76includedir=${prefix}/include
77
78itoolsdir=${libexecsubdir}/install-tools
79itoolsdatadir=${libsubdir}/install-tools
80incdir=${libsubdir}/include
81
82. ${itoolsdatadir}/mkheaders.conf
83
84cd ${itoolsdir}
85rm -rf ${incdir}/*
86
87if [ x${STMP_FIXINC} != x ] ; then
88        TARGET_MACHINE="${target}" target_canonical="${target}" \
89            ${SHELL} ./fixinc.sh ${incdir} \
90            ${SYSTEM_HEADER_DIR} ${OTHER_FIXINCLUDES_DIRS}
91        rm -f ${incdir}/syslimits.h
92        if [ -f ${incdir}/limits.h ]; then
93          mv ${incdir}/limits.h ${incdir}/syslimits.h
94        else
95          cp ${itoolsdatadir}/gsyslimits.h ${incdir}/syslimits.h
96        fi
97fi
98
99cp ${itoolsdatadir}/include/* ${incdir}
100
101if [ x${STMP_FIXPROTO} != x ] ; then
102  mkinstalldirs="${SHELL} ${itoolsdir}/mkinstalldirs"
103  export FIXPROTO_DEFINES mkinstalldirs
104  ${SHELL} fixproto ${incdir} ${incdir} ${SYSTEM_HEADER_DIR} || exit 1
105fi
Note: See TracBrowser for help on using the repository browser.