Bug 547599 - Port the comm-central "make package-compare", r=ted
authorPhil Ringnalda <philringnalda@gmail.com>
Sun, 21 Feb 2010 21:55:51 -0800
changeset 39187 e32cb0065bb7d536bde9138687cf2786732d44bc
parent 39186 269d2db8fbf3d5be3c578b56dbe4137812a84bf9
child 39188 47a442f5c0dcd0d925af14376bd3e5528970de55
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted
bugs547599
milestone1.9.3a3pre
Bug 547599 - Port the comm-central "make package-compare", r=ted
browser/build.mk
browser/installer/Makefile.in
--- a/browser/build.mk
+++ b/browser/build.mk
@@ -50,16 +50,19 @@ tier_app_dirs += $(MOZ_BRANDING_DIRECTOR
 tier_app_dirs += browser
 
 installer:
 	@$(MAKE) -C browser/installer installer
 
 package:
 	@$(MAKE) -C browser/installer
 
+package-compare:
+	@$(MAKE) -C browser/installer package-compare
+
 install::
 	@$(MAKE) -C browser/installer install
 
 clean::
 	@$(MAKE) -C browser/installer clean
 
 distclean::
 	@$(MAKE) -C browser/installer distclean
--- a/browser/installer/Makefile.in
+++ b/browser/installer/Makefile.in
@@ -104,26 +104,44 @@ endif
 
 ifndef LIBXUL_SDK
 INSTALL_SDK = 1
 endif
 
 include $(topsrcdir)/toolkit/mozapps/installer/packager.mk
 
 ifeq (bundle, $(MOZ_FS_LAYOUT))
-DEFINES += \
-  -DBINPATH=$(_BINPATH) \
-  -DAPPNAME=$(_APPNAME) \
-  $(NULL)
+BINPATH = $(_BINPATH)
+DEFINES += -DAPPNAME=$(_APPNAME)
 else
 # Every other platform just winds up in dist/bin
-DEFINES += -DBINPATH=bin
+BINPATH = bin
 endif
+DEFINES += -DBINPATH=$(BINPATH)
 
 libs::
 	$(MAKE) -C $(DEPTH)/browser/locales langpack PKG_LANGPACK_PATH=
 
 UPLOAD_EXTRA_FILES += $(PKG_LANGPACK_BASENAME).xpi
 
+ifeq (WINNT,$(OS_ARCH))
+PKGCOMP_FIND_OPTS =
+else
+PKGCOMP_FIND_OPTS = -L
+endif
+ifeq (Darwin, $(OS_ARCH))
+FINDPATH = $(_APPNAME)/Contents/MacOS
+else
+FINDPATH=bin
+endif
+
+package-compare:: $(MOZ_PKG_MANIFEST)
+ifdef MOZ_PKG_MANIFEST_P
+	cd $(DIST); find $(PKGCOMP_FIND_OPTS) $(FINDPATH) -type f | sort > bin-list.txt
+	grep "^$(BINPATH)" $(MOZ_PKG_MANIFEST) | sed -e 's/^\///' | sort > $(DIST)/pack-list.txt
+	-diff -u $(DIST)/pack-list.txt $(DIST)/bin-list.txt
+	rm -f $(DIST)/pack-list.txt $(DIST)/bin-list.txt
+endif
+
 installer:: removed-files
 ifdef INSTALLER_DIR
 	$(MAKE) -C $(INSTALLER_DIR)
 endif