зеркало из 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
|
# use different MDDEPDIR & OBJ_SUFFIX to work around objs in srcdir/VPATH
|
||||||
# issue (bug 87422 & 100851)
|
# issue (bug 87422 & 100851)
|
||||||
|
# Turn off compiler dependencies as 'gcc -MD'
|
||||||
|
# cannot handle our obj_suffix renaming. (bug 105005)
|
||||||
MDDEPDIR := $(MDDEPDIR)_vpath
|
MDDEPDIR := $(MDDEPDIR)_vpath
|
||||||
ORIG_OBJ_SUFFIX := $(OBJ_SUFFIX)
|
|
||||||
OBJ_SUFFIX := xp.$(OBJ_SUFFIX)
|
OBJ_SUFFIX := xp.$(OBJ_SUFFIX)
|
||||||
|
COMPILER_DEPEND :=
|
||||||
|
|
||||||
include $(topsrcdir)/config/rules.mk
|
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
|
DEFINES += -D_IMPL_NS_GFXONXP -DUSE_MOZILLA_TYPES -DUSE_XPRINT
|
||||||
ifeq ($(OS_ARCH), Linux)
|
ifeq ($(OS_ARCH), Linux)
|
||||||
DEFINES += -D_BSD_SOURCE
|
DEFINES += -D_BSD_SOURCE
|
||||||
|
|
|
@ -41,17 +41,15 @@ REQUIRES = xpcom \
|
||||||
|
|
||||||
CPPSRCS = $(MODULES_LIBJAR_LCPPSRCS)
|
CPPSRCS = $(MODULES_LIBJAR_LCPPSRCS)
|
||||||
|
|
||||||
OBJS = $(addprefix S_,$(CPPSRCS:.cpp=.$(OBJ_SUFFIX)))
|
|
||||||
|
|
||||||
FORCE_STATIC_LIB = 1
|
FORCE_STATIC_LIB = 1
|
||||||
|
|
||||||
#ifndef MOZ_NATIVE_ZLIB
|
#ifndef MOZ_NATIVE_ZLIB
|
||||||
SHARED_LIBRARY_LIBS = $(DIST)/lib/libmozz_s.$(LIB_SUFFIX)
|
SHARED_LIBRARY_LIBS = $(DIST)/lib/libmozz_s.$(LIB_SUFFIX)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
MDDEPDIR := $(MDDEPDIR)_S
|
MDDEPDIR := $(MDDEPDIR)_S
|
||||||
|
OBJ_SUFFIX := S.$(OBJ_SUFFIX)
|
||||||
GARBAGE_DIRS += .deps
|
COMPILER_DEPEND :=
|
||||||
|
|
||||||
include $(topsrcdir)/config/rules.mk
|
include $(topsrcdir)/config/rules.mk
|
||||||
|
|
||||||
|
@ -60,22 +58,3 @@ DEFINES += -D_BSD_SOURCE
|
||||||
endif
|
endif
|
||||||
|
|
||||||
DEFINES += -DSTANDALONE
|
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)
|
CSRCS = $(MODULES_LIBREG_SRC_LCSRCS)
|
||||||
|
|
||||||
OBJS = $(addprefix S_,$(CSRCS:.c=.$(OBJ_SUFFIX)))
|
|
||||||
|
|
||||||
FORCE_STATIC_LIB = 1
|
FORCE_STATIC_LIB = 1
|
||||||
|
|
||||||
MDDEPDIR := $(MDDEPDIR)_S
|
MDDEPDIR := $(MDDEPDIR)_S
|
||||||
|
OBJ_SUFFIX := S.$(OBJ_SUFFIX)
|
||||||
GARBAGE_DIRS += .deps
|
COMPILER_DEPEND :=
|
||||||
|
|
||||||
include $(topsrcdir)/config/rules.mk
|
include $(topsrcdir)/config/rules.mk
|
||||||
|
|
||||||
DEFINES += -DSTANDALONE_REGISTRY
|
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,29 +34,15 @@ LIBRARY_NAME = mozz_s
|
||||||
CSRCS = $(MODULES_ZLIB_SRC_LCSRCS)
|
CSRCS = $(MODULES_ZLIB_SRC_LCSRCS)
|
||||||
EXPORTS = $(MODULES_ZLIB_SRC_LEXPORTS)
|
EXPORTS = $(MODULES_ZLIB_SRC_LEXPORTS)
|
||||||
|
|
||||||
OBJS = $(addprefix S_,$(CSRCS:.c=.$(OBJ_SUFFIX)))
|
|
||||||
|
|
||||||
ifneq ($(MOZ_WIDGET_TOOLKIT),os2)
|
ifneq ($(MOZ_WIDGET_TOOLKIT),os2)
|
||||||
FORCE_STATIC_LIB = 1
|
FORCE_STATIC_LIB = 1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
EXTRA_DSO_LDOPTS += $(MOZ_COMPONENT_NSPR_LIBS)
|
EXTRA_DSO_LDOPTS += $(MOZ_COMPONENT_NSPR_LIBS)
|
||||||
|
|
||||||
MDDEPDIR := $(MDDEPDIR)_S
|
MDDEPDIR := $(MDDEPDIR)_S
|
||||||
|
OBJ_SUFFIX := S.$(OBJ_SUFFIX)
|
||||||
GARBAGE_DIRS += .deps
|
COMPILER_DEPEND :=
|
||||||
|
|
||||||
include $(topsrcdir)/config/rules.mk
|
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)
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче