diff options
| author | Glenn Morris | 2013-11-29 18:06:34 -0800 |
|---|---|---|
| committer | Glenn Morris | 2013-11-29 18:06:34 -0800 |
| commit | f9b697ddaa60742d4a60b1fa4ab37efc2c3cb1e1 (patch) | |
| tree | 2983eafdf74ab173b7072c5722f0ef64525814d6 /admin | |
| parent | a64133bd252caf29a0a3ab6732ac1c76c91e17cb (diff) | |
| download | emacs-f9b697ddaa60742d4a60b1fa4ab37efc2c3cb1e1.tar.gz emacs-f9b697ddaa60742d4a60b1fa4ab37efc2c3cb1e1.zip | |
Stop keeping (all but one) generated cedet grammar files in the repository
* configure.ac (SUBDIR_MAKEFILES, AC_CONFIG_FILES):
Add admin/grammars Makefile.
* Makefile.in (distclean, bootstrap-clean, maintainer-clean):
Also clean admin/grammars, if present.
* admin/grammars/README: Remove.
* admin/grammars/Makefile.in: New file.
* admin/grammars/c.by, admin/grammars/java-tags.wy, admin/grammars/js.wy:
* admin/grammars/python.wy: Update declarations to match generated outputs.
* lisp/Makefile.in (semantic): New.
(compile-main): Depend on semantic.
* lisp/cedet/semantic/bovine/grammar.el (bovine--make-parser-1):
New function, split from bovine-make-parsers.
(bovine-make-parsers): Use bovine--make-parser-1.
(bovine-batch-make-parser): New function.
* lisp/cedet/semantic/wisent/grammar.el (wisent--make-parser-1):
New function, split from wisent-make-parsers.
(wisent-make-parsers): Use wisent--make-parser-1.
(wisent-batch-make-parser): New function.
* lisp/cedet/semantic/db.el (semanticdb-save-all-db):
Avoid prompting in batch mode.
* lisp/cedet/semantic/grammar.el (semantic-grammar-footer-template):
Disable version-control and autoloads in the output.
(semantic-grammar-create-package):
Add option to return nil if output is up-to-date.
* lisp/cedet/semantic/bovine/c-by.el, lisp/cedet/semantic/bovine/make-by.el:
* lisp/cedet/semantic/bovine/scm-by.el, 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: Remove generated files from repository.
* .bzrignore: Update for this.
Diffstat (limited to 'admin')
| -rw-r--r-- | admin/ChangeLog | 8 | ||||
| -rw-r--r-- | admin/grammars/Makefile.in | 105 | ||||
| -rw-r--r-- | admin/grammars/README | 11 | ||||
| -rw-r--r-- | admin/grammars/c.by | 10 | ||||
| -rw-r--r-- | admin/grammars/java-tags.wy | 5 | ||||
| -rw-r--r-- | admin/grammars/js.wy | 6 | ||||
| -rw-r--r-- | admin/grammars/python.wy | 8 |
7 files changed, 137 insertions, 16 deletions
diff --git a/admin/ChangeLog b/admin/ChangeLog index c9930c7023a..d70056f001e 100644 --- a/admin/ChangeLog +++ b/admin/ChangeLog | |||
| @@ -1,3 +1,11 @@ | |||
| 1 | 2013-11-30 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | Stop keeping (most) generated cedet grammar files in the repository. | ||
| 4 | * grammars/README: Remove. | ||
| 5 | * grammars/Makefile.in: New file. | ||
| 6 | * grammars/c.by, grammars/java-tags.wy, grammars/js.wy: | ||
| 7 | * grammars/python.wy: Update declarations to match generated outputs. | ||
| 8 | |||
| 1 | 2013-11-28 Glenn Morris <rgm@gnu.org> | 9 | 2013-11-28 Glenn Morris <rgm@gnu.org> |
| 2 | 10 | ||
| 3 | * unidata/unidata-gen.el (unidata-gen-files): | 11 | * unidata/unidata-gen.el (unidata-gen-files): |
diff --git a/admin/grammars/Makefile.in b/admin/grammars/Makefile.in new file mode 100644 index 00000000000..94c2e9a6ee2 --- /dev/null +++ b/admin/grammars/Makefile.in | |||
| @@ -0,0 +1,105 @@ | |||
| 1 | ### @configure_input@ | ||
| 2 | |||
| 3 | ## Copyright (C) 2013 Free Software Foundation, Inc. | ||
| 4 | |||
| 5 | ## This file is part of GNU Emacs. | ||
| 6 | |||
| 7 | ## GNU Emacs is free software: you can redistribute it and/or modify | ||
| 8 | ## it under the terms of the GNU General Public License as published by | ||
| 9 | ## the Free Software Foundation, either version 3 of the License, or | ||
| 10 | ## (at your option) any later version. | ||
| 11 | |||
| 12 | ## GNU Emacs is distributed in the hope that it will be useful, | ||
| 13 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 15 | ## GNU General Public License for more details. | ||
| 16 | |||
| 17 | ## You should have received a copy of the GNU General Public License | ||
| 18 | ## along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. | ||
| 19 | |||
| 20 | ### Commentary: | ||
| 21 | |||
| 22 | ## This directory contains grammar files in Bison and Wisent, | ||
| 23 | ## used to generate the parser data in the lisp/cedet directory. | ||
| 24 | |||
| 25 | SHELL = @SHELL@ | ||
| 26 | |||
| 27 | srcdir = @srcdir@ | ||
| 28 | top_srcdir = @top_srcdir@ | ||
| 29 | top_builddir = @top_builddir@ | ||
| 30 | |||
| 31 | EMACS = ${top_builddir}/src/emacs | ||
| 32 | emacs = EMACSLOADPATH= "${EMACS}" -batch --no-site-file --no-site-lisp | ||
| 33 | |||
| 34 | make_bovine = ${emacs} -l semantic/bovine/grammar -f bovine-batch-make-parser | ||
| 35 | make_wisent = ${emacs} -l semantic/wisent/grammar -f wisent-batch-make-parser | ||
| 36 | |||
| 37 | cedetdir = ${top_srcdir}/lisp/cedet | ||
| 38 | bovinedir = ${cedetdir}/semantic/bovine | ||
| 39 | wisentdir = ${cedetdir}/semantic/wisent | ||
| 40 | |||
| 41 | BOVINE = \ | ||
| 42 | ${bovinedir}/c-by.el \ | ||
| 43 | ${bovinedir}/make-by.el \ | ||
| 44 | ${bovinedir}/scm-by.el | ||
| 45 | |||
| 46 | ## FIXME Should include this one too: | ||
| 47 | ## ${cedetdir}/semantic/grammar-wy.el | ||
| 48 | ## but semantic/grammar.el (which is what we use to generate grammar-wy.el) | ||
| 49 | ## requires it! | ||
| 50 | WISENT = \ | ||
| 51 | ${wisentdir}/javat-wy.el \ | ||
| 52 | ${wisentdir}/js-wy.el \ | ||
| 53 | ${wisentdir}/python-wy.el \ | ||
| 54 | ${cedetdir}/srecode/srt-wy.el | ||
| 55 | |||
| 56 | ALL = ${BOVINE} ${WISENT} | ||
| 57 | |||
| 58 | .PHONY: all bovine wisent | ||
| 59 | |||
| 60 | all: ${ALL} | ||
| 61 | |||
| 62 | bovine: ${BOVINE} | ||
| 63 | |||
| 64 | wisent: ${WISENT} | ||
| 65 | |||
| 66 | |||
| 67 | ${bovinedir}/c-by.el: ${srcdir}/c.by | ||
| 68 | ${make_bovine} -o "$@" ${srcdir}/c.by | ||
| 69 | |||
| 70 | ${bovinedir}/make-by.el: ${srcdir}/make.by | ||
| 71 | ${make_bovine} -o "$@" ${srcdir}/make.by | ||
| 72 | |||
| 73 | ${bovinedir}/scm-by.el: ${srcdir}/scheme.by | ||
| 74 | ${make_bovine} -o "$@" ${srcdir}/scheme.by | ||
| 75 | |||
| 76 | |||
| 77 | ${cedetdir}/semantic/grammar-wy.el: ${srcdir}/grammar.wy | ||
| 78 | ${make_wisent} -o "$@" ${srcdir}/grammar.wy | ||
| 79 | |||
| 80 | ${wisentdir}/javat-wy.el: ${srcdir}/java-tags.wy | ||
| 81 | ${make_wisent} -o "$@" ${srcdir}/java-tags.wy | ||
| 82 | |||
| 83 | ${wisentdir}/js-wy.el: ${srcdir}/js.wy | ||
| 84 | ${make_wisent} -o "$@" ${srcdir}/js.wy | ||
| 85 | |||
| 86 | ${wisentdir}/python-wy.el: ${srcdir}/python.wy | ||
| 87 | ${make_wisent} -o "$@" ${srcdir}/python.wy | ||
| 88 | |||
| 89 | ${cedetdir}/srecode/srt-wy.el: ${srcdir}/srecode-template.wy | ||
| 90 | ${make_wisent} -o "$@" ${srcdir}/srecode-template.wy | ||
| 91 | |||
| 92 | |||
| 93 | .PHONY: distclean bootstrap-clean maintainer-clean extraclean | ||
| 94 | |||
| 95 | distclean: | ||
| 96 | rm -f Makefile | ||
| 97 | |||
| 98 | bootstrap-clean maintainer-clean: distclean | ||
| 99 | |||
| 100 | ## We do not normally delete the generated files, even in bootstrap. | ||
| 101 | ## Creating them does not take long, so we could easily change this. | ||
| 102 | extraclean: | ||
| 103 | rm -f ${ALL} | ||
| 104 | |||
| 105 | # Makefile.in ends here | ||
diff --git a/admin/grammars/README b/admin/grammars/README deleted file mode 100644 index e38260952a5..00000000000 --- a/admin/grammars/README +++ /dev/null | |||
| @@ -1,11 +0,0 @@ | |||
| 1 | This directory contains grammar files in Bison and Wisent, used to | ||
| 2 | generate the parser data in the lisp/semantic/bovine/ and | ||
| 3 | lisp/semantic/wisent/ directories. You can run the parser generators | ||
| 4 | with | ||
| 5 | |||
| 6 | emacs -batch -Q -l semantic/bovine/grammar -f bovine-make-parsers | ||
| 7 | emacs -batch -Q -l semantic/wisent/grammar -f wisent-make-parsers | ||
| 8 | |||
| 9 | Currently, the parser files in lisp/ are not generated directly from | ||
| 10 | these grammar files when making Emacs. This state of affairs, and the | ||
| 11 | contents of this directory, will change in a future version of Emacs. | ||
diff --git a/admin/grammars/c.by b/admin/grammars/c.by index 5d2f407e8e3..55ec0fbaf01 100644 --- a/admin/grammars/c.by +++ b/admin/grammars/c.by | |||
| @@ -41,9 +41,13 @@ | |||
| 41 | %provide semantic/bovine/c-by | 41 | %provide semantic/bovine/c-by |
| 42 | 42 | ||
| 43 | %{ | 43 | %{ |
| 44 | (declare-function semantic-c-reconstitute-token "semantic/bovine/c") | 44 | (declare-function semantic-c-reconstitute-token "semantic/bovine/c" |
| 45 | (declare-function semantic-c-reconstitute-template "semantic/bovine/c") | 45 | (tokenpart declmods typedecl)) |
| 46 | (declare-function semantic-expand-c-tag "semantic/bovine/c") | 46 | (declare-function semantic-c-reconstitute-template "semantic/bovine/c" |
| 47 | (tag specifier)) | ||
| 48 | (declare-function semantic-expand-c-tag "semantic/bovine/c" (tag)) | ||
| 49 | (declare-function semantic-parse-region "semantic" | ||
| 50 | (start end &optional nonterminal depth returnonerror)) | ||
| 47 | } | 51 | } |
| 48 | 52 | ||
| 49 | %languagemode c-mode c++-mode | 53 | %languagemode c-mode c++-mode |
diff --git a/admin/grammars/java-tags.wy b/admin/grammars/java-tags.wy index 71607f452a0..3f5c3ad04c6 100644 --- a/admin/grammars/java-tags.wy +++ b/admin/grammars/java-tags.wy | |||
| @@ -25,6 +25,11 @@ | |||
| 25 | %package wisent-java-tags-wy | 25 | %package wisent-java-tags-wy |
| 26 | %provide semantic/wisent/javat-wy | 26 | %provide semantic/wisent/javat-wy |
| 27 | 27 | ||
| 28 | %{ | ||
| 29 | (declare-function semantic-parse-region "semantic" | ||
| 30 | (start end &optional nonterminal depth returnonerror)) | ||
| 31 | } | ||
| 32 | |||
| 28 | %languagemode java-mode | 33 | %languagemode java-mode |
| 29 | 34 | ||
| 30 | ;; The default start symbol | 35 | ;; The default start symbol |
diff --git a/admin/grammars/js.wy b/admin/grammars/js.wy index 3b602296552..a6a358a0ee7 100644 --- a/admin/grammars/js.wy +++ b/admin/grammars/js.wy | |||
| @@ -59,6 +59,12 @@ | |||
| 59 | 59 | ||
| 60 | %package wisent-javascript-jv-wy | 60 | %package wisent-javascript-jv-wy |
| 61 | %provide semantic/wisent/js-wy | 61 | %provide semantic/wisent/js-wy |
| 62 | |||
| 63 | %{ | ||
| 64 | (declare-function semantic-parse-region "semantic" | ||
| 65 | (start end &optional nonterminal depth returnonerror)) | ||
| 66 | } | ||
| 67 | |||
| 62 | ;; JAVE I prefere ecmascript-mode | 68 | ;; JAVE I prefere ecmascript-mode |
| 63 | %languagemode ecmascript-mode javascript-mode | 69 | %languagemode ecmascript-mode javascript-mode |
| 64 | 70 | ||
diff --git a/admin/grammars/python.wy b/admin/grammars/python.wy index 02fb7390b01..b82125d2bc3 100644 --- a/admin/grammars/python.wy +++ b/admin/grammars/python.wy | |||
| @@ -91,8 +91,12 @@ | |||
| 91 | %provide semantic/wisent/python-wy | 91 | %provide semantic/wisent/python-wy |
| 92 | 92 | ||
| 93 | %{ | 93 | %{ |
| 94 | (declare-function wisent-python-reconstitute-function-tag "semantic/wisent/python") | 94 | (declare-function wisent-python-reconstitute-function-tag |
| 95 | (declare-function wisent-python-reconstitute-class-tag "semantic/wisent/python") | 95 | "semantic/wisent/python" (tag suite)) |
| 96 | (declare-function wisent-python-reconstitute-class-tag "semantic/wisent/python" | ||
| 97 | (tag)) | ||
| 98 | (declare-function semantic-parse-region "semantic" | ||
| 99 | (start end &optional nonterminal depth returnonerror)) | ||
| 96 | } | 100 | } |
| 97 | 101 | ||
| 98 | %languagemode python-mode | 102 | %languagemode python-mode |