mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 14:52:16 +00:00
Bug 105271: compile source files with absolute pathnames so that the
debuggers can find them automatically. Currently enabled on Windows and OS/2 only. The patch is contributed by Julien Pierre. r=wtc.
This commit is contained in:
parent
949f6757f2
commit
3655177e33
@ -379,17 +379,39 @@ ifeq ($(OS_ARCH),SunOS)
|
|||||||
sed -e 's,;+,,' -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,;,' > $@
|
sed -e 's,;+,,' -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,;,' > $@
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
#
|
||||||
|
# Translate source filenames to absolute paths. This is required for
|
||||||
|
# debuggers under Windows and OS/2 to find source files automatically.
|
||||||
|
#
|
||||||
|
|
||||||
|
ifeq ($(OS_ARCH),OS2)
|
||||||
|
NEED_ABSOLUTE_PATH = 1
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(NS_USE_GCC)_$(OS_ARCH),_WINNT)
|
||||||
|
NEED_ABSOLUTE_PATH = 1
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifdef NEED_ABSOLUTE_PATH
|
||||||
|
PWD := $(shell pwd)
|
||||||
|
abspath = $(if $(findstring :,$(1)),$(1),$(if $(filter /%,$(1)),$(1),$(PWD)/$(1)))
|
||||||
|
endif
|
||||||
|
|
||||||
$(OBJDIR)/%.$(OBJ_SUFFIX): %.cpp
|
$(OBJDIR)/%.$(OBJ_SUFFIX): %.cpp
|
||||||
@$(MAKE_OBJDIR)
|
@$(MAKE_OBJDIR)
|
||||||
ifeq ($(NS_USE_GCC)_$(OS_ARCH),_WINNT)
|
ifeq ($(NS_USE_GCC)_$(OS_ARCH),_WINNT)
|
||||||
$(CCC) -Fo$@ -c $(CCCFLAGS) $<
|
$(CCC) -Fo$@ -c $(CCCFLAGS) $(call abspath,$<)
|
||||||
else
|
else
|
||||||
ifeq ($(MOZ_OS2_TOOLS),VACPP)
|
ifeq ($(MOZ_OS2_TOOLS),VACPP)
|
||||||
$(CCC) -Fo$@ -c $(CCCFLAGS) $<
|
$(CCC) -Fo$@ -c $(CCCFLAGS) $(call abspath,$<)
|
||||||
|
else
|
||||||
|
ifdef NEED_ABSOLUTE_PATH
|
||||||
|
$(CCC) -o $@ -c $(CCCFLAGS) $(call abspath,$<)
|
||||||
else
|
else
|
||||||
$(CCC) -o $@ -c $(CCCFLAGS) $<
|
$(CCC) -o $@ -c $(CCCFLAGS) $<
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
WCCFLAGS1 = $(subst /,\\,$(CFLAGS))
|
WCCFLAGS1 = $(subst /,\\,$(CFLAGS))
|
||||||
WCCFLAGS2 = $(subst -I,-i=,$(WCCFLAGS1))
|
WCCFLAGS2 = $(subst -I,-i=,$(WCCFLAGS1))
|
||||||
@ -397,14 +419,18 @@ WCCFLAGS3 = $(subst -D,-d,$(WCCFLAGS2))
|
|||||||
$(OBJDIR)/%.$(OBJ_SUFFIX): %.c
|
$(OBJDIR)/%.$(OBJ_SUFFIX): %.c
|
||||||
@$(MAKE_OBJDIR)
|
@$(MAKE_OBJDIR)
|
||||||
ifeq ($(NS_USE_GCC)_$(OS_ARCH),_WINNT)
|
ifeq ($(NS_USE_GCC)_$(OS_ARCH),_WINNT)
|
||||||
$(CC) -Fo$@ -c $(CFLAGS) $<
|
$(CC) -Fo$@ -c $(CFLAGS) $(call abspath,$<)
|
||||||
else
|
else
|
||||||
ifeq ($(MOZ_OS2_TOOLS),VACPP)
|
ifeq ($(MOZ_OS2_TOOLS),VACPP)
|
||||||
$(CC) -Fo$@ -c $(CFLAGS) $<
|
$(CC) -Fo$@ -c $(CFLAGS) $(call abspath,$<)
|
||||||
|
else
|
||||||
|
ifdef NEED_ABSOLUTE_PATH
|
||||||
|
$(CC) -o $@ -c $(CFLAGS) $(call abspath,$<)
|
||||||
else
|
else
|
||||||
$(CC) -o $@ -c $(CFLAGS) $<
|
$(CC) -o $@ -c $(CFLAGS) $<
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
$(OBJDIR)/%.$(OBJ_SUFFIX): %.s
|
$(OBJDIR)/%.$(OBJ_SUFFIX): %.s
|
||||||
|
Loading…
Reference in New Issue
Block a user