emacs-diffs
[Top][All Lists]
Advanced

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

master 9cb3db0: Regenerate semantic grammars if the generating code chan


From: Glenn Morris
Subject: master 9cb3db0: Regenerate semantic grammars if the generating code changes
Date: Sun, 4 Apr 2021 19:58:40 -0400 (EDT)

branch: master
commit 9cb3db0bade2ea43bad9cadc7864887c09bc7cd0
Author: Glenn Morris <rgm@gnu.org>
Commit: Glenn Morris <rgm@gnu.org>

    Regenerate semantic grammars if the generating code changes
    
    * admin/grammars/Makefile.in (emacs): Set load-prefer-newer.
    (grammar_bovine, grammar_wisent): New variables.
    (${bovinedir}/%-by.el, ${bovinedir}/scm-by.el)
    (${cedetdir}/semantic/%-wy.el, ${wisentdir}/%-wy.el)
    (${wisentdir}/javat-wy.el, ${cedetdir}/srecode/srt-wy.el):
    Depend on the source file for the generating function.
    * lisp/cedet/semantic/bovine/grammar.el (bovine--make-parser-1):
    * lisp/cedet/semantic/wisent/grammar.el (wisent--make-parser-1):
    Force generation of the output file.  The previous "is the output
    newer than the input" failed to account for changes in the
    generation code itself.  Force so we can let make figure it out.
---
 admin/grammars/Makefile.in            | 20 ++++++++++----------
 lisp/cedet/semantic/bovine/grammar.el |  2 +-
 lisp/cedet/semantic/wisent/grammar.el |  2 +-
 3 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/admin/grammars/Makefile.in b/admin/grammars/Makefile.in
index 1573eb3..35ce554 100644
--- a/admin/grammars/Makefile.in
+++ b/admin/grammars/Makefile.in
@@ -34,7 +34,7 @@ top_builddir = @top_builddir@
 unexport EMACSDATA EMACSDOC EMACSPATH
 
 EMACS = ${top_builddir}/src/emacs
-emacs = EMACSLOADPATH= "${EMACS}" -batch --no-site-file --no-site-lisp
+emacs = EMACSLOADPATH= "${EMACS}" -batch --no-site-file --no-site-lisp --eval 
'(setq load-prefer-newer t)'
 
 make_bovine = ${emacs} -l semantic/bovine/grammar -f bovine-batch-make-parser
 make_wisent = ${emacs} -l semantic/wisent/grammar -f wisent-batch-make-parser
@@ -43,6 +43,9 @@ cedetdir = ${top_srcdir}/lisp/cedet
 bovinedir = ${cedetdir}/semantic/bovine
 wisentdir = ${cedetdir}/semantic/wisent
 
+grammar_bovine = ${bovinedir}/grammar.el
+grammar_wisent = ${wisentdir}/grammar.el
+
 BOVINE = \
        ${bovinedir}/c-by.el \
        ${bovinedir}/make-by.el \
@@ -68,36 +71,33 @@ bovine: ${BOVINE}
 
 wisent: ${WISENT}
 
-## TODO add dependencies on semantic/{bovine,wisent}/grammar.el
-
 ## c-by.el, make-by.el.
-${bovinedir}/%-by.el: ${srcdir}/%.by
+${bovinedir}/%-by.el: ${srcdir}/%.by ${grammar_bovine}
        $(AM_V_GEN)[ ! -f "$@" ] || chmod +w "$@"
        $(AM_V_at)${make_bovine} -o "$@" $<
 
-${bovinedir}/scm-by.el: ${srcdir}/scheme.by
+${bovinedir}/scm-by.el: ${srcdir}/scheme.by ${grammar_bovine}
        $(AM_V_GEN)[ ! -f "$@" ] || chmod +w "$@"
        $(AM_V_at)${make_bovine} -o "$@" $<
 
 ## grammar-wy.el
-${cedetdir}/semantic/%-wy.el: ${srcdir}/%.wy
+${cedetdir}/semantic/%-wy.el: ${srcdir}/%.wy ${grammar_wisent}
        $(AM_V_GEN)[ ! -f "$@" ] || chmod +w "$@"
        $(AM_V_at)${make_wisent} -o "$@" $<
 
 ## js-wy.el, python-wy.el
-${wisentdir}/%-wy.el: ${srcdir}/%.wy
+${wisentdir}/%-wy.el: ${srcdir}/%.wy ${grammar_wisent}
        $(AM_V_GEN)[ ! -f "$@" ] || chmod +w "$@"
        $(AM_V_at)${make_wisent} -o "$@" $<
 
-${wisentdir}/javat-wy.el: ${srcdir}/java-tags.wy
+${wisentdir}/javat-wy.el: ${srcdir}/java-tags.wy ${grammar_wisent}
        $(AM_V_GEN)[ ! -f "$@" ] || chmod +w "$@"
        $(AM_V_at)${make_wisent} -o "$@" $<
 
-${cedetdir}/srecode/srt-wy.el: ${srcdir}/srecode-template.wy
+${cedetdir}/srecode/srt-wy.el: ${srcdir}/srecode-template.wy ${grammar_wisent}
        $(AM_V_GEN)[ ! -f "$@" ] || chmod +w "$@"
        $(AM_V_at)${make_wisent} -o "$@" $<
 
-
 .PHONY: distclean bootstrap-clean maintainer-clean extraclean gen-clean
 
 distclean:
diff --git a/lisp/cedet/semantic/bovine/grammar.el 
b/lisp/cedet/semantic/bovine/grammar.el
index a5b9873..a2717d7 100644
--- a/lisp/cedet/semantic/bovine/grammar.el
+++ b/lisp/cedet/semantic/bovine/grammar.el
@@ -475,7 +475,7 @@ Menu items are appended to the common grammar menu.")
             (with-current-buffer (find-file-noselect infile)
               (setq infile buffer-file-name)
               (if outdir (setq default-directory outdir))
-              (semantic-grammar-create-package nil t))
+              (semantic-grammar-create-package t t))
           (error (message "%s" (error-message-string err)) nil)))
        lang filename copyright-end)
     (when (and packagename
diff --git a/lisp/cedet/semantic/wisent/grammar.el 
b/lisp/cedet/semantic/wisent/grammar.el
index 465d472..c5e4554 100644
--- a/lisp/cedet/semantic/wisent/grammar.el
+++ b/lisp/cedet/semantic/wisent/grammar.el
@@ -477,7 +477,7 @@ Menu items are appended to the common grammar menu.")
         (condition-case err
             (with-current-buffer (find-file-noselect infile)
               (if outdir (setq default-directory outdir))
-              (semantic-grammar-create-package nil t))
+              (semantic-grammar-create-package t t))
           (error (message "%s" (error-message-string err)) nil)))
        output-data)
     (when (setq output-data (assoc packagename 
wisent-make-parsers--parser-file-name))



reply via email to

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