From 9dad82ab1c73c520b2f18a17f94bf07d04068ccf Mon Sep 17 00:00:00 2001 From: "benjamin%smedbergs.us" Date: Wed, 21 Feb 2007 15:13:36 +0000 Subject: [PATCH] Bug 78081 - Don't export intermediate libraries, r=luser This is going to break camino until those build scripts are updated. --- config/config.mk | 2 -- config/rules.mk | 18 +++++++++++------- config/static-config.mk | 6 +++--- configure.in | 33 +++++++++++---------------------- js/jsd/Makefile.in | 1 + toolkit/library/Makefile.in | 6 +++--- xpcom/build/Makefile.in | 7 +++++-- xpinstall/src/Makefile.in | 2 ++ 8 files changed, 36 insertions(+), 39 deletions(-) diff --git a/config/config.mk b/config/config.mk index fc6abc71e81..2dd009d7add 100644 --- a/config/config.mk +++ b/config/config.mk @@ -132,7 +132,6 @@ FINAL_LINK_COMPS = $(DEPTH)/config/final-link-comps FINAL_LINK_COMP_NAMES = $(DEPTH)/config/final-link-comp-names MOZ_UNICHARUTIL_LIBS = $(LIBXUL_DIST)/lib/$(LIB_PREFIX)unicharutil_s.$(LIB_SUFFIX) -MOZ_REGISTRY_LIBS = $(DIST)/lib/$(LIB_PREFIX)mozreg_s.$(LIB_SUFFIX) MOZ_WIDGET_SUPPORT_LIBS = $(DIST)/lib/$(LIB_PREFIX)widgetsupport_s.$(LIB_SUFFIX) # determine debug-related options @@ -317,7 +316,6 @@ else $(error Component makefile does not specify MODULE_NAME.) endif endif -EXPORT_LIBRARY= FORCE_STATIC_LIB=1 _ENABLE_PIC=1 SHORT_LIBNAME= diff --git a/config/rules.mk b/config/rules.mk index 5fa4d3a6b2c..287f1219689 100644 --- a/config/rules.mk +++ b/config/rules.mk @@ -687,20 +687,24 @@ HOST_LIBS_DEPS = $(filter %.$(LIB_SUFFIX), $(HOST_LIBS)) DSO_LDOPTS_DEPS = $(EXTRA_DSO_LIBS) $(filter %.$(LIB_SUFFIX), $(EXTRA_DSO_LDOPTS)) ############################################## -libs:: $(SUBMAKEFILES) $(MAKE_DIRS) $(HOST_LIBRARY) $(LIBRARY) $(SHARED_LIBRARY) $(IMPORT_LIBRARY) $(HOST_PROGRAM) $(PROGRAM) $(HOST_SIMPLE_PROGRAMS) $(SIMPLE_PROGRAMS) $(MAPS) $(JAVA_LIBRARY) +libs:: $(SUBMAKEFILES) $(MAKE_DIRS) $(HOST_LIBRARY) $(LIBRARY) $(SHARED_LIBRARY) $(IMPORT_LIBRARY) $(HOST_PROGRAM) $(PROGRAM) $(HOST_SIMPLE_PROGRAMS) $(SIMPLE_PROGRAMS) $(JAVA_LIBRARY) ifndef NO_DIST_INSTALL -ifneq (,$(BUILD_STATIC_LIBS)$(FORCE_STATIC_LIB)) ifdef LIBRARY +ifdef EXPORT_LIBRARY # Stage libs that will be linked into a static build ifdef IS_COMPONENT - $(INSTALL) $(IFLAGS1) $(LIBRARY) $(DIST)/lib/components + $(INSTALL) $(IFLAGS1) $(LIBRARY) $(DEPTH)/staticlib/components +else + $(INSTALL) $(IFLAGS1) $(LIBRARY) $(DEPTH)/staticlib +endif +endif # EXPORT_LIBRARY +ifdef DIST_INSTALL +ifdef IS_COMPONENT + $(error Shipping static component libs makes no sense.) else $(INSTALL) $(IFLAGS1) $(LIBRARY) $(DIST)/lib endif +endif # DIST_INSTALL endif # LIBRARY -endif # BUILD_STATIC_LIBS || FORCE_STATIC_LIB -ifdef MAPS - $(INSTALL) $(IFLAGS1) $(MAPS) $(FINAL_TARGET) -endif ifdef SHARED_LIBRARY ifdef IS_COMPONENT $(INSTALL) $(IFLAGS2) $(SHARED_LIBRARY) $(FINAL_TARGET)/components diff --git a/config/static-config.mk b/config/static-config.mk index e58fe3ca19f..5a9e1cb4e6b 100644 --- a/config/static-config.mk +++ b/config/static-config.mk @@ -48,13 +48,13 @@ STATIC_REQUIRES += \ $(NULL) STATIC_EXTRA_LIBS += \ - $(addsuffix .$(LIB_SUFFIX),$(addprefix $(DIST)/lib/components/$(LIB_PREFIX),$(shell cat $(FINAL_LINK_COMPS)))) \ - $(addsuffix .$(LIB_SUFFIX),$(addprefix $(DIST)/lib/$(LIB_PREFIX),$(shell cat $(FINAL_LINK_LIBS)))) \ + $(addsuffix .$(LIB_SUFFIX),$(addprefix $(DEPTH)/staticlib/components/$(LIB_PREFIX),$(shell cat $(FINAL_LINK_COMPS)))) \ + $(addsuffix .$(LIB_SUFFIX),$(addprefix $(DEPTH)/staticlib/$(LIB_PREFIX),$(shell cat $(FINAL_LINK_LIBS)))) \ $(NULL) STATIC_COMPONENT_LIST = $(shell cat $(FINAL_LINK_COMP_NAMES)) -STATIC_EXTRA_DEPS += $(FINAL_LINK_COMPS) $(FINAL_LINK_LIBS) $(addsuffix .$(LIB_SUFFIX),$(addprefix $(DIST)/lib/components/$(LIB_PREFIX),$(shell cat $(FINAL_LINK_COMPS)))) $(addsuffix .$(LIB_SUFFIX),$(addprefix $(DIST)/lib/$(LIB_PREFIX),$(shell cat $(FINAL_LINK_LIBS)))) +STATIC_EXTRA_DEPS += $(FINAL_LINK_COMPS) $(FINAL_LINK_LIBS) $(addsuffix .$(LIB_SUFFIX),$(addprefix $(DEPTH)/staticlib/components/$(LIB_PREFIX),$(shell cat $(FINAL_LINK_COMPS)))) $(addsuffix .$(LIB_SUFFIX),$(addprefix $(DEPTH)/staticlib/$(LIB_PREFIX),$(shell cat $(FINAL_LINK_LIBS)))) STATIC_EXTRA_DEPS += \ $(topsrcdir)/config/static-config.mk \ diff --git a/configure.in b/configure.in index 54b5fac31db..3204cc480f3 100644 --- a/configure.in +++ b/configure.in @@ -876,11 +876,11 @@ HOST_AR='$(AR)' HOST_AR_FLAGS='$(AR_FLAGS)' MOZ_JPEG_CFLAGS= -MOZ_JPEG_LIBS='-L$(LIBXUL_DIST)/lib -lmozjpeg' +MOZ_JPEG_LIBS='$(call EXPAND_LIBNAME_PATH,mozjpeg,$(DEPTH)/jpeg)' MOZ_ZLIB_CFLAGS= -MOZ_ZLIB_LIBS='-L$(LIBXUL_DIST)/lib -lmozz' +MOZ_ZLIB_LIBS='$(call EXPAND_LIBNAME_PATH,mozz,$(DEPTH)/modules/zlib/src)' MOZ_PNG_CFLAGS= -MOZ_PNG_LIBS='-L$(LIBXUL_DIST)/lib -lmozpng' +MOZ_PNG_LIBS='$(call EXPAND_LIBNAME_PATH,mozpng,$(DEPTH)/modules/libimg/png)' MOZ_JS_LIBS='-L$(LIBXUL_DIST)/bin -lmozjs' DYNAMIC_XPCOM_LIBS='-L$(LIBXUL_DIST)/bin -lxpcom -lxpcom_core' @@ -1705,12 +1705,9 @@ case "$target" in MOZ_DEBUG_FLAGS='-Zi' MOZ_DEBUG_LDFLAGS='-DEBUG -DEBUGTYPE:CV' MOZ_FIX_LINK_PATHS= - MOZ_JPEG_LIBS='$(LIBXUL_DIST)/lib/mozjpeg.lib' MOZ_JS_LIBS='$(LIBXUL_DIST)/lib/js$(MOZ_BITS)$(VERSION_NUMBER).lib' MOZ_OPTIMIZE_FLAGS='-O1' - MOZ_PNG_LIBS='$(LIBXUL_DIST)/lib/mozpng.lib' MOZ_XPCOM_OBSOLETE_LIBS='$(LIBXUL_DIST)/lib/xpcom_compat.lib' - MOZ_ZLIB_LIBS='$(LIBXUL_DIST)/lib/mozz.lib' OBJ_SUFFIX=obj RANLIB='echo not_ranlib' STRIP='echo not_strip' @@ -1766,10 +1763,6 @@ case "$target" in RCFLAGS='-O coff --use-temp-file' # mingw doesn't require kernel32, user32, and advapi32 explicitly LIBS="$LIBS -lgdi32 -lwinmm -lwsock32" - MOZ_JPEG_LIBS='-L$(LIBXUL_DIST)/lib -ljpeg$(MOZ_BITS)$(VERSION_NUMBER)' - MOZ_ZLIB_LIBS='-L$(LIBXUL_DIST)/lib -lmozz' - MOZ_PNG_LIBS='-L$(LIBXUL_DIST)/lib -lpng' - MOZ_JS_LIBS='-L$(LIBXUL_DIST)/lib -ljs$(MOZ_BITS)$(VERSION_NUMBER)' MOZ_FIX_LINK_PATHS= DYNAMIC_XPCOM_LIBS='-L$(LIBXUL_DIST)/lib -lxpcom -lxpcom_core' XPCOM_FROZEN_LDOPTS='-L$(LIBXUL_DIST)/lib -lxpcom' @@ -1805,9 +1798,6 @@ case "$target" in MOZ_DEBUG_FLAGS='-Zi' MOZ_DEBUG_LDFLAGS='-DEBUG -DEBUGTYPE:CV' MOZ_OPTIMIZE_FLAGS='-O1' - MOZ_JPEG_LIBS='$(LIBXUL_DIST)/lib/jpeg$(MOZ_BITS)$(VERSION_NUMBER).lib' - MOZ_ZLIB_LIBS='$(LIBXUL_DIST)/lib/mozz.lib' - MOZ_PNG_LIBS='$(LIBXUL_DIST)/lib/png.lib' MOZ_JS_LIBS='$(LIBXUL_DIST)/lib/js$(MOZ_BITS)$(VERSION_NUMBER).lib' MOZ_FIX_LINK_PATHS= DYNAMIC_XPCOM_LIBS='$(LIBXUL_DIST)/lib/xpcom.lib $(LIBXUL_DIST)/lib/xpcom_core.lib' @@ -1816,6 +1806,8 @@ case "$target" in MOZ_COMPONENT_NSPR_LIBS='$(NSPR_LIBS)' MOZ_XPCOM_OBSOLETE_LIBS='$(LIBXUL_DIST)/lib/xpcom_compat.lib' fi + MOZ_JPEG_LIBS='$(call EXPAND_LIBNAME_PATH,jpeg$(MOZ_BITS)$(VERSION_NUMBER),$(DEPTH)/jpeg)' + MOZ_PNG_LIBS='$(call EXPAND_LIBNAME_PATH,png,$(DEPTH)/modules/libimg/png)' AC_DEFINE(HAVE_SNPRINTF) AC_DEFINE(_WINDOWS) AC_DEFINE(_WIN32) @@ -2154,9 +2146,6 @@ case "$target" in MOZ_XPCOM_OBSOLETE_LIBS='$(LIBXUL_DIST)/lib/xpcomct.lib' DYNAMIC_XPCOM_LIBS='$(LIBXUL_DIST)/lib/xpcom.lib $(LIBXUL_DIST)/lib/xpcomcor.lib' LIBXUL_LIBS='$(LIBXUL_DIST)/lib/xpcom.lib $(LIBXUL_DIST)/lib/xul.lib' - MOZ_JPEG_LIBS='$(LIBXUL_DIST)/lib/mozjpeg.$(LIB_SUFFIX)' - MOZ_ZLIB_LIBS='$(LIBXUL_DIST)/lib/mozz.$(LIB_SUFFIX)' - MOZ_PNG_LIBS='$(LIBXUL_DIST)/lib/mozpng.$(LIB_SUFFIX)' fi ;; @@ -7306,24 +7295,24 @@ if test "$MOZ_SVG" -o "$MOZ_ENABLE_CANVAS" -o "$MOZ_ENABLE_CAIRO_GFX" ; then AC_SUBST(PNG_FUNCTIONS_FEATURE) if test "$_WIN32_MSVC"; then - MOZ_CAIRO_LIBS='$(LIBXUL_DIST)/lib/mozcairo.lib $(LIBXUL_DIST)/lib/mozlibpixman.lib' + MOZ_CAIRO_LIBS='$(DEPTH)/gfx/cairo/cairo/src/mozcairo.lib $(DEPTH)/gfx/cairo/libpixman/src/mozlibpixman.lib' if test "$MOZ_ENABLE_GLITZ"; then - MOZ_CAIRO_LIBS="$MOZ_CAIRO_LIBS "'$(LIBXUL_DIST)/lib/mozglitz.lib $(LIBXUL_DIST)/lib/mozglitzwgl.lib' + MOZ_CAIRO_LIBS="$MOZ_CAIRO_LIBS "'$(DEPTH)/gfx/cairo/glitz/src/mozglitz.lib $(DEPTH)/gfx/cairo/glitz/src/wgl/mozglitzwgl.lib' fi else - MOZ_CAIRO_LIBS='-L$(LIBXUL_DIST)/lib'" -lmozcairo -lmozlibpixman $CAIRO_FT_LIBS" + MOZ_CAIRO_LIBS='-L$(DEPTH)/gfx/cairo/cairo/src -lmozcairo -L$(DEPTH)/gfx/cairo/libpixman/src -lmozlibpixman'" $CAIRO_FT_LIBS" if test "$MOZ_X11"; then MOZ_CAIRO_LIBS="$MOZ_CAIRO_LIBS $XLDFLAGS -lXrender -lfreetype -lfontconfig" fi if test "$MOZ_ENABLE_GLITZ"; then - MOZ_CAIRO_LIBS="$MOZ_CAIRO_LIBS -lmozglitz" + MOZ_CAIRO_LIBS="$MOZ_CAIRO_LIBS "'-L$(DEPTH)/gfx/cairo/glitz/src -lmozglitz' if test "$MOZ_X11"; then - MOZ_CAIRO_LIBS="$MOZ_CAIRO_LIBS -lmozglitzglx -lGL" + MOZ_CAIRO_LIBS="$MOZ_CAIRO_LIBS "'-L$(DEPTH)/gfx/cairo/glitz/src/glx -lmozglitzglx -lGL' fi if test "$MOZ_WIDGET_TOOLKIT" = "windows"; then - MOZ_CAIRO_LIBS="$MOZ_CAIRO_LIBS -lmozglitzwgl" + MOZ_CAIRO_LIBS="$MOZ_CAIRO_LIBS "'-L$(DEPTH)/gfx/cairo/glitz/src/wgl -lmozglitzwgl' fi fi fi diff --git a/js/jsd/Makefile.in b/js/jsd/Makefile.in index c67e8c711f3..5130746dbed 100644 --- a/js/jsd/Makefile.in +++ b/js/jsd/Makefile.in @@ -102,6 +102,7 @@ LIBXUL_LIBRARY = 1 ifdef MOZ_ENABLE_LIBXUL FORCE_SHARED_LIB= MODULE_NAME = JavaScript_Debugger +EXPORT_LIBRARY = 1 endif endif diff --git a/toolkit/library/Makefile.in b/toolkit/library/Makefile.in index 183da2cf49c..47efdd60da3 100644 --- a/toolkit/library/Makefile.in +++ b/toolkit/library/Makefile.in @@ -83,13 +83,13 @@ SHARED_LIBRARY_LIBS += \ ifneq (,$(MOZ_ENABLE_GTK)$(MOZ_ENABLE_GTK2)) SHARED_LIBRARY_LIBS += \ - -lgtkembedmoz + $(DEPTH)/embedding/browser/gtk/src/$(LIB_PREFIX)gtkembedmoz.$(LIB_SUFFIX) endif SHARED_LIBRARY_LIBS += \ - $(foreach component,$(COMPONENT_LIBS),$(DIST)/lib/components/$(LIB_PREFIX)$(component).$(LIB_SUFFIX)) \ - $(foreach lib,$(STATIC_LIBS),$(DIST)/lib/$(LIB_PREFIX)$(lib).$(LIB_SUFFIX)) \ + $(foreach component,$(COMPONENT_LIBS),$(DEPTH)/staticlib/components/$(LIB_PREFIX)$(component).$(LIB_SUFFIX)) \ + $(foreach lib,$(STATIC_LIBS),$(DEPTH)/staticlib/$(LIB_PREFIX)$(lib).$(LIB_SUFFIX)) \ $(NULL) ifdef MOZ_JAVAXPCOM diff --git a/xpcom/build/Makefile.in b/xpcom/build/Makefile.in index 5db9df928b8..944d1f1cfe2 100644 --- a/xpcom/build/Makefile.in +++ b/xpcom/build/Makefile.in @@ -62,8 +62,11 @@ ifdef ENABLE_TESTS PACKAGE_FILE += xpcom-tests.pkg endif -# Do not set EXPORT_LIBRARY as we do not want xpcom in the static libs list -#EXPORT_LIBRARY = 1 +# This is only a static library in libxul builds +ifdef MOZ_ENABLE_LIBXUL +EXPORT_LIBRARY = 1 +endif + GRE_MODULE = 1 MOZILLA_INTERNAL_API = 1 diff --git a/xpinstall/src/Makefile.in b/xpinstall/src/Makefile.in index 10ebb8e54db..ba9768470ee 100644 --- a/xpinstall/src/Makefile.in +++ b/xpinstall/src/Makefile.in @@ -54,6 +54,8 @@ ifndef MOZ_ENABLE_LIBXUL FORCE_SHARED_LIB = 1 BUILD_STATIC_LIBS= SHORT_LIBNAME = xpinstal +else +EXPORT_LIBRARY = 1 endif IS_COMPONENT = 1 MODULE_NAME = nsSoftwareUpdate