aboutsummaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
authorGlenn Morris2021-04-04 16:57:55 -0700
committerGlenn Morris2021-04-04 16:57:55 -0700
commit9cb3db0bade2ea43bad9cadc7864887c09bc7cd0 (patch)
tree1eace9fefdb6170ad5ecd8f03012bea03dbf7685 /admin
parent258a17855becd8ab914a9bcf063e43801e704781 (diff)
downloademacs-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.
Diffstat (limited to 'admin')
-rw-r--r--admin/grammars/Makefile.in20
1 files changed, 10 insertions, 10 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@
34unexport EMACSDATA EMACSDOC EMACSPATH 34unexport EMACSDATA EMACSDOC EMACSPATH
35 35
36EMACS = ${top_builddir}/src/emacs 36EMACS = ${top_builddir}/src/emacs
37emacs = EMACSLOADPATH= "${EMACS}" -batch --no-site-file --no-site-lisp 37emacs = EMACSLOADPATH= "${EMACS}" -batch --no-site-file --no-site-lisp --eval '(setq load-prefer-newer t)'
38 38
39make_bovine = ${emacs} -l semantic/bovine/grammar -f bovine-batch-make-parser 39make_bovine = ${emacs} -l semantic/bovine/grammar -f bovine-batch-make-parser
40make_wisent = ${emacs} -l semantic/wisent/grammar -f wisent-batch-make-parser 40make_wisent = ${emacs} -l semantic/wisent/grammar -f wisent-batch-make-parser
@@ -43,6 +43,9 @@ cedetdir = ${top_srcdir}/lisp/cedet
43bovinedir = ${cedetdir}/semantic/bovine 43bovinedir = ${cedetdir}/semantic/bovine
44wisentdir = ${cedetdir}/semantic/wisent 44wisentdir = ${cedetdir}/semantic/wisent
45 45
46grammar_bovine = ${bovinedir}/grammar.el
47grammar_wisent = ${wisentdir}/grammar.el
48
46BOVINE = \ 49BOVINE = \
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
69wisent: ${WISENT} 72wisent: ${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
103distclean: 103distclean: