Vous avez reçu un message "Your GitLab account has been locked ..." ? Pas d'inquiétude : lisez cet article https://docs.gricad-pages.univ-grenoble-alpes.fr/help/unlock/

Makefile.menhir 1.86 KB
Newer Older
1
2
3
4
5
6
7
8
#######################################################################
#                                                                     #
#              The Compcert verified compiler                         #
#                                                                     #
#        François Pottier, INRIA Paris-Rocquencourt                   #
#                                                                     #
#  Copyright Institut National de Recherche en Informatique et en     #
#  Automatique.  All rights reserved.  This file is distributed       #
9
10
11
12
13
#  under the terms of the GNU Lesser General Public License as        #
#  published by the Free Software Foundation, either version 2.1 of   #
#  the License, or (at your option) any later version.                #
#  This file is also distributed under the terms of the               #
#  INRIA Non-Commercial License Agreement.                            #
14
15
16
#                                                                     #
#######################################################################

17
18
# This is a Makefile fragment for Menhir-specific aspects.

19
20
# Executable.

21
MENHIR = menhir
22

23
24
25
26
27
# This flag can be set to true or false. It controls whether we use
# Menhir's table back-end or code back-end. The table back-end is a
# bit slower, but supports more features, including advanced error
# reporting.

28
MENHIR_TABLE = true
29

30
# To pass or not to pass --table.
31
32

ifeq ($(MENHIR_TABLE),true)
33
  MENHIR_MODE = --table
34
else
35
  MENHIR_MODE =
36
37
38
39
40
41
42
43
44
endif

# Options.

MENHIR_FLAGS = -v --no-stdlib -la 1

# Using Menhir in --table mode requires MenhirLib.

ifeq ($(MENHIR_TABLE),true)
45
46
47
48
49
  ifeq ($(wildcard $(MENHIR_DIR)/menhirLib.cmxa),)
    MENHIR_LIBS = menhirLib.cmx
  else
    MENHIR_LIBS = menhirLib.cmxa
  endif
50
51
52
53
54
55
56
else
  MENHIR_LIBS =
endif

# The compilation rule.

%.ml %.mli: %.mly
57
	$(MENHIR) $(MENHIR_MODE) $(MENHIR_FLAGS) $<