From a909f95ebd496464af2f253f90378982c1dacdeb Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Thu, 28 Oct 2004 00:43:24 +0000 Subject: [PATCH] Make sure that the yacc and lex output are specified as BUILT_SOURCES. Correct the dependency of the Lexer.o file on the constructed llvmAsmParser.h header file. It is not the Lexer.cpp file that depends on the header, its the output of compiling Lexer.cpp, Lexer.o llvm-svn: 17289 --- lib/AsmParser/Makefile | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/lib/AsmParser/Makefile b/lib/AsmParser/Makefile index 2b85e1aaad1..865e112c517 100644 --- a/lib/AsmParser/Makefile +++ b/lib/AsmParser/Makefile @@ -7,15 +7,14 @@ # ##===----------------------------------------------------------------------===## -LEVEL = ../.. - -LIBRARYNAME = LLVMAsmParser +LEVEL := ../.. +LIBRARYNAME := LLVMAsmParser +BUILT_SOURCES := llvmAsmParser.cpp llvmAsmParser.h Lexer.cpp include $(LEVEL)/Makefile.common # -# Make the source code file for the lexer depend upon the header file generated -# by the Bison parser. This prevents the generation of dependencies from -# being performed until after the header file has been created. -# -Lexer.cpp: llvmAsmParser.h +# Make the object code file for the lexer depend upon the header file generated +# by the Bison parser. This prevents the Lexer from being compiled before the +# header file it needs is built. +$(OBJDIR)/Lexer.o: llvmAsmParser.h