summaryrefslogtreecommitdiffstats
path: root/gcc/fixinc/fixinc.ptx
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fixinc/fixinc.ptx')
-rw-r--r--gcc/fixinc/fixinc.ptx29
1 files changed, 23 insertions, 6 deletions
diff --git a/gcc/fixinc/fixinc.ptx b/gcc/fixinc/fixinc.ptx
index 93a8f2c5d0e..ac8478a7aa3 100644
--- a/gcc/fixinc/fixinc.ptx
+++ b/gcc/fixinc/fixinc.ptx
@@ -34,9 +34,6 @@
#
# See README-fixinc for more information.
-# Directory containing the original header files.
-INPUT=${2-${INPUT-/usr/include}}
-
# Fail if no arg to specify a directory for the output.
if [ x$1 = x ]
then echo fixincludes: no output directory specified
@@ -51,7 +48,7 @@ if [ ! -d $LIB ]; then
mkdir $LIB || exit 1
fi
-ORIG_DIR=`pwd`
+ORIG_DIR=`${PWDCMD-pwd}`
# Make LIB absolute if it is relative.
# Don't do this if not necessary, since may screw up automounters.
@@ -59,7 +56,7 @@ case $LIB in
/*)
;;
*)
- LIB=$ORIG_DIR/$LIB
+ cd $LIB; LIB=`${PWDCMD-pwd}`
;;
esac
@@ -69,6 +66,17 @@ echo 'Running fixinc.svr4'
echo 'Finished fixinc.svr4'
echo 'Building fixincludes in ' ${LIB}
+# Directory containing the original header files.
+shift
+if [ $# -eq 0 ] ; then
+ set /usr/include
+fi
+
+INLIST="$@"
+
+for INPUT in ${INLIST} ; do
+cd ${ORIG_DIR}
+cd ${INPUT}
# Copied from fixincludes.
# Don't use or define the name va_list in stdio.h.
@@ -253,5 +261,14 @@ if [ \! -z "$file_to_fix" ]; then
fi
fi
-exit 0
+done
+if [ x${INSTALL_ASSERT_H} != x ] ;
+then
+ cd ${ORIG_DIR}
+ rm -f include/assert.h;
+ cp $(srcdir)/assert.h include/assert.h;
+ chmod a+r include/assert.h;
+fi
+
+exit 0
OpenPOWER on IntegriCloud