Skip to content

Commit

Permalink
Fix a minor makefile bug with lex/yacc handling that nate noticed. We…
Browse files Browse the repository at this point in the history
… don't

want to copy the files when the .cpp file changes, we want to copy them
to the .cvs versions when the .l/.y file change (like the comments even say).
This avoids having bogus changes show up in diffs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26229 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
lattner committed Feb 16, 2006
1 parent 21c107a commit af2f351
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile.rules
Original file line number Diff line number Diff line change
Expand Up @@ -1231,7 +1231,7 @@ $(PROJ_SRC_DIR)/%.cpp: $(PROJ_SRC_DIR)/%.l
# source location and building them.
$(LexFiles:%.l=$(PROJ_SRC_DIR)/%.cpp.cvs): \
$(PROJ_SRC_DIR)/%.cpp.cvs: $(PROJ_SRC_DIR)/%.cpp
$(Verb) $(CMP) -s $@ $< || \
$(Verb) $(CMP) -s $(PROJ_SRC_DIR)/$*.l $(PROJ_SRC_DIR)/$*.l.cvs || \
($(CP) $< $@; $(CP) $(PROJ_SRC_DIR)/$*.l $(PROJ_SRC_DIR)/$*.l.cvs)

$(LexFiles:%.l=$(ObjDir)/%.o) : \
Expand Down Expand Up @@ -1272,7 +1272,7 @@ $(PROJ_SRC_DIR)/%.cpp $(PROJ_SRC_DIR)/%.h : $(PROJ_SRC_DIR)/%.y
# to the source location and building them.
$(YaccFiles:%.y=$(PROJ_SRC_DIR)/%.cpp.cvs): \
$(PROJ_SRC_DIR)/%.cpp.cvs: $(PROJ_SRC_DIR)/%.cpp
$(Verb) $(CMP) -s $@ $< || \
$(Verb) $(CMP) -s $(PROJ_SRC_DIR)/$*.y $(PROJ_SRC_DIR)/$*.y.cvs || \
($(CP) $< $@; \
$(CP) $(PROJ_SRC_DIR)/$*.y $(PROJ_SRC_DIR)/$*.y.cvs; \
$(CP) $(PROJ_SRC_DIR)/$*.h $(PROJ_SRC_DIR)/$*.h.cvs)
Expand Down

0 comments on commit af2f351

Please sign in to comment.