2004-10-08 03:10:52 +02:00
|
|
|
##===- utils/Burg/Makefile ---------------------------------*- Makefile -*-===##
|
2003-10-21 00:29:16 +02:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
#
|
|
|
|
##===----------------------------------------------------------------------===##
|
2003-10-05 21:27:59 +02:00
|
|
|
LEVEL = ../..
|
|
|
|
TOOLNAME = burg
|
2004-10-30 11:19:36 +02:00
|
|
|
BUILT_SOURCES = gram.tab.c gram.tab.h
|
2003-10-05 21:27:59 +02:00
|
|
|
|
2004-10-26 05:12:11 +02:00
|
|
|
EXTRA_DIST = gram.yc gram.tab.c gram.tab.h sample.gr
|
|
|
|
|
2003-10-05 21:27:59 +02:00
|
|
|
include $(LEVEL)/Makefile.common
|
|
|
|
|
2004-10-23 01:05:46 +02:00
|
|
|
gram.tab.c gram.tab.h: gram.yc
|
2004-10-30 11:19:36 +02:00
|
|
|
$(Verb) $(BISON) -o gram.tab.c -d $<
|
2003-10-05 21:27:59 +02:00
|
|
|
|
2004-10-30 11:19:36 +02:00
|
|
|
$(ObjDir)/lex.o : gram.tab.h
|
2003-10-05 21:27:59 +02:00
|
|
|
|
|
|
|
clean::
|
2004-10-30 11:19:36 +02:00
|
|
|
$(Verb) $(RM) -rf gram.tab.h gram.tab.c core* *.aux *.log *.dvi sample sample.c tmp
|
2003-10-05 21:27:59 +02:00
|
|
|
|
|
|
|
doc.dvi: doc.tex
|
2004-10-30 11:19:36 +02:00
|
|
|
$(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
|
2003-10-05 21:27:59 +02:00
|
|
|
$(RM) -f tmp sample.c
|