diff options
author | Stefano Lattarini <stefano.lattarini@gmail.com> | 2013-01-16 14:28:43 +0100 |
---|---|---|
committer | Stefano Lattarini <stefano.lattarini@gmail.com> | 2013-01-16 14:28:43 +0100 |
commit | 1c01cc63c0f9aa0c9c8e581ebafe3d1c365cb956 (patch) | |
tree | 499bbbb2b54980e4a03abf8610c16b7c52458011 /lib/ylwrap | |
parent | b5523ac592a630be03d7f0129c70072169ab1b94 (diff) | |
parent | bba21ec30fcc603765b39c296fa6bf79b07c420c (diff) | |
download | automake-1c01cc63c0f9aa0c9c8e581ebafe3d1c365cb956.tar.gz |
Merge branch 'master' into ng/master
* master:
compat: restore AM_PROG_MKDIR, again
subdir-objects: complain if it isn't enabled
plans: update w.r.t. latest changes
ywrap: remove an obsolete FIXME comment
ywrap: style fixes (no semantic change intended)
convenience: "make lint" as an alias for "make maintainer-check"
docs: typofix in manual
coverage: using multiple lexers in a single program
texi: no longer support split info files
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Diffstat (limited to 'lib/ylwrap')
-rwxr-xr-x | lib/ylwrap | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/lib/ylwrap b/lib/ylwrap index 97a168c78..384b834cd 100755 --- a/lib/ylwrap +++ b/lib/ylwrap @@ -1,7 +1,7 @@ #! /bin/sh # ylwrap - wrapper for lex/yacc invocations. -scriptversion=2012-12-28.20; # UTC +scriptversion=2013-01-12.17; # UTC # Copyright (C) 1996-2013 Free Software Foundation, Inc. # @@ -40,7 +40,7 @@ get_dirname () # guard FILE # ---------- # The CPP macro used to guard inclusion of FILE. -guard() +guard () { printf '%s\n' "$1" \ | sed \ @@ -96,17 +96,17 @@ esac # The input. -input="$1" +input=$1 shift # We'll later need for a correct munging of "#line" directives. input_sub_rx=`get_dirname "$input" | quote_for_sed` -case "$input" in +case $input in [\\/]* | ?:[\\/]*) # Absolute path; do nothing. ;; *) # Relative path. Make it absolute. - input="`pwd`/$input" + input=`pwd`/$input ;; esac input_rx=`get_dirname "$input" | quote_for_sed` @@ -124,8 +124,8 @@ sed_fix_filenames= # guard in its implementation file. sed_fix_header_guards= -while test "$#" -ne 0; do - if test "$1" = "--"; then +while test $# -ne 0; do + if test x"$1" = x"--"; then shift break fi @@ -138,16 +138,14 @@ while test "$#" -ne 0; do done # The program to run. -prog="$1" +prog=$1 shift # Make any relative path in $prog absolute. -case "$prog" in +case $prog in [\\/]* | ?:[\\/]*) ;; - *[\\/]*) prog="`pwd`/$prog" ;; + *[\\/]*) 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$$ do_exit="cd '`pwd`' && rm -rf $dirname > /dev/null 2>&1;"' (exit $ret); exit $ret' trap "ret=129; $do_exit" 1 @@ -173,7 +171,7 @@ if test $ret -eq 0; then # otherwise prepend '../'. case $to in [\\/]* | ?:[\\/]*) target=$to;; - *) target="../$to";; + *) target=../$to;; esac # Do not overwrite unchanged header files to avoid useless @@ -182,7 +180,7 @@ if test $ret -eq 0; then # output of all other files to a temporary file so we can # compare them to existing versions. if test $from != $parser; then - realtarget="$target" + realtarget=$target target=tmp-`printf '%s\n' "$target" | sed 's|.*[\\/]||g'` fi |