summaryrefslogtreecommitdiff
path: root/fixincludes
diff options
context:
space:
mode:
Diffstat (limited to 'fixincludes')
-rw-r--r--fixincludes/ChangeLog4
-rw-r--r--fixincludes/mkheaders.in34
2 files changed, 23 insertions, 15 deletions
diff --git a/fixincludes/ChangeLog b/fixincludes/ChangeLog
index 61f0bfe22f6..35187bd7e51 100644
--- a/fixincludes/ChangeLog
+++ b/fixincludes/ChangeLog
@@ -1,3 +1,7 @@
+2007-03-06 Joseph Myers <joseph@codesourcery.com>
+
+ * mkheaders.in: Fix headers for each multilib required.
+
2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
* Makefile.in: Add dummy install-pdf target.
diff --git a/fixincludes/mkheaders.in b/fixincludes/mkheaders.in
index cfe826eca0a..b584b68d6af 100644
--- a/fixincludes/mkheaders.in
+++ b/fixincludes/mkheaders.in
@@ -78,29 +78,33 @@ libexecsubdir=${libexecdir}/gcc/${target_noncanonical}/${version}
itoolsdir=${libexecsubdir}/install-tools
itoolsdatadir=${libsubdir}/install-tools
incdir=${libsubdir}/include-fixed
-
-. ${itoolsdatadir}/mkheaders.conf
+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} \
+ @SHELL@ ./fixinc.sh ${subincdir} \
${isysroot}${SYSTEM_HEADER_DIR} ${OTHER_FIXINCLUDES_DIRS}
- rm -f ${incdir}/syslimits.h
- if [ -f ${incdir}/limits.h ]; then
- mv ${incdir}/limits.h ${incdir}/syslimits.h
+ 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
+ fi
-cp ${itoolsdatadir}/include/* ${incdir}
+ cp ${itoolsdatadir}/include${multi_dir}/limits.h ${subincdir}
-if [ x${STMP_FIXPROTO} != x ] ; then
- mkinstalldirs="@SHELL@ ${itoolsdir}/mkinstalldirs"
- export FIXPROTO_DEFINES mkinstalldirs
- @SHELL@ fixproto ${incdir} ${incdir} ${isysroot}${SYSTEM_HEADER_DIR} || exit 1
-fi
+ if [ x${STMP_FIXPROTO} != x ] ; then
+ export FIXPROTO_DEFINES mkinstalldirs
+ @SHELL@ fixproto ${subincdir} ${subincdir} ${isysroot}${SYSTEM_HEADER_DIR} || exit 1
+ fi
+done