blob: 1c2f104764060f5787f7661b6694cf43a518c180 [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001##===- tools/llvm-upgrade/Makefile -------------------------*- Makefile -*-===##
2#
3# The LLVM Compiler Infrastructure
4#
Chris Lattnere692fc82007-12-29 20:07:17 +00005# This file is distributed under the University of Illinois Open Source
6# License. See LICENSE.TXT for details.
Dan Gohmanf17a25c2007-07-18 16:29:46 +00007#
8##===----------------------------------------------------------------------===##
9
10LEVEL = ../..
11TOOLNAME = llvm-upgrade
12LINK_COMPONENTS := Core support system
13REQUIRES_EH := 1
14
15include $(LEVEL)/Makefile.common
16
17# Make the object code file for the lexer depend upon the header file generated
18# by the Bison parser. This prevents the Lexer from being compiled before the
19# header file it needs is built.
20$(ObjDir)/upgradeLexer.o: $(PROJ_SRC_DIR)/UpgradeParser.h
21
22TESTCASE=../../test/Regression/Assembler/2004-09-29-VerifierIsReallySlow.llx
23test:
24 llvm-as $(TESTCASE) -o - | llvm-dis -o source.ll -f
25 ../../Debug/bin/llvm-upgrade -o - $(TESTCASE) 2>err.out | llvm-as | \
26 llvm-dis > upgrade.ll -f
27 diff source.ll upgrade.ll > diff.out
28
29valgrind:
30 valgrind ../../Debug/bin/llvm-upgrade -o /dev/null -f $(TESTCASE)
31
32$(ObjDir)/UpgradeLexer.o: $(PROJ_SRC_DIR)/UpgradeParser.y $(PROJ_SRC_DIR)/UpgradeParser.h