mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-12 13:30:51 +00:00
Some simple cleanups:
1. When srcdir == objdir have "spotless" say that it isn't supported in that mode rather than just let make say "no such target" 2. Minor doc cleanups 3. Fix the double rebuild problem with yacc files. A missing dependency caused parallel builds to skip building the .cpp file after the .cpp file was regenerated by bison. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24924 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c85b33f264
commit
25e8a70ea3
@ -108,6 +108,9 @@ spotless:
|
|||||||
else \
|
else \
|
||||||
$(EchoCmd) "make spotless" can only be run from $(PROJ_OBJ_ROOT); \
|
$(EchoCmd) "make spotless" can only be run from $(PROJ_OBJ_ROOT); \
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
spotless:
|
||||||
|
$(EchoCmd) "spotless target not supported for objdir == srcdir"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
$(BUILT_SOURCES) : $(ObjMakefiles)
|
$(BUILT_SOURCES) : $(ObjMakefiles)
|
||||||
@ -475,9 +478,9 @@ $(RecursiveTargets)::
|
|||||||
done
|
done
|
||||||
endif
|
endif
|
||||||
|
|
||||||
#---------------------------------------------------------
|
#-----------------------------------------------------------
|
||||||
# Handle the PARALLEL_DIRS options for parallel construction
|
# Handle the PARALLEL_DIRS options for parallel construction
|
||||||
#---------------------------------------------------------
|
#-----------------------------------------------------------
|
||||||
ifdef PARALLEL_DIRS
|
ifdef PARALLEL_DIRS
|
||||||
|
|
||||||
SubDirs += $(PARALLEL_DIRS)
|
SubDirs += $(PARALLEL_DIRS)
|
||||||
@ -1219,7 +1222,6 @@ $(LexObjs): $(ObjDir)/%.o : $(PROJ_SRC_DIR)/%.cpp
|
|||||||
|
|
||||||
clean-local::
|
clean-local::
|
||||||
-$(Verb) $(RM) -f $(LexOutput)
|
-$(Verb) $(RM) -f $(LexOutput)
|
||||||
$(Verb) $(RM) -f $(LexOutput)
|
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -1230,7 +1232,6 @@ endif
|
|||||||
|
|
||||||
YaccFiles := $(filter %.y,$(Sources))
|
YaccFiles := $(filter %.y,$(Sources))
|
||||||
ifneq ($(YaccFiles),)
|
ifneq ($(YaccFiles),)
|
||||||
YaccOutput := $(addprefix $(patsubst %.y,%,$(YaccFiles)),.output)
|
|
||||||
|
|
||||||
.PRECIOUS: $(YaccOutput)
|
.PRECIOUS: $(YaccOutput)
|
||||||
|
|
||||||
@ -1239,7 +1240,7 @@ YaccOutput := $(addprefix $(patsubst %.y,%,$(YaccFiles)),.output)
|
|||||||
%.cpp: %.y
|
%.cpp: %.y
|
||||||
%.h: %.y
|
%.h: %.y
|
||||||
|
|
||||||
# Rule for building the bison parsers...
|
# Rule for building the bison based parsers...
|
||||||
$(PROJ_SRC_DIR)/%.cpp $(PROJ_SRC_DIR)/%.h : $(PROJ_SRC_DIR)/%.y
|
$(PROJ_SRC_DIR)/%.cpp $(PROJ_SRC_DIR)/%.h : $(PROJ_SRC_DIR)/%.y
|
||||||
$(Echo) "Bisoning $*.y"
|
$(Echo) "Bisoning $*.y"
|
||||||
$(Verb) $(BISON) -v -d -p $(<F:%Parser.y=%) -o $*.tab.c $<
|
$(Verb) $(BISON) -v -d -p $(<F:%Parser.y=%) -o $*.tab.c $<
|
||||||
@ -1247,8 +1248,13 @@ $(PROJ_SRC_DIR)/%.cpp $(PROJ_SRC_DIR)/%.h : $(PROJ_SRC_DIR)/%.y
|
|||||||
$(Verb) $(MV) -f $*.tab.h $(PROJ_SRC_DIR)/$*.h
|
$(Verb) $(MV) -f $*.tab.h $(PROJ_SRC_DIR)/$*.h
|
||||||
$(Echo) "*** DON'T FORGET TO CHECK IN $*.cpp and $*.h (generated files)"
|
$(Echo) "*** DON'T FORGET TO CHECK IN $*.cpp and $*.h (generated files)"
|
||||||
|
|
||||||
|
YaccObjs := $(patsubst %.y,$(ObjDir)/%.o,$(YaccFiles))
|
||||||
|
$(YaccObjs): $(ObjDir)/%.o : $(PROJ_SRC_DIR)/%.cpp
|
||||||
|
|
||||||
|
YaccOutput := $(addprefix $(patsubst %.y,%,$(YaccFiles)),.output)
|
||||||
|
|
||||||
clean-local::
|
clean-local::
|
||||||
$(Verb) $(RM) -f $(YaccOutput)
|
-$(Verb) $(RM) -f $(YaccOutput)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
Loading…
Reference in New Issue
Block a user