Make sure that the yacc and lex output are specified as BUILT_SOURCES.
authorReid Spencer <rspencer@reidspencer.com>
Thu, 28 Oct 2004 00:43:24 +0000 (00:43 +0000)
committerReid Spencer <rspencer@reidspencer.com>
Thu, 28 Oct 2004 00:43:24 +0000 (00:43 +0000)
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17289 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AsmParser/Makefile

index 2b85e1aaad1f93ffd55db9b0c093bc9d68b8e8b4..865e112c5172089c4550e8c34d5e655b6bce33ae 100644 (file)
@@ -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