Move lisp/emacs-lisp/authors.el to admin/
[bpt/emacs.git] / admin / grammars / Makefile.in
CommitLineData
f9b697dd
GM
1### @configure_input@
2
ba318903 3## Copyright (C) 2013-2014 Free Software Foundation, Inc.
f9b697dd
GM
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
25SHELL = @SHELL@
26
27srcdir = @srcdir@
28top_srcdir = @top_srcdir@
29top_builddir = @top_builddir@
30
e088b01d
GM
31# Prevent any settings in the user environment causing problems.
32unexport EMACSDATA EMACSDOC EMACSPATH
33
f9b697dd
GM
34EMACS = ${top_builddir}/src/emacs
35emacs = EMACSLOADPATH= "${EMACS}" -batch --no-site-file --no-site-lisp
36
37make_bovine = ${emacs} -l semantic/bovine/grammar -f bovine-batch-make-parser
38make_wisent = ${emacs} -l semantic/wisent/grammar -f wisent-batch-make-parser
39
40cedetdir = ${top_srcdir}/lisp/cedet
41bovinedir = ${cedetdir}/semantic/bovine
42wisentdir = ${cedetdir}/semantic/wisent
43
44BOVINE = \
45 ${bovinedir}/c-by.el \
46 ${bovinedir}/make-by.el \
47 ${bovinedir}/scm-by.el
48
49## FIXME Should include this one too:
50## ${cedetdir}/semantic/grammar-wy.el
51## but semantic/grammar.el (which is what we use to generate grammar-wy.el)
52## requires it!
53WISENT = \
54 ${wisentdir}/javat-wy.el \
55 ${wisentdir}/js-wy.el \
56 ${wisentdir}/python-wy.el \
57 ${cedetdir}/srecode/srt-wy.el
58
59ALL = ${BOVINE} ${WISENT}
60
61.PHONY: all bovine wisent
62
63all: ${ALL}
64
65bovine: ${BOVINE}
66
67wisent: ${WISENT}
68
4f2a67ac
GM
69## c-by.el, make-by.el.
70${bovinedir}/%-by.el: ${srcdir}/%.by
d715c019 71 [ ! -f "$@" ] || chmod +w "$@"
4f2a67ac 72 ${make_bovine} -o "$@" $<
f9b697dd
GM
73
74${bovinedir}/scm-by.el: ${srcdir}/scheme.by
d715c019 75 [ ! -f "$@" ] || chmod +w "$@"
4f2a67ac 76 ${make_bovine} -o "$@" $<
f9b697dd 77
4f2a67ac
GM
78## grammar-wy.el
79${cedetdir}/semantic/%-wy.el: ${srcdir}/%.wy
d715c019 80 [ ! -f "$@" ] || chmod +w "$@"
4f2a67ac 81 ${make_wisent} -o "$@" $<
f9b697dd 82
4f2a67ac
GM
83## js-wy.el, python-wy.el
84${wisentdir}/%-wy.el: ${srcdir}/%.wy
d715c019 85 [ ! -f "$@" ] || chmod +w "$@"
4f2a67ac 86 ${make_wisent} -o "$@" $<
f9b697dd 87
4f2a67ac 88${wisentdir}/javat-wy.el: ${srcdir}/java-tags.wy
d715c019 89 [ ! -f "$@" ] || chmod +w "$@"
4f2a67ac 90 ${make_wisent} -o "$@" $<
f9b697dd
GM
91
92${cedetdir}/srecode/srt-wy.el: ${srcdir}/srecode-template.wy
d715c019 93 [ ! -f "$@" ] || chmod +w "$@"
4f2a67ac 94 ${make_wisent} -o "$@" $<
f9b697dd
GM
95
96
97.PHONY: distclean bootstrap-clean maintainer-clean extraclean
98
99distclean:
100 rm -f Makefile
101
102bootstrap-clean maintainer-clean: distclean
103
104## We do not normally delete the generated files, even in bootstrap.
105## Creating them does not take long, so we could easily change this.
106extraclean:
107 rm -f ${ALL}
108
109# Makefile.in ends here