summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2021-04-12 21:55:50 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2021-04-12 22:10:38 -0400
commit214dfbfea0cc7d64704aa4a258da542435c44cbb (patch)
tree41210dc029b82d4590486f2bb8458fae3af24a70
parentfc3caa45ef2dcbd5a1c8339f14696589b99888ce (diff)
downloademacs-214dfbfea0cc7d64704aa4a258da542435c44cbb.tar.gz
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`.
-rw-r--r--.gitignore1
-rw-r--r--admin/grammars/Makefile.in13
-rwxr-xr-xadmin/update_autogen12
-rw-r--r--lisp/cedet/semantic/grammar.el7
-rw-r--r--lisp/cedet/semantic/grm-wy-boot.el (renamed from lisp/cedet/semantic/grammar-wy.el)0
-rw-r--r--lisp/emacs-lisp/eieio-base.el3
6 files changed, 22 insertions, 14 deletions
diff --git a/.gitignore b/.gitignore
index a1e3cb92f87..c262f39126d 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 35ce55461f3..4172411e034 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 35c391da19e..11c4313ae37 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 dba289fdd75..4c3bb6c238b 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
index b3014034374..b3014034374 100644
--- a/lisp/cedet/semantic/grammar-wy.el
+++ b/lisp/cedet/semantic/grm-wy-boot.el
diff --git a/lisp/emacs-lisp/eieio-base.el b/lisp/emacs-lisp/eieio-base.el
index ec1077d447e..641882c9026 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