Bug 990848 - Ensure .mozconfig.mk is created after clobbering. r=mshal
authorMike Hommey <mh+mozilla@glandium.org>
Wed, 02 Apr 2014 11:52:49 +0900
changeset 176989 9768df843341e5002bea6e8f3c656db31d419074
parent 176988 c70621a3019cab2712a9b6dd80cddd07f5aaa40d
child 176990 941bee559cd77e445a33436f2e37b80eeccd2d52
push id272
push userpvanderbeken@mozilla.com
push dateMon, 05 May 2014 16:31:18 +0000
reviewersmshal
bugs990848
milestone31.0a1
Bug 990848 - Ensure .mozconfig.mk is created after clobbering. r=mshal
client.mk
--- a/client.mk
+++ b/client.mk
@@ -198,17 +198,17 @@ WANT_MOZCONFIG_MK =
 endif
 else
 WANT_MOZCONFIG_MK = 1
 endif
 
 ifdef WANT_MOZCONFIG_MK
 # For now, only output "export" lines from mozconfig2client-mk output.
 MOZCONFIG_MK_LINES := $(filter export||%,$(MOZCONFIG_OUT_LINES))
-$(OBJDIR)/.mozconfig.mk: $(FOUND_MOZCONFIG) $(call mkdir_deps,$(OBJDIR))
+$(OBJDIR)/.mozconfig.mk: $(FOUND_MOZCONFIG) $(call mkdir_deps,$(OBJDIR)) $(OBJDIR)/CLOBBER
 	$(if $(MOZCONFIG_MK_LINES),( $(foreach line,$(MOZCONFIG_MK_LINES), echo '$(subst ||, ,$(line))';) )) > $@
 
 # Include that makefile so that it is created. This should not actually change
 # the environment since MOZCONFIG_CONTENT, which MOZCONFIG_OUT_LINES derives
 # from, has already been eval'ed.
 -include $(OBJDIR)/.mozconfig.mk
 endif
 
@@ -335,24 +335,24 @@ CONFIGURE_ENV_ARGS += \
 #   $(TOPSRCDIR) will set @srcdir@ to "."; otherwise, it is set to the full
 #   path of $(TOPSRCDIR).
 ifeq ($(TOPSRCDIR),$(OBJDIR))
   CONFIGURE = ./configure
 else
   CONFIGURE = $(TOPSRCDIR)/configure
 endif
 
-check-clobber:
+$(OBJDIR)/CLOBBER: $(TOPSRCDIR)/CLOBBER
 	$(PYTHON) $(TOPSRCDIR)/config/pythonpath.py -I $(TOPSRCDIR)/testing/mozbase/mozfile \
 	    $(TOPSRCDIR)/python/mozbuild/mozbuild/controller/clobber.py $(TOPSRCDIR) $(OBJDIR)
 
 configure-files: $(CONFIGURES)
 
 configure-preqs = \
-  check-clobber \
+  $(OBJDIR)/CLOBBER \
   configure-files \
   $(call mkdir_deps,$(OBJDIR)) \
   $(if $(MOZ_BUILD_PROJECTS),$(call mkdir_deps,$(MOZ_OBJDIR))) \
   save-mozconfig \
   $(NULL)
 
 save-mozconfig: $(FOUND_MOZCONFIG)
 	-cp $(FOUND_MOZCONFIG) $(OBJDIR)/.mozconfig
@@ -463,17 +463,16 @@ echo-variable-%:
 .PHONY: checkout \
     real_checkout \
     realbuild \
     build \
     profiledbuild \
     cleansrcdir \
     pull_all \
     build_all \
-    check-clobber \
     clobber \
     clobber_all \
     pull_and_build_all \
     everything \
     configure \
     preflight_all \
     preflight \
     postflight \