Changeset - r12031:c8f1248b280d
[Not reviewed]
master
0 1 0
glx - 15 years ago 2009-05-26 23:05:11
glx@openttd.org
(svn r16443) -Fix: running 'make depend' after 'configure' in a fresh checkout failed
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
Makefile.src.in
Show inline comments
 
@@ -158,49 +158,49 @@ endif
 
	$(E) '$(STAGE) DEP $(<:$(SRC_DIR)/%.mm=%.mm)'
 
	$(Q)touch $@
 

	
 
else
 
# The much faster, but can be wrong, dep-check
 
DEP_MASK :=
 
DEPS     := Makefile.dep
 

	
 
# Only include the deps if we are not cleaning
 
ifeq ($(filter $(ENDIAN_TARGETS) depend clean mrproper, $(MAKECMDGOALS)),)
 
-include Makefile.dep
 
endif
 

	
 
ifeq ("$(SRC_OBJS_DIR)/$(DEPEND)","$(MAKEDEPEND)")
 
DEP := $(MAKEDEPEND)
 
$(SRC_OBJS_DIR)/$(DEPEND): $(SRC_DIR)/depend/depend.cpp
 
	$(E) '$(STAGE) Compiling and linking $(DEPEND)'
 
	$(Q)$(CXX_HOST) -o $@ $<
 
endif
 

	
 
# Make sure that only 'make depend' ALWAYS triggers a recheck
 
ifeq ($(filter depend, $(MAKECMDGOALS)),)
 
Makefile.dep: $(FILE_DEP) $(SRCS:%=$(SRC_DIR)/%) $(CONFIG_CACHE_SOURCE) $(DEP)
 
else
 
Makefile.dep: $(DEP) FORCE
 
Makefile.dep: $(FILE_DEP) $(SRCS:%=$(SRC_DIR)/%) $(DEP) FORCE
 
endif
 
	$(E) '$(STAGE) DEP CHECK (all files)'
 
	$(Q)rm -f Makefile.dep.tmp
 
	$(Q)touch Makefile.dep.tmp
 

	
 
# Calculate the deps via makedepend
 
	$(Q)$(MAKEDEPEND) -f$(SRC_OBJS_DIR)/Makefile.dep.tmp -o.o -Y -v -- $(CFLAGS_MAKEDEP) -- $(SRCS:%=$(SRC_DIR)/%) 2>/dev/null
 

	
 
# Convert x:/... paths to /x/... for mingw
 
ifeq ($(OS), MINGW)
 
	@cat Makefile.dep.tmp | sed 's@/\([a-zA-Z]\):\/@\/\1\/@g' > Makefile.dep.tmp.mingw
 
	@cp Makefile.dep.tmp.mingw Makefile.dep.tmp
 
	@rm -f Makefile.dep.tmp.mingw
 
endif
 

	
 
# Remove all comments and includes that don't start with $(SRC_DIR)
 
# Remove $(SRC_DIR) from object-file-name
 
	@$(AWK) '                           \
 
	/^# DO NOT/ { print $$0 ; next}     \
 
	/^#/ {next}                         \
 
	/: / {                               \
 
		left = NF - 1;                    \
 
		for (n = 2; n <= NF; n++) {       \
 
			if (match($$n, "^$(ROOT_DIR)") == 0) { \
0 comments (0 inline, 0 general)