automake-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Automake-commit] [SCM] GNU Automake branch, ylwrap-refactor, updated. v


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, ylwrap-refactor, updated. v1.11-418-ge2b3194
Date: Fri, 06 May 2011 17:15:12 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Automake".

http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=e2b3194d4cc157c15fc56784accd22ba0527e9e4

The branch, ylwrap-refactor has been updated
       via  e2b3194d4cc157c15fc56784accd22ba0527e9e4 (commit)
       via  4a187a50b89839f823f174256afa0903e0040a97 (commit)
       via  c8698ab404005a28d148948647ef69456d4dd557 (commit)
       via  bfcbea4d70fbd35aabfaac32678fc5df074aeaf3 (commit)
       via  8f077d0da354613ea65413c7a2fac91c09f22af0 (commit)
      from  eab64df2b3e65cafddc4e3aaccc928b20b1c4ab4 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit e2b3194d4cc157c15fc56784accd22ba0527e9e4
Merge: c8698ab 4a187a5
Author: Stefano Lattarini <address@hidden>
Date:   Fri May 6 18:47:28 2011 +0200

    Merge branch 'yacc-work' into ylwrap-refactor
    
    * yacc-work:
      tests: add a workaround for automake bug#8485

commit c8698ab404005a28d148948647ef69456d4dd557
Author: Stefano Lattarini <address@hidden>
Date:   Fri May 6 12:34:27 2011 +0200

    ylwrap: rename 'handle_renaming' to 'tempfile_deploy'
    
    * lib/ylwrap (handle_renaming): This name has become out-of-sync
    with the subroutine purpose; so rename it ...
    (tempfile_deploy): ... to this.

commit bfcbea4d70fbd35aabfaac32678fc5df074aeaf3
Author: Stefano Lattarini <address@hidden>
Date:   Fri May 6 12:15:31 2011 +0200

    ylwrap: fix indentation
    
    * lib/ylwrap: Make indentation consistent (two spaces).

commit 8f077d0da354613ea65413c7a2fac91c09f22af0
Author: Stefano Lattarini <address@hidden>
Date:   Thu May 5 21:34:19 2011 +0200

    ylwrap: some renaming of variables and subroutines
    
    * lib/ylwrap ($dirname): Renamed ...
    ($tempdir): ... to this.
    (dos_fix_yacc_filenames): Renamed ...
    (set_yacc_filenames): ... to this.  Added comments.

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog             |   27 ++++++++++++++
 lib/ylwrap            |   97 +++++++++++++++++++++++++------------------------
 tests/yacc-d-cxx.test |    9 +++++
 3 files changed, 86 insertions(+), 47 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 982aeba..448aa9a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,30 @@
+2011-05-06  Stefano Lattarini  <address@hidden>
+
+       tests: add a workaround for automake bug#8485
+       * tests/yacc-d-cxx.test (Makefile.am): Add temporary workaround
+       for automake bug#8485.  The bug is still exposed by the testcase
+       'yacc-dist-nobuild-subdir.test'.
+
+2011-05-06  Stefano Lattarini  <address@hidden>
+
+       ylwrap: rename 'handle_renaming' to 'tempfile_deploy'
+       * lib/ylwrap (handle_renaming): This name has become out-of-sync
+       with the subroutine purpose; so rename it ...
+       (tempfile_deploy): ... to this.
+
+2011-05-06  Stefano Lattarini  <address@hidden>
+
+       ylwrap: fix indentation
+       * lib/ylwrap: Make indentation consistent (two spaces).
+
+2011-05-06  Stefano Lattarini  <address@hidden>
+
+       ylwrap: some renaming of variables and subroutines
+       * lib/ylwrap ($dirname): Renamed ...
+       ($tempdir): ... to this.
+       (dos_fix_yacc_filenames): Renamed ...
+       (set_yacc_filenames): ... to this.  Added comments.
+
 2011-05-05  Stefano Lattarini  <address@hidden>
 
        ylwrap: move "update if changed" logic out of `handle_renaming'
diff --git a/lib/ylwrap b/lib/ylwrap
index 63ff934..7edebb5 100755
--- a/lib/ylwrap
+++ b/lib/ylwrap
@@ -32,9 +32,9 @@ scriptversion=2011-05-05.12; # UTC
 
 usage_error ()
 {
-    echo "$0: $*" >&2
-    echo "Try \`$0 --help' for more information." >&2
-    exit 2
+  echo "$0: $*" >&2
+  echo "Try \`$0 --help' for more information." >&2
+  exit 2
 }
 
 # Escape (most) sed metacharacters in the given string, so that it can
@@ -60,9 +60,12 @@ tr_cpp ()
 }
 
 # Since DOS filename conventions don't allow two dots, the DOS version
-# of Bison writes out y_tab.c instead of y.tab.c and y_tab.h instead
-# of y.tab.h.  Test to see if this is the case.
-dos_fix_yacc_filenames ()
+# of Bison writes out y_tab.c instead of y.tab.c and y_tab.h instead of
+# y.tab.h.  Test to see if this is the case, ans set the default names
+# of the yacc output files accordingly.
+# This subroutine sets the global variables `$y_tab_c', `$y_tab_h' and
+# `$y_output'.
+set_yacc_filenames ()
 {
   test $wrapped = yacc || return 0
   if test -f y_tab.c || test -f y_tab.h; then
@@ -75,37 +78,37 @@ dos_fix_yacc_filenames ()
   y_output=y.output
 }
 
