Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
c3c55f86
Commit
c3c55f86
authored
Apr 12, 1999
by
Bruce Korb
Committed by
Bruce Korb
Apr 12, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make fixincludes behave like the scripts in fixinc/
From-SVN: r26367
parent
f853036b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
79 additions
and
27 deletions
+79
-27
gcc/ChangeLog
+3
-0
gcc/fixincludes
+76
-27
No files found.
gcc/ChangeLog
View file @
c3c55f86
1999
-
04
-
12
Bruce
Korb
<
ddsinc09
@ix
.
netcom
.
com
>
1999
-
04
-
12
Bruce
Korb
<
ddsinc09
@ix
.
netcom
.
com
>
*
fixincludes
:
make
fixincludes
behave
like
the
scripts
in
fixinc
/
*
Makefile
.
in
(
stmp
-
fixinc
)
:
*
Makefile
.
in
(
stmp
-
fixinc
)
:
ensure
the
SHELL
value
is
that
of
the
make
ensure
the
SHELL
value
is
that
of
the
make
...
...
gcc/fixincludes
View file @
c3c55f86
...
@@ -7,53 +7,68 @@
...
@@ -7,53 +7,68 @@
# Directory containing the original header files.
# Directory containing the original header files.
# (This was named INCLUDES, but that conflicts with a name in Makefile.in.)
# (This was named INCLUDES, but that conflicts with a name in Makefile.in.)
INPUT
=
${
2
-
${
INPUT
-/usr/include
}}
if
[
"x
$1
"
=
"x"
]
then
echo
fixincludes: no output directory specified
exit
1
fi
# Directory in which to store the results.
LIB
=
${
1
}
LIB
=
${
1
?
"fixincludes: output directory not specified"
}
shift
# Make sure it exists.
if
[
!
-d
$LIB
]
;
then
mkdir
$LIB
||
{
echo
fixincludes: output dir
'`'
$LIB
"' cannot be created"
exit
1
}
else
(
\c
d
$LIB
&&
touch DONE
&&
rm DONE
)
||
{
echo
fixincludes: output dir
'`'
$LIB
"' is an invalid directory"
exit
1
}
fi
# Define what target system we're fixing.
# Define what target system we're fixing.
#
if
test
-r
./Makefile
;
then
if
test
-r
./Makefile
;
then
target_canonical
=
"
`
sed
-n
-e
's,^target[ ]*=[ ]*\(.*\)$,\1,p'
< Makefile
`
"
target_canonical
=
"
`
sed
-n
-e
's,^target[ ]*=[ ]*\(.*\)$,\1,p'
< Makefile
`
"
test
-z
"
${
target_canonical
}
"
&&
target_canonical
=
unknown
else
target_canonical
=
unknown
fi
fi
# If not from the Makefile, then try config.guess
#
if
test
-z
"
${
target_canonical
}
"
;
then
if
test
-x
./config.guess
;
then
target_canonical
=
"
`
config.guess
`
"
;
fi
test
-z
"
${
target_canonical
}
"
&&
target_canonical
=
unknown
fi
export
target_canonical
# # # # # # # # # # # # # # # # # # # # #
#
# Define PWDCMD as a command to use to get the working dir
# Define PWDCMD as a command to use to get the working dir
# in the form that we want.
# in the form that we want.
PWDCMD
=
pwd
PWDCMD
=
pwd
case
"
`
pwd
`
"
in
case
"
`
$PWDCMD
`
"
in
//
*
)
//
*
)
# On an Apollo, discard everything before `/usr'.
# On an Apollo, discard everything before `/usr'.
PWDCMD
=
"eval pwd | sed -e 's,.*/usr/,/usr/,'"
PWDCMD
=
"eval pwd | sed -e 's,.*/usr/,/usr/,'"
;;
;;
esac
esac
# Original directory.
# Original directory.
ORIGDIR
=
`
${
PWDCMD
}
`
ORIGDIR
=
`
${
PWDCMD
}
`
# Make sure it exists.
if
[
!
-d
$LIB
]
;
then
mkdir
$LIB
||
exit
1
fi
# Make LIB absolute only if needed to avoid problems with the amd.
# Make LIB absolute only if needed to avoid problems with the amd.
case
$LIB
in
case
$LIB
in
/
*
)
/
*
)
;;
;;
*
)
*
)
cd
$LIB
;
LIB
=
`
${
PWDCMD
}
`
cd
$LIB
;
LIB
=
`
${
PWDCMD
}
`
;;
;;
esac
esac
# Fail if no arg to specify a directory for the output.
echo
Fixing headers into
${
LIB
}
for
${
target_canonical
}
target
if
[
x
$1
=
x
]
then
echo
fixincludes: no output directory specified
exit
1
fi
echo
Building fixed headers
in
${
LIB
}
# Determine whether this system has symbolic links.
# Determine whether this system has symbolic links.
if
ln
-s
X
$LIB
/ShouldNotExist 2>/dev/null
;
then
if
ln
-s
X
$LIB
/ShouldNotExist 2>/dev/null
;
then
...
@@ -66,8 +81,30 @@ else
...
@@ -66,8 +81,30 @@ else
LINKS
=
false
LINKS
=
false
fi
fi
# # # # # # # # # # # # # # # # # # # # #
#
# Search each input directory for broken header files.
# This loop ends near the end of the file.
#
if
test
$#
-eq
0
then
INPUTLIST
=
"/usr/include"
else
INPUTLIST
=
"
$@
"
fi
for
INPUT
in
${
INPUTLIST
}
;
do
cd
${
ORIGDIR
}
cd
${
INPUT
}
||
continue
INPUT
=
`
${
PWDCMD
}
`
#
# # # # # # # # # # # # # # # # # # # # #
#
echo
Finding directories and links to directories
echo
Finding directories and links to directories
cd
${
INPUT
}
# Find all directories and all symlinks that point to directories.
# Find all directories and all symlinks that point to directories.
# Put the list in $files.
# Put the list in $files.
# Each time we find a symlink, add it to newdirs
# Each time we find a symlink, add it to newdirs
...
@@ -3210,5 +3247,17 @@ for file in $files; do
...
@@ -3210,5 +3247,17 @@ for file in $files; do
rmdir
$LIB
/
$file
>
/dev/null 2>&1
rmdir
$LIB
/
$file
>
/dev/null 2>&1
done
done
# # # # # # # # # # # # # # # # # # # # #
#
# End of for INPUT directories
#
done
#
# # # # # # # # # # # # # # # # # # # # #
cd
$ORIGDIR
rm
-f
include/assert.h
cp
${
srcdir
}
/assert.h include/assert.h
||
exit
1
chmod a+r include/assert.h
exit
0
exit
0
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment