summaryrefslogtreecommitdiff
path: root/lib/ylwrap
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2001-06-24 03:38:27 +0000
committerTom Tromey <tromey@redhat.com>2001-06-24 03:38:27 +0000
commit081f2d5113065a78110272b827e552c80fc9e259 (patch)
tree7d891d3a0663e678fc7f90bf7890b3cdb0d48aa8 /lib/ylwrap
parent08e7a2e03ce8cd417e2691238ddbeec1ed2b3b1b (diff)
downloadautomake-081f2d5113065a78110272b827e552c80fc9e259.tar.gz
Fix for yacc5.test:
* lib/ylwrap: Changed usage. * lib/am/yacc.am: Rewrote to use new substitutions. * lib/am/lex.am: Likewise. * automake.in (handle_languages): Skip files whose language doesn't have a compiler. Handle `define_flag' attribute. Changed '$' to "\$" to aid Emacs fontification. (struct): Added `rule_file'. Removed `derived_autodep'. Added `_target_hook' and `define_flag'. (yacc, yaccxx, lex, lexxx): Set `rule_file', `flags', `compile', and `compiler' attributes. Removed `linker', `derived_autodep', and `ansi' attributes. Added `define_flag'. (yacc, yaccxx): Added `_target_hook'. (saw_extension): Count number of times extension seen. (count_files_for_language): New sub. (saw_sources_p): Use it. (handle_single_transform_list): Allow language rewrite function to return a new source extension. Call target_hook. (yacc_sources, lex_sources): Removed. (initialize_per_input): Don't initialize yacc_sources or lex_sources. (lang_yacc_rewrite): Rewrote. (lang_yaccxx_rewrite): Likewise. (lang_lex_rewrite): Likewise. (lang_lexxx_rewrite): Likewise. (output_yacc_build_rule): Removed. (output_lex_build_rule): Removed. (lang_yacc_finish): Removed build rule generation. (lang_lex_finish): Likewise. (DASH_D_PATTERN): New global. (lang_yacc_target_hook): New function. (_target_hook): New function. (register_language): Default `define_flag'. * tests/yacc5.test: Updated test. * tests/yacc4.test: Exit with status 77 if bison doesn't work. * tests/yacc3.test: Remove bogus `make' invocation. Added test for all YFLAGS variables.
Diffstat (limited to 'lib/ylwrap')
-rwxr-xr-xlib/ylwrap37
1 files changed, 11 insertions, 26 deletions
diff --git a/lib/ylwrap b/lib/ylwrap
index f7538bafe..f87c55ebd 100755
--- a/lib/ylwrap
+++ b/lib/ylwrap
@@ -18,38 +18,14 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Usage:
-# ylwrap PROGRAM [ARGS] INPUT [OUTPUT DESIRED]... -- [ARGS]...
-# * PROGRAM is program to run; options can follow but must start with `-'.
+# ylwrap INPUT [OUTPUT DESIRED]... -- PROGRAM [ARGS]...
# * INPUT is the input file
# * OUTPUT is file PROG generates
# * DESIRED is file we actually want
+# * PROGRAM is program to run
# * ARGS are passed to PROG
# Any number of OUTPUT,DESIRED pairs may be used.
-# The program to run.
-prog="$1"
-shift
-# Make any relative path in $prog absolute.
-case "$prog" in
- /* | [A-Za-z]:*) ;;
- */*) prog="`pwd`/$prog" ;;
-esac
-
-# We also have to accept options here and append them to the program.
-# Why? Suppose YACC is set to `bison -y'. Clearly nobody uses
-# ylwrap, or this would have been discovered earlier!
-while :; do
- case "$1" in
- -*)
- prog="$prog $1"
- shift
- ;;
- *)
- break
- ;;
- esac
-done
-
# The input.
input="$1"
shift
@@ -81,6 +57,15 @@ while test "$#" -ne 0; do
shift
done
+# The program to run.
+prog="$1"
+shift
+# Make any relative path in $prog absolute.
+case "$prog" in
+ /* | [A-Za-z]:*) ;;
+ */*) prog="`pwd`/$prog" ;;
+esac
+
# FIXME: add hostname here for parallel makes that run commands on
# other machines. But that might take us over the 14-char limit.
dirname=ylwrap$$