From 912253297cdd0cd22bcfd51f2ddad2e1ebf38000 Mon Sep 17 00:00:00 2001 From: Mike Hommey Date: Tue, 9 Oct 2012 10:17:26 +0200 Subject: [PATCH] Bug 795204 - Trick make/pymake into waiting for shared libraries rules to run before installing import libraries in DIST/lib. r=ted, a=akeybl --HG-- extra : transplant_source : %B9%92%22L%DDU%D7%0E%0B%EC%80%C6%8D%A4%28%EE%B7%D3h%8E --- config/rules.mk | 9 ++++++++- js/src/config/rules.mk | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/config/rules.mk b/config/rules.mk index 95556828675b..2752233e1b5e 100644 --- a/config/rules.mk +++ b/config/rules.mk @@ -821,7 +821,14 @@ $(filter-out %.$(LIB_SUFFIX),$(LIBRARY)): $(filter %.$(LIB_SUFFIX),$(LIBRARY)) $ $(EXPAND_LIBS_GEN) -o $@ $(OBJS) $(LOBJS) $(SHARED_LIBRARY_LIBS) ifeq ($(OS_ARCH),WINNT) -$(IMPORT_LIBRARY): $(SHARED_LIBRARY) +# Import libraries are created by the rules creating shared libraries. +# The rules to copy them to $(DIST)/lib depend on $(IMPORT_LIBRARY), +# but make will happily consider the import library before it is refreshed +# when rebuilding the corresponding shared library. Defining an empty recipe +# for import libraries forces make to wait for the shared library recipe to +# have run before considering other targets that depend on the import library. +# See bug 795204. +$(IMPORT_LIBRARY): $(SHARED_LIBRARY) ; endif ifeq ($(OS_ARCH),OS2) diff --git a/js/src/config/rules.mk b/js/src/config/rules.mk index 95556828675b..2752233e1b5e 100644 --- a/js/src/config/rules.mk +++ b/js/src/config/rules.mk @@ -821,7 +821,14 @@ $(filter-out %.$(LIB_SUFFIX),$(LIBRARY)): $(filter %.$(LIB_SUFFIX),$(LIBRARY)) $ $(EXPAND_LIBS_GEN) -o $@ $(OBJS) $(LOBJS) $(SHARED_LIBRARY_LIBS) ifeq ($(OS_ARCH),WINNT) -$(IMPORT_LIBRARY): $(SHARED_LIBRARY) +# Import libraries are created by the rules creating shared libraries. +# The rules to copy them to $(DIST)/lib depend on $(IMPORT_LIBRARY), +# but make will happily consider the import library before it is refreshed +# when rebuilding the corresponding shared library. Defining an empty recipe +# for import libraries forces make to wait for the shared library recipe to +# have run before considering other targets that depend on the import library. +# See bug 795204. +$(IMPORT_LIBRARY): $(SHARED_LIBRARY) ; endif ifeq ($(OS_ARCH),OS2)