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
4ed15f9d
Commit
4ed15f9d
authored
32 years ago
by
Richard Stallman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(PWDCMD): New variable, set specially for Apollos.
Use it to get the working dir. From-SVN: r2808
parent
d038420e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
3 deletions
+13
-3
gcc/fixincludes
+13
-3
No files found.
gcc/fixincludes
View file @
4ed15f9d
...
...
@@ -26,6 +26,16 @@ export TERM
EXINIT
=
set
export
EXINIT
# Define PWDCMD as a command to use to get the working dir
# in the form that we want.
PWDCMD
=
pwd
case
"
`
pwd
`
"
in
//
*
)
# On an Apollo, discard everything before `/usr'.
PWDCMD
=
"(pwd) | sed -e 's,.*/usr/,/usr/,'"
;;
esac
# Directory in which to store the results.
LIB
=
${
1
?
"fixincludes: output directory not specified"
}
...
...
@@ -35,7 +45,7 @@ if [ ! -d $LIB ]; then
fi
# Make LIB absolute.
cd
$LIB
;
LIB
=
`
pwd
`
cd
$LIB
;
LIB
=
`
${
PWDCMD
}
`
# Fail if no arg to specify a directory for the output.
if
[
x
$1
=
x
]
...
...
@@ -123,7 +133,7 @@ if $LINKS; then
for
file
in
$files
;
do
dest
=
`
ls
-ld
$file
| sed
-n
's/.*-> //p'
`
if
[
"
$dest
"
]
;
then
cwd
=
`
pwd
`
cwd
=
`
${
PWDCMD
}
`
# In case $dest is relative, get to $file's dir first.
cd
${
INPUT
}
cd
`
echo
./
$file
| sed
-n
's&[^/]*$&&p'
`
...
...
@@ -133,7 +143,7 @@ if $LINKS; then
if
[
$?
=
0
]
;
then
cd
$dest
# X gets the dir that the link actually leads to.
x
=
`
pwd
`
x
=
`
${
PWDCMD
}
`
# If a link points to ., make a similar link to .
if
[
$x
=
$INPUT
]
;
then
echo
$file
'->'
.
': Making link'
...
...
This diff is collapsed.
Click to expand it.
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