Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
John McEleney
/
mailutils
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
e772a19b
...
e772a19b2d5786e7103b6942e76b203b40e97720
authored
2005-08-25 13:30:32 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Updated from Radius repository
1 parent
cc378298
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
11 deletions
scripts/ylwrap
scripts/ylwrap
View file @
e772a19
...
...
@@ -2,7 +2,6 @@
# ylwrap - wrapper for lex/yacc invocations.
# Copyright 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>.
# -yy modification by Sergey Poznyakoff <gray@farlep.net>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
...
...
@@ -72,6 +71,7 @@ input_dir="`echo $input | sed -e 's,/[^/]*$,,'`"
input_rx
=
"
`
echo
$input_dir
| sed -e
's,\.,\\\.,g'
`
"
pairlist
=
defout
=
$1
while
test
"$#"
-ne 0;
do
if
test
"
$1
"
=
"--"
;
then
shift
...
...
@@ -81,16 +81,26 @@ while test "$#" -ne 0; do
shift
done
STDOUT
=
""
if
[
$#
-ne 0
]
;
then
if
[
"x
$1
"
=
"x-yy"
]
;
then
shift
if
[
$#
-eq 0
]
;
then
while
test
"$#"
-ne 0;
do
case
"x
$1
"
in
x-yy
)
shift
if
[
$#
-eq 0
]
;
then
echo
"ylwrap: -yy requires an argument"
exit
1
fi
YYREPL
=
$1
shift
fi
fi
YYREPL
=
$1
shift
;;
x-stdout
)
shift
STDOUT
=
$defout
;;
*
)
break
;;
esac
done
fi
# FIXME: add hostname here for parallel makes that run commands on
...
...
@@ -101,7 +111,11 @@ mkdir $dirname || exit 1
cd
$dirname
$prog
${
1
+
"
$@
"
}
"
$input
"
if
[
-n
"
$STDOUT
"
]
;
then
$prog
${
1
+
"
$@
"
}
"
$input
"
>
$STDOUT
else
$prog
${
1
+
"
$@
"
}
"
$input
"
fi
status
=
$?
if
test
$status
-eq 0;
then
...
...
@@ -140,7 +154,8 @@ if test $status -eq 0; then
# resulting debug information to point at an absolute srcdir;
# it is better for it to just mention the .y file with no
# path.
EXPR
=
"/^#/ s,
$input_rx
/,,"
T
=
`
basename
$target
`
EXPR
=
"/^#/ s,
$input_rx
/,,;s,
\"
$from
\"
,
\"
$T
\"
,"
if
[
! -z
"
$YYREPL
"
]
;
then
EXPR
=
"
$EXPR
;s/yy/
$YYREPL
/g"
fi
...
...
@@ -167,4 +182,3 @@ cd ..
rm -rf
$dirname
exit
$status
...
...
Please
register
or
sign in
to post a comment