source: Daodan/MinGW/libexec/gcc/mingw32/5.3.0/install-tools/mkheaders@ 1046

Last change on this file since 1046 was 1046, checked in by alloc, 8 years ago

Daodan: Added Windows MinGW and build batch file

File size: 3.1 KB
Line 
1#!/bin/sh
2
3# Copyright (C) 2002, 2007, 2009 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 3, 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 COPYING3. If not see
19#<http://www.gnu.org/licenses/>.
20
21# Basic information
22target=i686-pc-mingw32
23target_noncanonical=mingw32
24version=5.3.0
25
26VERBOSE=0
27while [ x$1 = x-v ] ; do
28 shift
29 VERBOSE=`expr $VERBOSE + 1`
30done
31export VERBOSE
32
33if [ x$1 = x--help ] ; then
34 echo "Usage: mkheaders [options] [prefix [isysroot]]"
35 echo "Options:"
36 echo " -v Print more output (may be repeated for even more output)"
37 echo " --help This help"
38 echo " --version Print version information"
39 exit 0
40fi
41
42if [ x$1 = x--version ] ; then
43 echo "mkheaders (GCC) version $version"
44 echo "Copyright 2002, 2007, 2009 Free Software Foundation, Inc."
45 echo "This program is free software; you may redistribute it under the"
46 echo "terms of the GNU General Public License. This program has"
47 echo "absolutely no warranty."
48 exit 0
49fi
50
51# Common prefix for installation directories.
52if [ x$1 != x ] ; then
53 prefix=$1
54 shift
55else
56 prefix=/mingw
57fi
58
59# Allow for alternate isysroot in which to find headers
60if [ x$1 != x ] ; then
61 isysroot=$1
62 shift
63else
64 isysroot=
65fi
66
67# Directory in which to put host dependent programs and libraries
68exec_prefix=${prefix}
69# Directory in which to put the directories used by the compiler.
70libdir=${exec_prefix}/lib
71libexecdir=${exec_prefix}/libexec
72# Directory in which the compiler finds libraries, etc.
73libsubdir=${libdir}/gcc/${target_noncanonical}/${version}
74# Directory in which the compiler finds executables
75libexecsubdir=${libexecdir}/gcc/${target_noncanonical}/${version}
76
77itoolsdir=${libexecsubdir}/install-tools
78itoolsdatadir=${libsubdir}/install-tools
79incdir=${libsubdir}/include-fixed
80mkinstalldirs="/bin/bash ${itoolsdir}/mkinstalldirs"
81
82cd ${itoolsdir}
83rm -rf ${incdir}/*
84
85for ml in `cat ${itoolsdatadir}/fixinc_list`; do
86 sysroot_headers_suffix=`echo ${ml} | sed -e 's/;.*$//'`
87 multi_dir=`echo ${ml} | sed -e 's/^[^;]*;//'`
88 subincdir=${incdir}${multi_dir}
89 . ${itoolsdatadir}/mkheaders.conf
90 if [ x${STMP_FIXINC} != x ] ; then
91 TARGET_MACHINE="${target}" target_canonical="${target}" \
92 MACRO_LIST="${itoolsdatadir}/macro_list" \
93 /bin/bash ./fixinc.sh ${subincdir} \
94 ${isysroot}${SYSTEM_HEADER_DIR} ${OTHER_FIXINCLUDES_DIRS}
95 rm -f ${subincdir}/syslimits.h
96 if [ -f ${subincdir}/limits.h ]; then
97 mv ${subincdir}/limits.h ${subincdir}/syslimits.h
98 else
99 cp ${itoolsdatadir}/gsyslimits.h ${subincdir}/syslimits.h
100 fi
101 fi
102
103 cp ${itoolsdatadir}/include${multi_dir}/limits.h ${subincdir}
104done
Note: See TracBrowser for help on using the repository browser.