config/tests/src-simple/Makefile.in
author Mike Hommey <mh+mozilla@glandium.org>
Sat, 04 Aug 2012 20:26:44 +0200
changeset 101804 162130598df094e19b044610902abecd403278d3
parent 101758 1fc17369c9a6c85dfd5724b9b6ecc073f0b3cc6c
child 123663 7fc68ba4fe8012771dc3295d7d6366ccf911793c
permissions -rw-r--r--
Bug 774032 bonus - Use @DEPTH@ and @relativesrcdir@ in Makefile.in. r=ted

#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

DEPTH		= @DEPTH@
topsrcdir	= @top_srcdir@
srcdir		= @srcdir@
VPATH		= @srcdir@
LOCALE_SRCDIR = $(srcdir)/l10n

include $(DEPTH)/config/autoconf.mk

include $(topsrcdir)/config/config.mk

XPI_NAME = test_jar_mn

DEFINES += \
	-DAB_CD=ab-X-stuff \
	$(NULL)

MY_MANIFEST = $(if $(USE_EXTENSION_MANIFEST), $(FINAL_TARGET)/chrome.manifest, $(FINAL_TARGET)/chrome/test.manifest)
REF_MANIFEST = $(if $(USE_EXTENSION_MANIFEST),chrome.manifest,test.manifest)

check-%::
	if test -d $(FINAL_TARGET); then rm -rf $(FINAL_TARGET); fi;
	$(MAKE) realchrome MOZ_CHROME_FILE_FORMAT=$*
	@echo "Comparing manifests..."
	@if ! sort $(MY_MANIFEST) | diff --text -U 0 $(srcdir)/../$(REF_MANIFEST).$* - ; then \
	  echo "TEST-UNEXPECTED-FAIL | config/tests/$(REF_MANIFEST).$* | differing content in manifest!" ; \
	  false; \
	fi
	@if [ $* = "jar" ]; then \
	  $(UNZIP) -d $(FINAL_TARGET)/chrome/test $(FINAL_TARGET)/chrome/test.jar; \
	fi
	@echo "Comparing packages..."
	@if ! diff -ur $(srcdir)/../ref-simple $(FINAL_TARGET)/chrome/test ; then\
	  echo "TEST-UNEXPECTED-FAIL | config/tests/ref-simple | different content in jar" ; \
	  false; \
	fi

include $(topsrcdir)/config/rules.mk