If MOZ_OBJDIR is set, automagically determine the relative path from the objdir to the srcdir and pass --srcdir to configure using this relative path. This is needed to workaround the issue with absolute paths in the win32 gmake build.

Bug #135589 r=bryner a=rjesup
This commit is contained in:
cls%seawood.org 2002-04-06 06:20:55 +00:00
Родитель ac14ac5b17
Коммит c3ef34738b
1 изменённых файлов: 15 добавлений и 2 удалений

Просмотреть файл

@ -362,6 +362,15 @@ CHECKOUT_CALENDAR := true
FASTUPDATE_CALENDAR := true
endif
# because some cygwin tools can't handle native dos-drive paths & vice-versa
# force configure to use a relative path for --srcdir
# need a better check for win32
# and we need to get OBJDIR earlier
ifdef MOZ_TOOLS
_OBJ2SRCPATH := $(shell perl -e 'use File::Spec::Unix; print File::Spec::Unix->abs2rel("$(TOPSRCDIR)","$(shell cygpath -u $(OBJDIR))");')
endif
#######################################################################
# Rules
#
@ -579,11 +588,15 @@ else
CONFIGURE := $(TOPSRCDIR)/configure
endif
ifdef _OBJ2SRCPATH
CONFIGURE_ARGS := --srcdir=$(_OBJ2SRCPATH) $(CONFIGURE_ARGS)
endif
$(OBJDIR)/Makefile $(OBJDIR)/config.status: $(CONFIG_STATUS_DEPS)
@if test ! -d $(OBJDIR); then $(MKDIR) $(OBJDIR); else true; fi
@echo cd $(OBJDIR);
@echo $(CONFIGURE)
@cd $(OBJDIR) && $(CONFIGURE_ENV_ARGS) $(CONFIGURE) \
@echo $(CONFIGURE) $(CONFIGURE_ARGS)
@cd $(OBJDIR) && $(CONFIGURE_ENV_ARGS) $(CONFIGURE) $(CONFIGURE_ARGS) \
|| ( echo "*** Fix above errors and then restart with\
\"$(MAKE) -f client.mk build\"" && exit 1 )
@touch $(OBJDIR)/Makefile