1 # Stefan Teleman <[email protected]> |
|
2 # |
|
3 # On Solaris, we do NOT want to bootstrap GCC with a completely different |
|
4 # set of header files than those which will be *used* by GCC to compile |
|
5 # other things. And we only want two 'fixincluded' header files: |
|
6 # <limts.h> and <syslimits.h>. The other header files are those found |
|
7 # on the system. |
|
8 # Internal patch. Solaris specific. |
|
9 --- fixincludes/fixinc.in 2012-10-28 14:42:48.000000000 -0700 |
|
10 +++ fixincludes/fixinc.in 2015-08-02 17:32:14.598076914 -0700 |
|
11 @@ -36,7 +36,13 @@ |
|
12 exit 1 |
|
13 fi |
|
14 |
|
15 -LIB=${1} |
|
16 +export UNAMES="`uname -s`" |
|
17 +if [ "${UNAMES}" = "SunOS" ] ; then |
|
18 + export PATH="/usr/gnu/bin:/usr/bin:/usr/sbin" |
|
19 +fi |
|
20 + |
|
21 + |
|
22 +export LIB=${1} |
|
23 shift |
|
24 |
|
25 # Make sure it exists. |
|
26 @@ -475,28 +481,38 @@ |
|
27 then echo 'Cleaning up unneeded directories:' ; fi |
|
28 cd $LIB |
|
29 all_dirs=`find . -type d \! -name '.' -print | sort -r` |
|
30 + |
|
31 for file in $all_dirs; do |
|
32 - if rmdir $LIB/$file > /dev/null |
|
33 - then |
|
34 - test $VERBOSE -gt 3 && echo " removed $file" |
|
35 - fi |
|
36 + rm -rf "${LIB}/${file}" |
|
37 + test $VERBOSE -gt 0 && echo " removed $file" |
|
38 done 2> /dev/null |
|
39 |
|
40 +if [ "${UNAMES}" = "SunOS" ] ; then |
|
41 + extra_files=`find . -type f -name "*.h" -print | sort -r` |
|
42 + echo "Doing additional cleanups on Solaris..." |
|
43 + for file in $extra_files; do |
|
44 + filename=`basename ${file}` |
|
45 + if [ "${filename}" != "limits.h" ] && [ "${filename}" != "syslimits.h" ] ; then |
|
46 + rm -f $LIB/$file |
|
47 + echo "removed $file" |
|
48 + fi |
|
49 + done |
|
50 +fi |
|
51 + |
|
52 # On systems which don't support symlinks, `find' may barf |
|
53 # if called with "-type l" predicate. So only use that if |
|
54 # we know we should look for symlinks. |
|
55 if $LINKS; then |
|
56 - test $VERBOSE -gt 2 && echo "Removing unused symlinks" |
|
57 - |
|
58 + test $VERBOSE -gt 0 && echo "Removing unused symlinks" |
|
59 all_dirs=`find . -type l -print` |
|
60 for file in $all_dirs |
|
61 do |
|
62 if test ! -d $file |
|
63 then |
|
64 rm -f $file |
|
65 - test $VERBOSE -gt 3 && echo " removed $file" |
|
66 - rmdir `dirname $file` > /dev/null && \ |
|
67 - test $VERBOSE -gt 3 && \ |
|
68 + test $VERBOSE -gt 0 && echo " removed $file" |
|
69 + rm -rf `dirname $file` && \ |
|
70 + test $VERBOSE -gt 0 && \ |
|
71 echo " removed `dirname $file`" |
|
72 fi |
|
73 done 2> /dev/null |
|