summaryrefslogtreecommitdiff
path: root/utils/Burg/Makefile
blob: f40f3eb71d8128b218390236df18bd5e39c7fb50 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
##===- utils/Burg/Makefile ---------------------------------*- Makefile -*-===##
# 
#                     The LLVM Compiler Infrastructure
#
# This file was developed by the LLVM research group and is distributed under
# the University of Illinois Open Source License. See LICENSE.TXT for details.
# 
##===----------------------------------------------------------------------===##
LEVEL = ../..
TOOLNAME = burg
BUILT_SOURCES = gram.tab.c gram.tab.h

EXTRA_DIST = gram.yc gram.tab.c gram.tab.h sample.gr burg.shar.gz COPYRIGHT Doc

include $(LEVEL)/Makefile.common

gram.tab.c gram.tab.h: gram.yc
	$(Verb) $(BISON) -o gram.tab.c -d $<

$(ObjDir)/lex.o : gram.tab.h

clean::
	$(Verb) $(RM) -rf gram.tab.h gram.tab.c core* *.aux *.log *.dvi sample sample.c tmp

doc.dvi: doc.tex
	$(Verb) latex doc; latex doc

check:: $(ToolBuildPath) $(BUILD_SRC_DIR)/sample.gr
	$(ToolBuildPath) -I <$(BUILD_SRC_DIR)/sample.gr   >sample.c \
	  && $(CC) $(CFLAGS) -o sample sample.c && ./sample
	$(ToolBuildPath) -I      $(BUILD_SRC_DIR)/sample.gr   >tmp \
	  && cmp tmp sample.c
	$(ToolBuildPath) -I     <$(BUILD_SRC_DIR)/sample.gr -o tmp \
	  && cmp tmp sample.c
	$(ToolBuildPath) -I      $(BUILD_SRC_DIR)/sample.gr -o tmp \
	  && cmp tmp sample.c
	$(ToolBuildPath) -I -O0 <$(BUILD_SRC_DIR)/sample.gr   >tmp \
	  && cmp tmp sample.c
	$(ToolBuildPath) -I -=  <$(BUILD_SRC_DIR)/sample.gr   >tmp \
	  && cmp tmp sample.c
	$(RM) -f tmp sample.c