Changeset - r12008:976162879be1
[Not reviewed]
master
0 2 0
rubidium - 16 years ago 2009-05-24 17:34:39
rubidium@openttd.org
(svn r16419) -Fix [FS#2916]: MSYS has two distinct ways to write paths. When calling external binaries it resolves paths which causes comparisons between a resolved and unresolved path. So always use the resolved path instead of the unresolved one.
2 files changed with 9 insertions and 4 deletions:
0 comments (0 inline, 0 general)
Makefile.src.in
Show inline comments
 
@@ -181,35 +181,35 @@ Makefile.dep: $(FILE_DEP) $(SRCS:%=$(SRC
 
else
 
Makefile.dep: $(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
 
	@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) { \
 
				$$n = "";                     \
 
				left--;                       \
 
			}                               \
 
		}                                 \
 
		gsub("$(SRC_DIR)/", "", $$1);     \
 
		if (left > 0) {                   \
 
			print $$0;                      \
 
			$$1 = "Makefile.dep:";          \
 
			print $$0;                      \
configure
Show inline comments
 
@@ -13,29 +13,34 @@ CONFIGURE_EXECUTABLE="$_"
 
if [ "$0" != "$CONFIGURE_EXECUTABLE" ]; then
 
	# On some systems, when ./configure is triggered from 'make'
 
	#  the $_ is filled with 'make'. So if that is true, skip 'make'
 
	#  and use $0 (and hope that is correct ;))
 
	if [ -n "`echo $CONFIGURE_EXECUTABLE | grep make`" ]; then
 
		CONFIGURE_EXECUTABLE="$0"
 
	else
 
		CONFIGURE_EXECUTABLE="$CONFIGURE_EXECUTABLE $0"
 
	fi
 
fi
 
# Find out where configure is (in what dir)
 
ROOT_DIR="`dirname $0`"
 
ROOT_DIR="`cd $ROOT_DIR && pwd`"
 
# For MSYS/MinGW we want to know the FULL path. This as that path is generated
 
# once you call an outside binary. Having the same path for the rest is needed
 
# for dependency checking.
 
# pwd -W returns said FULL path, but doesn't exist on others so fall back.
 
ROOT_DIR="`cd $ROOT_DIR && (pwd -W 2>/dev/null || pwd 2>/dev/null)`"
 

	
 
check_path_characters
 

	
 
PWD="`pwd`"
 
# Same here as for the ROOT_DIR above
 
PWD="`pwd -W 2>/dev/null || pwd 2>/dev/null`"
 
PREFIX="$PWD/bin"
 

	
 
. $ROOT_DIR/config.lib
 

	
 
# Set default dirs
 
OBJS_DIR="$PWD/objs"
 
BASE_SRC_OBJS_DIR="$OBJS_DIR"
 
LANG_OBJS_DIR="$OBJS_DIR/lang"
 
BIN_DIR="$PREFIX"
 
SRC_DIR="$ROOT_DIR/src"
 
LANG_DIR="$SRC_DIR/lang"
 
MEDIA_DIR="$ROOT_DIR/media"
0 comments (0 inline, 0 general)