3 # Copyright (C) 2002 Free Software Foundation, Inc.
5 #This file is part of GCC.
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
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
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
24 target_noncanonical
=@target_noncanonical@
28 while [ x
$1 = x-v
] ; do
30 VERBOSE
=`expr $VERBOSE + 1`
34 if [ x
$1 = x--help
] ; then
35 echo "Usage: mkheaders [options] [prefix]"
37 echo " -v Print more output (may be repeated for even more output)"
38 echo " --help This help"
39 echo " --version Print version information"
43 if [ 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."
52 # Common prefix for installation directories.
53 if [ x
$1 != x
] ; then
58 # Directory in which to put host dependent programs and libraries
59 exec_prefix
=@exec_prefix@
60 # Directory in which to put the directories used by the compiler.
62 libexecdir
=@libexecdir@
63 # Directory in which the compiler finds libraries, etc.
64 libsubdir
=${libdir}/gcc/${target_noncanonical}/${version}
65 # Directory in which the compiler finds executables
66 libexecsubdir
=${libexecdir}/gcc/${target_noncanonical}/${version}
68 itoolsdir
=${libexecsubdir}/install-tools
69 itoolsdatadir
=${libsubdir}/install-tools
70 incdir
=${libsubdir}/include
72 .
${itoolsdatadir}/mkheaders.conf
77 if [ x
${STMP_FIXINC} != x
] ; then
78 TARGET_MACHINE
="${target}" target_canonical
="${target}" \
79 MACRO_LIST
="${itoolsdatadir}/macro_list" \
80 @SHELL@ .
/fixinc.sh
${incdir} \
81 ${SYSTEM_HEADER_DIR} ${OTHER_FIXINCLUDES_DIRS}
82 rm -f ${incdir}/syslimits.h
83 if [ -f ${incdir}/limits.h
]; then
84 mv ${incdir}/limits.h
${incdir}/syslimits.h
86 cp ${itoolsdatadir}/gsyslimits.h
${incdir}/syslimits.h
90 cp ${itoolsdatadir}/include
/* ${incdir}
92 if [ x
${STMP_FIXPROTO} != x
] ; then
93 mkinstalldirs
="@SHELL@ ${itoolsdir}/mkinstalldirs"
94 export FIXPROTO_DEFINES mkinstalldirs
95 @SHELL@ fixproto
${incdir} ${incdir} ${SYSTEM_HEADER_DIR} ||
exit 1