emacs-diffs
[Top][All Lists]
Advanced

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

master 214dfbf: Don't version-control generated file `grammat-wy.el`


From: Stefan Monnier
Subject: master 214dfbf: Don't version-control generated file `grammat-wy.el`
Date: Mon, 12 Apr 2021 22:17:29 -0400 (EDT)

branch: master
commit 214dfbfea0cc7d64704aa4a258da542435c44cbb
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>

    Don't version-control generated file `grammat-wy.el`
    
    This file is needed for CEDET's bootstrap, tho, so we now keep a copy of it
    under version control in `gram-wy-boot.el`, very much like we do with
    the `ldefs-boot.el` copy of `loaddefs.el`.
    
    * lisp/cedet/semantic/grm-wy-boot.el: Rename from
    `lisp/cedet/semantic/grammar-wy.el`.
    
    * lisp/cedet/semantic/grammar.el: Load `grm-wy-boot.el` if
    `grammar-wy.el` hasn't been generated yet.
    
    * admin/update_autogen: Also refresh `grm-wy-boot.el`.
    
    * admin/grammars/Makefile.in (WISENT): Add `grammar-wy.el` to the
    generated files.
    
    * .gitignore: Add `grammar-wy.el`.
---
 .gitignore                                            |  1 +
 admin/grammars/Makefile.in                            | 13 +++++--------
 admin/update_autogen                                  | 12 +++++++++---
 lisp/cedet/semantic/grammar.el                        |  7 ++++++-
 lisp/cedet/semantic/{grammar-wy.el => grm-wy-boot.el} |  0
 lisp/emacs-lisp/eieio-base.el                         |  3 +--
 6 files changed, 22 insertions(+), 14 deletions(-)

diff --git a/.gitignore b/.gitignore
index a1e3cb9..c262f39 100644
--- a/.gitignore
+++ b/.gitignore
@@ -88,6 +88,7 @@ lisp/cedet/semantic/wisent/javat-wy.el
 lisp/cedet/semantic/wisent/js-wy.el
 lisp/cedet/semantic/wisent/python-wy.el
 lisp/cedet/srecode/srt-wy.el
+lisp/cedet/semantic/grammar-wy.el
 lisp/eshell/esh-groups.el
 lisp/finder-inf.el
 lisp/leim/ja-dic/
diff --git a/admin/grammars/Makefile.in b/admin/grammars/Makefile.in
index 35ce554..4172411 100644
--- a/admin/grammars/Makefile.in
+++ b/admin/grammars/Makefile.in
@@ -51,14 +51,11 @@ BOVINE = \
        ${bovinedir}/make-by.el \
        ${bovinedir}/scm-by.el
 
-## FIXME Should include this one too:
-##     ${cedetdir}/semantic/grammar-wy.el
-## but semantic/grammar.el (which is what we use to generate grammar-wy.el)
-## requires it!  https://debbugs.gnu.org/16008
-WISENT = \
-       ${wisentdir}/javat-wy.el \
-       ${wisentdir}/js-wy.el \
-       ${wisentdir}/python-wy.el \
+WISENT =                                  \
+       ${cedetdir}/semantic/grammar-wy.el \
+       ${wisentdir}/javat-wy.el           \
+       ${wisentdir}/js-wy.el              \
+       ${wisentdir}/python-wy.el          \
        ${cedetdir}/srecode/srt-wy.el
 
 ALL = ${BOVINE} ${WISENT}
diff --git a/admin/update_autogen b/admin/update_autogen
index 35c391d..11c4313 100755
--- a/admin/update_autogen
+++ b/admin/update_autogen
@@ -317,7 +317,7 @@ EOF
 echo "Finding loaddef targets..."
 
 find lisp -name '*.el' -exec grep '^;.*generated-autoload-file:' {} + | \
-    sed -e '/loaddefs\|esh-groups/d' -e 's|/[^/]*: "|/|' -e 's/"//g' \
+    sed -e '/loaddefs\|esh-groups/d' -e 's|/[^/]*: "|/|' -e 's/"//g'    \
     >| $tempfile || die "Error finding targets"
 
 genfiles=
@@ -363,17 +363,23 @@ make -C lisp "$@" autoloads EMACS=../src/bootstrap-emacs 
|| die "make src error"
 
 
 ## Ignore comment differences.
-[ ! "$lboot_flag" ] || \
+[ ! "$lboot_flag" ] ||                      \
     diff -q -I '^;' $ldefs_in $ldefs_out || \
     cp $ldefs_in $ldefs_out || die "cp ldefs_boot error"
 
+# Refresh the prebuilt grammar-wy.el
+grammar_in=lisp/cedet/semantic/grammar-wy.el
+grammar_out=lisp/cedet/semantic/grm-wy-boot.el
+make -C admin/grammars/ ../../$grammar_in
+cp $grammar_in $grammar_out || die "cp grm_wy_boot error"
+
 
 echo "Checking status of loaddef files..."
 
 ## It probably would be fine to just check+commit lisp/, since
 ## making autoloads should not effect any other files.  But better
 ## safe than sorry.
-modified=$(status $genfiles $ldefs_out) || die
+modified=$(status $genfiles $ldefs_out $grammar_out) || die
 
 
 commit "loaddefs" $modified || die "commit error"
diff --git a/lisp/cedet/semantic/grammar.el b/lisp/cedet/semantic/grammar.el
index dba289f..4c3bb6c 100644
--- a/lisp/cedet/semantic/grammar.el
+++ b/lisp/cedet/semantic/grammar.el
@@ -31,7 +31,12 @@
 (require 'semantic/format)
 ;; FIXME this is a generated file, but we need to load this file to
 ;; generate it!
-(require 'semantic/grammar-wy)
+;; We need `semantic/grammar-wy.el' but we're also needed to generate
+;; that file from `grammar.wy', so to break the dependency, we keep
+;; a bootstrap copy of `grammar-wy.el' in `grm-wy-boot.el'.  See bug#16008.
+(eval-and-compile
+  (unless (require 'semantic/grammar-wy nil t)
+    (load "semantic/grm-wy-boot")))
 (require 'semantic/idle)
 (require 'help-fns)
 (require 'semantic/analyze)
diff --git a/lisp/cedet/semantic/grammar-wy.el 
b/lisp/cedet/semantic/grm-wy-boot.el
similarity index 100%
rename from lisp/cedet/semantic/grammar-wy.el
rename to lisp/cedet/semantic/grm-wy-boot.el
diff --git a/lisp/emacs-lisp/eieio-base.el b/lisp/emacs-lisp/eieio-base.el
index ec1077d..641882c 100644
--- a/lisp/emacs-lisp/eieio-base.el
+++ b/lisp/emacs-lisp/eieio-base.el
@@ -1,7 +1,6 @@
 ;;; eieio-base.el --- Base classes for EIEIO.  -*- lexical-binding:t -*-
 
-;;; Copyright (C) 2000-2002, 2004-2005, 2007-2021 Free Software
-;;; Foundation, Inc.
+;; Copyright (C) 2000-2021  Free Software Foundation, Inc.
 
 ;; Author: Eric M. Ludlam <zappo@gnu.org>
 ;; Keywords: OO, lisp



reply via email to

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