diff --git a/Makefile.in b/Makefile.in index 9ea0f3c40a4..120583ba097 100644 --- a/Makefile.in +++ b/Makefile.in @@ -35,6 +35,7 @@ ifeq ($(BUILD_MODULES),all) # Tiers must be defined on module boundaries # default: $(SUBMAKEFILES) + $(RM) -rf $(DIST)/sdk $(MAKE) -C config export $(MAKE) nspr $(MAKE) ldap @@ -395,6 +396,7 @@ DIST_GARBAGE = config.cache config.log config.status config-defs.h \ # Build pseudo-external modules first when export is explicitly called export:: + $(RM) -rf $(DIST)/sdk $(MAKE) -C config export $(MAKE) nspr $(MAKE) ldap diff --git a/config/Makefile.in b/config/Makefile.in index 43734546ec5..430cc7c9dbd 100644 --- a/config/Makefile.in +++ b/config/Makefile.in @@ -85,13 +85,13 @@ export:: $(TARGETS) $(HEADERS) $(PERL) -I$(MOZILLA_DIR)/config $(MOZILLA_DIR)/config/build-list.pl $(PUBLIC)/.headerlist $(HEADERS) -rm -f $(FINAL_LINK_COMPS) $(FINAL_LINK_LIBS) $(FINAL_LINK_COMP_NAMES) -rm -f $(DIST)/bin/chrome/chromelist.txt - $(NSINSTALL) -t $(IFLAGS1) $(HEADERS) $(DIST)/sdk/ + $(NSINSTALL) -t $(IFLAGS1) $(HEADERS) $(DIST)/sdk/include ifdef HOST_PROGRAM $(INSTALL) $(HOST_PROGRAM) $(DIST)/bin endif -# Create mini-SDK directory for NSPR +# Copy NSPR to the SDK ifndef MOZ_NATIVE_NSPR ifeq (,$(CROSS_COMPILE)$(filter-out WINNT,$(OS_ARCH))) _ABS_DIST = $(shell cd $(DIST) && cygpath -w `pwd` | sed -e 's|\\|/|g') @@ -99,12 +99,11 @@ else _ABS_DIST = $(shell cd $(DIST) && pwd) endif libs:: - $(RM) -rf $(DIST)/sdk/nspr - $(MAKE) -C $(DEPTH)/nsprpub real_install prefix=$(_ABS_DIST)/sdk/nspr exec_prefix=$(_ABS_DIST)/sdk/nspr bindir=$(_ABS_DIST)/sdk/nspr/bin includedir=$(_ABS_DIST)/sdk/nspr/include libdir=$(_ABS_DIST)/sdk/nspr/lib datadir=$(_ABS_DIST)/sdk/nspr/share DESTDIR= - $(RM) -rf $(DIST)/sdk/nspr/bin $(DIST)/sdk/nspr/share - mv $(DIST)/sdk/nspr/lib $(DIST)/sdk/nspr/bin + $(MAKE) -C $(DEPTH)/nsprpub real_install prefix=$(_ABS_DIST)/sdk exec_prefix=$(_ABS_DIST)/sdk bindir=$(_ABS_DIST)/sdk/dummy includedir=$(_ABS_DIST)/sdk/include libdir=$(_ABS_DIST)/sdk/bin datadir=$(_ABS_DIST)/sdk/dummy DESTDIR= + $(RM) -rf $(DIST)/sdk/dummy + $(RM) -f $(DIST)/sdk/bin/$(LIB_PREFIX)nspr4.$(LIB_SUFFIX) $(DIST)/sdk/bin/$(LIB_PREFIX)plc4.$(LIB_SUFFIX) $(DIST)/sdk/bin/$(LIB_PREFIX)plds4.$(LIB_SUFFIX) ifndef DISABLE_DIST_GRE - $(INSTALL) $(DIST)/sdk/nspr/bin/*$(DLL_SUFFIX) $(GRE_DIST) + $(INSTALL) $(DIST)/sdk/bin/$(LIB_PREFIX)nspr4$(DLL_SUFFIX) $(DIST)/sdk/bin/$(LIB_PREFIX)plc4$(DLL_SUFFIX) $(DIST)/sdk/bin/$(LIB_PREFIX)plds4$(DLL_SUFFIX) $(GRE_DIST) endif endif diff --git a/config/config.mk b/config/config.mk index c95d2ec399f..97c164492ae 100644 --- a/config/config.mk +++ b/config/config.mk @@ -634,9 +634,10 @@ else PUBLIC = $(DIST)/include endif -SDK_PUBLIC = $(DIST)/sdk/$(MODULE)/include -SDK_IDL_DIR = $(DIST)/sdk/$(MODULE)/idl -SDK_BIN_DIR = $(DIST)/sdk/$(MODULE)/bin +SDK_PUBLIC = $(DIST)/sdk/include +SDK_IDL_DIR = $(DIST)/sdk/idl +SDK_LIB_DIR = $(DIST)/sdk/lib +SDK_BIN_DIR = $(DIST)/sdk/bin DEPENDENCIES = .md diff --git a/config/rules.mk b/config/rules.mk index 2ad2a779553..44e018a8ec5 100644 --- a/config/rules.mk +++ b/config/rules.mk @@ -747,7 +747,7 @@ endif install:: $(SDK_HEADERS) ifndef NO_INSTALL ifdef SDK_HEADERS - $(SYSINSTALL) $(IFLAGS1) $^ $(DESTDIR)$(includedir)/$(MODULE) + $(SYSINSTALL) $(IFLAGS1) $^ $(DESTDIR)$(includedir) endif endif @@ -1230,7 +1230,6 @@ export:: $(SDK_HEADERS) $(INSTALL) $(IFLAGS1) $^ $(PUBLIC) $(PERL) -I$(MOZILLA_DIR)/config $(MOZILLA_DIR)/config/build-list.pl $(PUBLIC)/.headerlist $(notdir $^) $(INSTALL) $(IFLAGS1) $^ $(SDK_PUBLIC) - $(PERL) -I$(MOZILLA_DIR)/config $(MOZILLA_DIR)/config/build-list.pl $(PUBLIC)/.headerlist $(notdir $^) endif # NO_DIST_INSTALL endif @@ -1442,7 +1441,6 @@ ifndef NO_DIST_INSTALL $(INSTALL) $(IFLAGS1) $^ $(PUBLIC) $(PERL) -I$(MOZILLA_DIR)/config $(MOZILLA_DIR)/config/build-list.pl $(PUBLIC)/.headerlist $(notdir $^) $(INSTALL) $(IFLAGS1) $^ $(SDK_PUBLIC) - $(PERL) -I$(MOZILLA_DIR)/config $(MOZILLA_DIR)/config/build-list.pl $(PUBLIC)/.headerlist $(notdir $^) endif install:: $(SDK_XPIDLSRCS) @@ -1452,7 +1450,7 @@ endif install:: $(patsubst %.idl,$(XPIDL_GEN_DIR)/%.h, $(SDK_XPIDLSRCS)) ifndef NO_INSTALL - $(SYSINSTALL) $(IFLAGS1) $^ $(DESTDIR)$(includedir)/$(MODULE) + $(SYSINSTALL) $(IFLAGS1) $^ $(DESTDIR)$(includedir) endif endif # SDK_XPIDLSRCS @@ -1474,6 +1472,17 @@ endif ################################################################################ # SDK +ifneq (,$(SDK_LIBRARY)) +$(SDK_LIB_DIR):: + @if test ! -d $@; then echo Creating $@; rm -rf $@; $(NSINSTALL) -D $@; else true; fi + +ifndef NO_DIST_INSTALL +libs:: $(SDK_LIBRARY) $(SDK_LIB_DIR) + $(INSTALL) $(IFLAGS2) $^ +endif + +endif # SDK_LIBRARY + ifneq (,$(SDK_BINARY)) $(SDK_BIN_DIR):: @if test ! -d $@; then echo Creating $@; rm -rf $@; $(NSINSTALL) -D $@; else true; fi diff --git a/embedding/base/Makefile.in b/embedding/base/Makefile.in index a98089fe0b9..f43b5291d45 100644 --- a/embedding/base/Makefile.in +++ b/embedding/base/Makefile.in @@ -44,7 +44,7 @@ SDK_XPIDLSRCS = \ $(NULL) -SDK_BINARY = \ +SDK_LIBRARY = \ $(LIB_PREFIX)embed_base_s.$(LIB_SUFFIX) \ $(NULL) diff --git a/xpcom/build/Makefile.in b/xpcom/build/Makefile.in index f16aa617562..383a32b5d14 100644 --- a/xpcom/build/Makefile.in +++ b/xpcom/build/Makefile.in @@ -98,7 +98,8 @@ SDK_HEADERS = \ nsXPCOMCID.h \ $(NULL) -SDK_BINARY = $(IMPORT_LIBRARY) $(SHARED_LIBRARY) +SDK_LIBRARY = $(IMPORT_LIBRARY) +SDK_BINARY = $(SHARED_LIBRARY) # pull in MoreFiles for MacOSX ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT))) diff --git a/xpcom/glue/Makefile.in b/xpcom/glue/Makefile.in index 1dc9f3e9dcb..770057c7a4a 100644 --- a/xpcom/glue/Makefile.in +++ b/xpcom/glue/Makefile.in @@ -51,7 +51,7 @@ SDK_HEADERS = \ $(XPCOM_GLUE_SRC_LEXPORTS) \ $(NULL) -SDK_BINARY = \ +SDK_LIBRARY = \ $(LIB_PREFIX)xpcomglue_s.$(LIB_SUFFIX) \ $(NULL) diff --git a/xpcom/glue/standalone/Makefile.in b/xpcom/glue/standalone/Makefile.in index 7647810f037..ae23d8e02e0 100644 --- a/xpcom/glue/standalone/Makefile.in +++ b/xpcom/glue/standalone/Makefile.in @@ -62,7 +62,7 @@ SDK_HEADERS = \ nsXPCOMGlue.h \ $(NULL) -SDK_BINARY = \ +SDK_LIBRARY = \ $(LIB_PREFIX)xpcomglue.$(LIB_SUFFIX) \ $(NULL)