]> granicus.if.org Git - flex/commitdiff
build: fix Makefile parse.h dependency clauses.
authorExplorer09 <explorer09@gmail.com>
Sun, 1 Jan 2017 07:41:29 +0000 (15:41 +0800)
committerWill Estes <westes575@gmail.com>
Tue, 24 Jan 2017 17:07:06 +0000 (12:07 -0500)
The current clauses stating "main.c: parse.h" and "yylex.c: parse.h" do
not work as expected. Make did not try to build parse.h upon building
flex-main.o as it would think main.c exist already and ignore the
clause. Fix this by explicitly stating that the .o files depend on
parse.h instead.

This dependency bug only happens if user builds flex from a
checked-out repository.

src/Makefile.am

index f3fd83dba646f3c50ef360d325702b8ff8a11ff8..e504861fcb312bb3a1c1b612acee75ad4a4e4efd 100644 (file)
@@ -95,8 +95,12 @@ endif
 # make needs to be told to make parse.h so that parallelized runs will
 # not fail.
 
-main.c: parse.h
-yylex.c: parse.h
+stage1flex-main.$(OBJEXT): parse.h
+flex-main.$(OBJEXT): parse.h
+
+stage1flex-yylex.$(OBJEXT): parse.h
+flex-yylex.$(OBJEXT): parse.h
+
 stage1flex-scan.$(OBJEXT): parse.h
 flex-stage1scan.$(OBJEXT): parse.h