-# Usage: handle_renaming FROM TARGET
-handle_renaming ()
+# Usage: tempfile_deploy FROM TARGET
+tempfile_deploy ()
 {
-    from=$1
-    target=$2
-    if test ! -f $dirname/$from; then
-      echo "ylwrap: expected file \`$from' not found" >&2
-      ret=1
-      return
-    fi
+  from=$1
+  target=$2
+  if test ! -f $tempdir/$from; then
+    echo "ylwrap: expected file \`$from' not found" >&2
+    ret=1
+    return
+  fi
 
-    # Edit out `#line' or `#' directives.
-    #
-    # We don't want the resulting debug information to point at
-    # an absolute srcdir; it is better for it to just mention the
-    # .y file with no path.
-    #
-    # We want to use the real output file name, not yy.lex.c for
-    # instance.
-    #
-    # We want the include guards to be adjusted too.
-    # TODO: This include guards seems not to be generated anymore
-    # by newer bison versions (at least starting from 1.875; they
-    # were still generated in version 1.75, though).  Also, BSD and
-    # Solaris yacc seems not to generate such include guards either.
-    # So, how much is this code still relevant today?
-    FROM=`tr_cpp "$from"`
-    TARGET=`tr_cpp "$target"`
+  # Edit out `#line' or `#' directives.
+  #
+  # We don't want the resulting debug information to point at
+  # an absolute srcdir; it is better for it to just mention the
+  # .y file with no path.
+  #
+  # We want to use the real output file name, not yy.lex.c for
+  # instance.
+  #
+  # We want the include guards to be adjusted too.
+  # TODO: This include guards seems not to be generated anymore
+  # by newer bison versions (at least starting from 1.875; they
+  # were still generated in version 1.75, though).  Also, BSD and
+  # Solaris yacc seems not to generate such include guards either.
+  # So, how much is this code still relevant today?
+  FROM=`tr_cpp "$from"`
+  TARGET=`tr_cpp "$target"`
 
-    sed -e "/^#/!b" -e "s,$input_rx,," -e "s,$from,$target," \
-        -e "s,$FROM,$TARGET," $dirname/"$from" >"$target" || ret=$?
+  sed -e "/^#/!b" -e "s,$input_rx,," -e "s,$from,$target," \
+      -e "s,$FROM,$TARGET," $tempdir/"$from" >"$target" || ret=$?
 }
 
 move_if_change ()
@@ -118,7 +121,7 @@ move_if_change ()
   else
     echo "updating $dest"
     mv -f "$src" "$dest"
- fi
+  fi
 }
 
 test $# -gt 0 || usage_error "missing argument"
@@ -205,23 +208,23 @@ 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 '$ocwd' && rm -rf $dirname; (exit \$ret); exit \$ret"
+tempdir=ylwrap$$
+do_exit="cd '$ocwd' && rm -rf $tempdir; (exit \$ret); exit \$ret"
 # The only signals which are portably trappable are 1 (SIGHUP),
 # 2 (SIGINT), 13 (SIGPIPE) and 15 (SIGTERM).
 trap "ret=129; $do_exit" 1
 trap "ret=130; $do_exit" 2
 trap "ret=141; $do_exit" 13
 trap "ret=143; $do_exit" 15
-mkdir $dirname || exit 1
+mkdir $tempdir || exit 1
 
-cd $dirname || exit 1
+cd $tempdir || exit 1
 case $# in
   0) "$prog" "$input" ;;
   *) "$prog" "$@" "$input" ;;
 esac
 ret=$?
-dos_fix_yacc_filenames
+set_yacc_filenames
 cd "$ocwd" || exit 1
 
 test $ret -eq 0 || eval "$do_exit"
@@ -240,20 +243,20 @@ case $wrapped in
     # changed.  This avoid useless recompilations.  However the
     # parser itself should always be updated, because it is the
     # destination of the .y.c rule in the Makefile.
-    handle_renaming $y_tab_c $output_stem.$c_ext
+    tempfile_deploy $y_tab_c $output_stem.$c_ext
     # If the `-d' option is not used, we don't want an error when the
     # header file is "missing".  Similarly, if `-v' is not used, we
     # don't want an error when the `y.output' file is "missing".
-    if test -f $dirname/$y_tab_h; then
-      handle_renaming $y_tab_h $dirname/header.tmp
-      move_if_change $dirname/header.tmp $output_stem.$h_ext
+    if test -f $tempdir/$y_tab_h; then
+      tempfile_deploy $y_tab_h $tempdir/header.tmp
+      move_if_change $tempdir/header.tmp $output_stem.$h_ext
     fi
-    if test -f $dirname/$y_output; then
-      handle_renaming $y_output $output_stem.output
+    if test -f $tempdir/$y_output; then
+      tempfile_deploy $y_output $output_stem.output
     fi
     ;;
   lex)
-    handle_renaming $lex_output_root.c $output
+    tempfile_deploy $lex_output_root.c $output
     ;;
   *)
     exit 255 # Not reached.
diff --git a/tests/yacc-d-cxx.test b/tests/yacc-d-cxx.test
index 1308c18..599b6ca 100755
--- a/tests/yacc-d-cxx.test
+++ b/tests/yacc-d-cxx.test
@@ -84,6 +84,15 @@ $AUTOCONF
 
 cp $testsrcdir/../lib/ylwrap .
 
+# FIXME: temporary workaround (taken from the automake manual) for
+#        automake bug#8485.  Remove once that bug is fixed.
+cat >> Makefile.am <<'END'
+AUTOMAKE_OPTIONS = -Wno-override
+distcleancheck_listfiles = \
+       find ./baz -type f -exec sh -c 'test -f $(srcdir)/$$1 || echo $$1' \
+            sh '{}' ';'
+END
+
 $AUTOMAKE Makefile
 
 # Try with -d in $(YFLAGS) (don't do this in real life!).


hooks/post-receive
-- 
GNU Automake



reply via email to

[Prev in Thread] Current Thread [Next in Thread]