From 95f3489c691b06dd6f312d6bf58c1fff4101523f Mon Sep 17 00:00:00 2001 From: "seawood%netscape.com" Date: Tue, 16 Oct 2001 09:31:58 +0000 Subject: [PATCH] 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 --- gfx/src/xprint/Makefile.in | 7 +++---- modules/libjar/standalone/Makefile.in | 27 +++------------------------ modules/libreg/standalone/Makefile.in | 20 +++----------------- modules/zlib/standalone/Makefile.in | 20 +++----------------- 4 files changed, 12 insertions(+), 62 deletions(-) diff --git a/gfx/src/xprint/Makefile.in b/gfx/src/xprint/Makefile.in index 8c14274eb2f..f9960a3bd59 100644 --- a/gfx/src/xprint/Makefile.in +++ b/gfx/src/xprint/Makefile.in @@ -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 diff --git a/modules/libjar/standalone/Makefile.in b/modules/libjar/standalone/Makefile.in index 76730b3b6aa..0efe7ace09a 100644 --- a/modules/libjar/standalone/Makefile.in +++ b/modules/libjar/standalone/Makefile.in @@ -41,17 +41,15 @@ REQUIRES = xpcom \ CPPSRCS = $(MODULES_LIBJAR_LCPPSRCS) -OBJS = $(addprefix S_,$(CPPSRCS:.cpp=.$(OBJ_SUFFIX))) - FORCE_STATIC_LIB = 1 #ifndef MOZ_NATIVE_ZLIB SHARED_LIBRARY_LIBS = $(DIST)/lib/libmozz_s.$(LIB_SUFFIX) #endif -MDDEPDIR := $(MDDEPDIR)_S - -GARBAGE_DIRS += .deps +MDDEPDIR := $(MDDEPDIR)_S +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) diff --git a/modules/libreg/standalone/Makefile.in b/modules/libreg/standalone/Makefile.in index 8fdc3d995a9..ffdc762efc4 100644 --- a/modules/libreg/standalone/Makefile.in +++ b/modules/libreg/standalone/Makefile.in @@ -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 +MDDEPDIR := $(MDDEPDIR)_S +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) diff --git a/modules/zlib/standalone/Makefile.in b/modules/zlib/standalone/Makefile.in index 8f46940b4ec..30a5c57b576 100644 --- a/modules/zlib/standalone/Makefile.in +++ b/modules/zlib/standalone/Makefile.in @@ -34,29 +34,15 @@ 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 EXTRA_DSO_LDOPTS += $(MOZ_COMPONENT_NSPR_LIBS) -MDDEPDIR := $(MDDEPDIR)_S - -GARBAGE_DIRS += .deps +MDDEPDIR := $(MDDEPDIR)_S +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)