зеркало из https://github.com/mozilla/pjs.git
For directories that use additional VPATHs, change OBJ_SUFFIX instead of duplicating build rules. Turn off compiler dependencies when changing OBJ_SUFFIX because at least gcc < 3.0 has problems generating the correct dependencies when the basename of the srcfile does not match the basename of the object file.
Bug #105005
This commit is contained in:
Родитель
853dfbd0cf
Коммит
95f3489c69
|
@ -78,15 +78,14 @@ EXTRA_DSO_LDOPTS += $(MOZ_COMPONENT_LIBS) \
|
|||
|
||||
# use different MDDEPDIR & OBJ_SUFFIX to work around objs in srcdir/VPATH
|
||||
# issue (bug 87422 & 100851)
|
||||
# Turn off compiler dependencies as 'gcc -MD'
|
||||
# cannot handle our obj_suffix renaming. (bug 105005)
|
||||
MDDEPDIR := $(MDDEPDIR)_vpath
|
||||
ORIG_OBJ_SUFFIX := $(OBJ_SUFFIX)
|
||||
OBJ_SUFFIX := xp.$(OBJ_SUFFIX)
|
||||
COMPILER_DEPEND :=
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
clean clobber clobber_all realclean distclean::
|
||||
-$(RM) -f $(wildcard *.$(ORIG_OBJ_SUFFIX))
|
||||
|
||||
DEFINES += -D_IMPL_NS_GFXONXP -DUSE_MOZILLA_TYPES -DUSE_XPRINT
|
||||
ifeq ($(OS_ARCH), Linux)
|
||||
DEFINES += -D_BSD_SOURCE
|
||||
|
|
|
@ -41,8 +41,6 @@ REQUIRES = xpcom \
|
|||
|
||||
CPPSRCS = $(MODULES_LIBJAR_LCPPSRCS)
|
||||
|
||||
OBJS = $(addprefix S_,$(CPPSRCS:.cpp=.$(OBJ_SUFFIX)))
|
||||
|
||||
FORCE_STATIC_LIB = 1
|
||||
|
||||
#ifndef MOZ_NATIVE_ZLIB
|
||||
|
@ -50,8 +48,8 @@ SHARED_LIBRARY_LIBS = $(DIST)/lib/libmozz_s.$(LIB_SUFFIX)
|
|||
#endif
|
||||
|
||||
MDDEPDIR := $(MDDEPDIR)_S
|
||||
|
||||
GARBAGE_DIRS += .deps
|
||||
OBJ_SUFFIX := S.$(OBJ_SUFFIX)
|
||||
COMPILER_DEPEND :=
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
|
@ -60,22 +58,3 @@ DEFINES += -D_BSD_SOURCE
|
|||
endif
|
||||
|
||||
DEFINES += -DSTANDALONE
|
||||
|
||||
# Make sure that these custom rules stay in sync with rules.mk
|
||||
S_%.$(OBJ_SUFFIX): %.cpp
|
||||
$(REPORT_BUILD)
|
||||
@$(MAKE_DEPS_AUTO)
|
||||
ifdef STRICT_CPLUSPLUS_SUFFIX
|
||||
echo "#line 1 \"$*.cpp\"" | cat - $*.cpp > t_$*.cc
|
||||
$(ELOG) $(CCC) -o $@ -c $(COMPILE_CXXFLAGS) t_$*.cc
|
||||
rm -f t_$*.cc
|
||||
else
|
||||
ifeq ($(MOZ_OS2_TOOLS), VACPP)
|
||||
$(ELOG) $(CCC) -Fo$@ -c $(COMPILE_CXXFLAGS) $<
|
||||
else
|
||||
$(ELOG) $(CCC) -o $@ -c $(COMPILE_CXXFLAGS) $<
|
||||
endif
|
||||
endif #STRICT_CPLUSPLUS_SUFFIX
|
||||
|
||||
$(MDDEPDIR)/S_%.pp: %.cpp
|
||||
$(MAKE_DEPS_NOAUTO)
|
||||
|
|
|
@ -33,27 +33,13 @@ LIBRARY_NAME = mozregsa_s
|
|||
|
||||
CSRCS = $(MODULES_LIBREG_SRC_LCSRCS)
|
||||
|
||||
OBJS = $(addprefix S_,$(CSRCS:.c=.$(OBJ_SUFFIX)))
|
||||
|
||||
FORCE_STATIC_LIB = 1
|
||||
|
||||
MDDEPDIR := $(MDDEPDIR)_S
|
||||
|
||||
GARBAGE_DIRS += .deps
|
||||
OBJ_SUFFIX := S.$(OBJ_SUFFIX)
|
||||
COMPILER_DEPEND :=
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
DEFINES += -DSTANDALONE_REGISTRY
|
||||
|
||||
# Make sure that these custom rules stay in sync with rules.mk
|
||||
S_%.$(OBJ_SUFFIX): %.c
|
||||
$(REPORT_BUILD)
|
||||
@$(MAKE_DEPS_AUTO)
|
||||
ifeq ($(MOZ_OS2_TOOLS), VACPP)
|
||||
$(ELOG) $(CC) -Fo$@ -c $(COMPILE_CFLAGS) $<
|
||||
else
|
||||
$(ELOG) $(CC) -o $@ -c $(COMPILE_CFLAGS) $<
|
||||
endif
|
||||
|
||||
$(MDDEPDIR)/S_%.pp: %.c
|
||||
$(MAKE_DEPS_NOAUTO)
|
||||
|
|
|
@ -34,8 +34,6 @@ LIBRARY_NAME = mozz_s
|
|||
CSRCS = $(MODULES_ZLIB_SRC_LCSRCS)
|
||||
EXPORTS = $(MODULES_ZLIB_SRC_LEXPORTS)
|
||||
|
||||
OBJS = $(addprefix S_,$(CSRCS:.c=.$(OBJ_SUFFIX)))
|
||||
|
||||
ifneq ($(MOZ_WIDGET_TOOLKIT),os2)
|
||||
FORCE_STATIC_LIB = 1
|
||||
endif
|
||||
|
@ -43,20 +41,8 @@ endif
|
|||
EXTRA_DSO_LDOPTS += $(MOZ_COMPONENT_NSPR_LIBS)
|
||||
|
||||
MDDEPDIR := $(MDDEPDIR)_S
|
||||
|
||||
GARBAGE_DIRS += .deps
|
||||
OBJ_SUFFIX := S.$(OBJ_SUFFIX)
|
||||
COMPILER_DEPEND :=
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
# Make sure that these custom rules stay in sync with rules.mk
|
||||
S_%.$(OBJ_SUFFIX): %.c
|
||||
$(REPORT_BUILD)
|
||||
@$(MAKE_DEPS)
|
||||
ifeq ($(MOZ_OS2_TOOLS),VACPP)
|
||||
$(ELOG) $(CC) -Fo$@ -c $(COMPILE_CFLAGS) $<
|
||||
else
|
||||
$(ELOG) $(CC) -o $@ -c $(COMPILE_CFLAGS) $<
|
||||
endif
|
||||
|
||||
$(MDDEPDIR)/S_%.pp: %.c
|
||||
$(MAKE_DEPS_NOAUTO)
|
||||
|
|
Загрузка…
Ссылка в новой задаче