diff options
| author | Glenn Morris | 2021-04-04 16:57:55 -0700 |
|---|---|---|
| committer | Glenn Morris | 2021-04-04 16:57:55 -0700 |
| commit | 9cb3db0bade2ea43bad9cadc7864887c09bc7cd0 (patch) | |
| tree | 1eace9fefdb6170ad5ecd8f03012bea03dbf7685 | |
| parent | 258a17855becd8ab914a9bcf063e43801e704781 (diff) | |
| download | emacs-9cb3db0bade2ea43bad9cadc7864887c09bc7cd0.tar.gz emacs-9cb3db0bade2ea43bad9cadc7864887c09bc7cd0.zip | |
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.
| -rw-r--r-- | admin/grammars/Makefile.in | 20 | ||||
| -rw-r--r-- | lisp/cedet/semantic/bovine/grammar.el | 2 | ||||
| -rw-r--r-- | 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 1573eb3bde9..35ce55461f3 100644 --- a/admin/grammars/Makefile.in +++ b/admin/grammars/Makefile.in | |||
| @@ -34,7 +34,7 @@ top_builddir = @top_builddir@ | |||
| 34 | unexport EMACSDATA EMACSDOC EMACSPATH | 34 | unexport EMACSDATA EMACSDOC EMACSPATH |
| 35 | 35 | ||
| 36 | EMACS = ${top_builddir}/src/emacs | 36 | EMACS = ${top_builddir}/src/emacs |
| 37 | emacs = EMACSLOADPATH= "${EMACS}" -batch --no-site-file --no-site-lisp | 37 | emacs = EMACSLOADPATH= "${EMACS}" -batch --no-site-file --no-site-lisp --eval '(setq load-prefer-newer t)' |
| 38 | 38 | ||
| 39 | make_bovine = ${emacs} -l semantic/bovine/grammar -f bovine-batch-make-parser | 39 | make_bovine = ${emacs} -l semantic/bovine/grammar -f bovine-batch-make-parser |
| 40 | make_wisent = ${emacs} -l semantic/wisent/grammar -f wisent-batch-make-parser | 40 | make_wisent = ${emacs} -l semantic/wisent/grammar -f wisent-batch-make-parser |
| @@ -43,6 +43,9 @@ cedetdir = ${top_srcdir}/lisp/cedet | |||
| 43 | bovinedir = ${cedetdir}/semantic/bovine | 43 | bovinedir = ${cedetdir}/semantic/bovine |
| 44 | wisentdir = ${cedetdir}/semantic/wisent | 44 | wisentdir = ${cedetdir}/semantic/wisent |
| 45 | 45 | ||
| 46 | grammar_bovine = ${bovinedir}/grammar.el | ||
| 47 | grammar_wisent = ${wisentdir}/grammar.el | ||
| 48 | |||
| 46 | BOVINE = \ | 49 | BOVINE = \ |
| 47 | ${bovinedir}/c-by.el \ | 50 | ${bovinedir}/c-by.el \ |
| 48 | ${bovinedir}/make-by.el \ | 51 | ${bovinedir}/make-by.el \ |
| @@ -68,36 +71,33 @@ bovine: ${BOVINE} | |||
| 68 | 71 | ||
| 69 | wisent: ${WISENT} | 72 | wisent: ${WISENT} |
| 70 | 73 | ||
| 71 | ## TODO add dependencies on semantic/{bovine,wisent}/grammar.el | ||
| 72 | |||
| 73 | ## c-by.el, make-by.el. | 74 | ## c-by.el, make-by.el. |
| 74 | ${bovinedir}/%-by.el: ${srcdir}/%.by | 75 | ${bovinedir}/%-by.el: ${srcdir}/%.by ${grammar_bovine} |
| 75 | $(AM_V_GEN)[ ! -f "$@" ] || chmod +w "$@" | 76 | $(AM_V_GEN)[ ! -f "$@" ] || chmod +w "$@" |
| 76 | $(AM_V_at)${make_bovine} -o "$@" $< | 77 | $(AM_V_at)${make_bovine} -o "$@" $< |
| 77 | 78 | ||
| 78 | ${bovinedir}/scm-by.el: ${srcdir}/scheme.by | 79 | ${bovinedir}/scm-by.el: ${srcdir}/scheme.by ${grammar_bovine} |
| 79 | $(AM_V_GEN)[ ! -f "$@" ] || chmod +w "$@" | 80 | $(AM_V_GEN)[ ! -f "$@" ] || chmod +w "$@" |
| 80 | $(AM_V_at)${make_bovine} -o "$@" $< | 81 | $(AM_V_at)${make_bovine} -o "$@" $< |
| 81 | 82 | ||
| 82 | ## grammar-wy.el | 83 | ## grammar-wy.el |
| 83 | ${cedetdir}/semantic/%-wy.el: ${srcdir}/%.wy | 84 | ${cedetdir}/semantic/%-wy.el: ${srcdir}/%.wy ${grammar_wisent} |
| 84 | $(AM_V_GEN)[ ! -f "$@" ] || chmod +w "$@" | 85 | $(AM_V_GEN)[ ! -f "$@" ] || chmod +w "$@" |
| 85 | $(AM_V_at)${make_wisent} -o "$@" $< | 86 | $(AM_V_at)${make_wisent} -o "$@" $< |
| 86 | 87 | ||
| 87 | ## js-wy.el, python-wy.el | 88 | ## js-wy.el, python-wy.el |
| 88 | ${wisentdir}/%-wy.el: ${srcdir}/%.wy | 89 | ${wisentdir}/%-wy.el: ${srcdir}/%.wy ${grammar_wisent} |
| 89 | $(AM_V_GEN)[ ! -f "$@" ] || chmod +w "$@" | 90 | $(AM_V_GEN)[ ! -f "$@" ] || chmod +w "$@" |
| 90 | $(AM_V_at)${make_wisent} -o "$@" $< | 91 | $(AM_V_at)${make_wisent} -o "$@" $< |
| 91 | 92 | ||
| 92 | ${wisentdir}/javat-wy.el: ${srcdir}/java-tags.wy | 93 | ${wisentdir}/javat-wy.el: ${srcdir}/java-tags.wy ${grammar_wisent} |
| 93 | $(AM_V_GEN)[ ! -f "$@" ] || chmod +w "$@" | 94 | $(AM_V_GEN)[ ! -f "$@" ] || chmod +w "$@" |
| 94 | $(AM_V_at)${make_wisent} -o "$@" $< | 95 | $(AM_V_at)${make_wisent} -o "$@" $< |
| 95 | 96 | ||
| 96 | ${cedetdir}/srecode/srt-wy.el: ${srcdir}/srecode-template.wy | 97 | ${cedetdir}/srecode/srt-wy.el: ${srcdir}/srecode-template.wy ${grammar_wisent} |
| 97 | $(AM_V_GEN)[ ! -f "$@" ] || chmod +w "$@" | 98 | $(AM_V_GEN)[ ! -f "$@" ] || chmod +w "$@" |
| 98 | $(AM_V_at)${make_wisent} -o "$@" $< | 99 | $(AM_V_at)${make_wisent} -o "$@" $< |
| 99 | 100 | ||
| 100 | |||
| 101 | .PHONY: distclean bootstrap-clean maintainer-clean extraclean gen-clean | 101 | .PHONY: distclean bootstrap-clean maintainer-clean extraclean gen-clean |
| 102 | 102 | ||
| 103 | distclean: | 103 | distclean: |
diff --git a/lisp/cedet/semantic/bovine/grammar.el b/lisp/cedet/semantic/bovine/grammar.el index a5b9873445e..a2717d711fe 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.") | |||
| 475 | (with-current-buffer (find-file-noselect infile) | 475 | (with-current-buffer (find-file-noselect infile) |
| 476 | (setq infile buffer-file-name) | 476 | (setq infile buffer-file-name) |
| 477 | (if outdir (setq default-directory outdir)) | 477 | (if outdir (setq default-directory outdir)) |
| 478 | (semantic-grammar-create-package nil t)) | 478 | (semantic-grammar-create-package t t)) |
| 479 | (error (message "%s" (error-message-string err)) nil))) | 479 | (error (message "%s" (error-message-string err)) nil))) |
| 480 | lang filename copyright-end) | 480 | lang filename copyright-end) |
| 481 | (when (and packagename | 481 | (when (and packagename |
diff --git a/lisp/cedet/semantic/wisent/grammar.el b/lisp/cedet/semantic/wisent/grammar.el index 465d4720031..c5e4554082e 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.") | |||
| 477 | (condition-case err | 477 | (condition-case err |
| 478 | (with-current-buffer (find-file-noselect infile) | 478 | (with-current-buffer (find-file-noselect infile) |
| 479 | (if outdir (setq default-directory outdir)) | 479 | (if outdir (setq default-directory outdir)) |
| 480 | (semantic-grammar-create-package nil t)) | 480 | (semantic-grammar-create-package t t)) |
| 481 | (error (message "%s" (error-message-string err)) nil))) | 481 | (error (message "%s" (error-message-string err)) nil))) |
| 482 | output-data) | 482 | output-data) |
| 483 | (when (setq output-data (assoc packagename wisent-make-parsers--parser-file-name)) | 483 | (when (setq output-data (assoc packagename wisent-make-parsers--parser-file-name)) |