source: trunk/ada-2012/Makefile@ 399

Last change on this file since 399 was 399, checked in by Maxim Reznik, 5 years ago

Make distinction between index and disriminant constraint

File size: 1.7 KB
Line 
1export GELA_BUILD=$(abspath build)
2AG_DRIVER=$(GELA_BUILD)/ag/ag_driver
3YACC_DRIVER=$(GELA_BUILD)/ag/yacc_driver
4UAFLEX=$(GELA_BUILD)/tools/uaflex-driver
5AST=$(GELA_BUILD)/ada-ast.ag
6AST_STAMP=$(GELA_BUILD)/.stamp-ast
7SYNTAX=src/parser/ada-lalr.ag
8BUILD_CHOP=$(GELA_BUILD)/chop
9BUILD_NODE=$(GELA_BUILD)/node
10LEXER=$(abspath src/lexer/ada.l)
11LEXER_STAMP=$(GELA_BUILD)/.stamp-ada.l
12PARSER=$(GELA_BUILD)/.stamp-ada.p
13
14all: asis tests
15 echo gprbuild -m -j0 -p -P gnat/gela_debug.gpr
16
17asis : $(AST_STAMP) $(LEXER_STAMP) $(PARSER)
18 gprbuild -m -j0 -p -P gnat/gela_build.gpr
19
20$(AST_STAMP): $(AG_DRIVER) $(AST)
21 $(AG_DRIVER) $(AST) > $(AST_STAMP)
22 -mkdir $(BUILD_CHOP)
23 -mkdir $(BUILD_NODE)
24 gnatchop -w $(AST_STAMP) $(BUILD_CHOP)
25
26$(AST): src/ag/*.ag src/ag/main.ag.pp
27 cpp -P src/ag/main.ag.pp $(AST)
28
29$(LEXER_STAMP): $(UAFLEX) $(LEXER)
30 cd $(BUILD_CHOP); $(UAFLEX) --types Gela.Scanner_Types \
31 --handler Gela.Scanner_Handlers --scanner Gela.Scanners \
32 --tokens Gela.Lexical_Types $(LEXER)
33 touch $(LEXER_STAMP)
34
35$(PARSER): $(YACC_DRIVER) $(SYNTAX)
36 $(YACC_DRIVER) $(SYNTAX) > $(PARSER)
37 gnatchop -w $(PARSER) $(BUILD_CHOP)
38
39$(AG_DRIVER) $(YACC_DRIVER):
40 gprbuild -m -j0 -p -P gnat/gela_ag.gpr
41
42$(UAFLEX):
43 gprbuild -m -j0 -p -P gnat/gela_uaflex2.gpr
44
45tests: asis
46 gprbuild -m -j0 -p -P gnat/gela_tester.gpr
47 gprbuild -m -j0 -p -P gnat/gela_grammars_tests.gpr
48 gprbuild -m -j0 -p -P gnat/gela_tests.gpr
49 gprbuild -m -j0 -p -P gnat/gela_asis_tests.gpr
50ifneq ($(realpath compiler),)
51 -$(MAKE) -C compiler tests
52endif
53ifneq ($(realpath tests/asis/asis2xml.gpl),)
54 ADA_PROJECT_PATH=$(ADA_PROJECT_PATH):gnat \
55 gprbuild -m -j0 -p -P tests/asis/asis2xml.gpl/gela2xml.gpr
56endif
57
58check:
59 GELA_INCLUDE_PATH=$(realpath src/adalib/) \
60 $(GELA_BUILD)/gela-test_driver2
Note: See TracBrowser for help on using the repository browser.