summaryrefslogtreecommitdiff
path: root/src/compare.mk.in
diff options
context:
space:
mode:
authorFabien Tassin <fta@sofaraway.org>2008-02-22 23:01:51 +0100
committerFabien Tassin <fta@sofaraway.org>2008-02-22 23:01:51 +0100
commitc1c682f4a7d4eb1e4200f46de1df8acdf28d52da (patch)
treefbc82bf6cc5c0a636a52f3c79b13b80275a77bbe /src/compare.mk.in
parent911eecd0be04555df9bb53783a99a3609a838b58 (diff)
* Update the compare module to also check dist/bin vs debian/tmp
- update src/compare.mk.in - update src/firefox-3.0.mk.in - update src/xulrunner-1.9.mk.in - update README
Diffstat (limited to 'src/compare.mk.in')
-rw-r--r--src/compare.mk.in43
1 files changed, 33 insertions, 10 deletions
diff --git a/src/compare.mk.in b/src/compare.mk.in
index db73a8f..29cb628 100644
--- a/src/compare.mk.in
+++ b/src/compare.mk.in
@@ -23,25 +23,48 @@
# file instead, which will include this file for you.
# The following target is available to the caller:
-# compare: check the difference between what has been installed in debian/tmp
-# by the (upstream) make install rule and what has been put in the debs.
+# compare: check the difference between:
+# a/ what has been built (in dists/bin) and what has been installed (in debian/tmp)
+# b/ what has been installed (in debian/tmp) and what has been put in the debs
+# dists/bin is populated by the upstream build system
+# debian/tmp is populated according to upstream installer/package-static files
#
# The following variable are available:
-# COMPARE_FILTER_IN and COMPARE_FILTER_OUT
-# By default, both are 'sed' commands that could be augmented (+=) or
+# COMPARE_FILTER_PRE_IN and COMPARE_FILTER_PRE_OUT (for a/)
+# COMPARE_FILTER_IN and COMPARE_FILTER_OUT (for b/)
+# By default, all are 'sed' commands that could be augmented (+=) or
# overwritten by the caller.
TEMP := $(shell echo $$$$)
+LIST_BUILT := /tmp/built.$(TEMP)
LIST_INSTALLED := /tmp/installed.$(TEMP)
LIST_IN_DEBS := /tmp/in_debs.$(TEMP)
PKG_DIRS = $(addprefix debian/,$(shell grep ^Package debian/control | cut -d' ' -f2))
compare:
- @echo "## Compare..."
- @find debian/tmp -type f | cut -d/ -f3- | $(COMPARE_FILTER_IN) | sort > $(LIST_INSTALLED)
- @find $(PKG_DIRS) -type f | cut -d/ -f3- | $(COMPARE_FILTER_OUT) | sort > $(LIST_IN_DEBS)
- @-diff -u $(LIST_INSTALLED) $(LIST_IN_DEBS) | grep -E '^(\+|-).' | tail -n +3
- @rm -f $(LIST_INSTALLED) $(LIST_IN_DEBS)
+ @if [ "Z${COMPARE_FILTER_PRE_IN}Z" = "ZZ" ] ; then \
+ echo "## Can't compare dist/bin and debian/tmp (no COMPARE_FILTER_PRE_IN filter defined)" ; \
+ else \
+ if [ -d mozilla ] ; then \
+ find mozilla/dist/bin \! -type d | cut -d/ -f4- | $(COMPARE_FILTER_PRE_IN) | sort > $(LIST_BUILT) ; \
+ elif [ -d build-tree/mozilla ] ; then \
+ find build-tree/mozilla/dist/bin \! -type d | cut -d/ -f5- | $(COMPARE_FILTER_PRE_IN) | sort > $(LIST_BUILT) ; \
+ elif [ -d dist ] ; then \
+ find dist/bin \! -type d | cut -d/ -f3- | $(COMPARE_FILTER_PRE_IN) | sort > $(LIST_BUILT) ; \
+ fi ; \
+ find debian/tmp -type f | cut -d/ -f3- | $(COMPARE_FILTER_PRE_OUT) | sort > $(LIST_INSTALLED) ; \
+ echo "## Compare the content of dist/bin and debian/tmp..." ; \
+ diff -u $(LIST_BUILT) $(LIST_INSTALLED) | grep -E '^(\+|-).' | tail -n +3 ;\
+ echo "## =================================================" ; \
+ fi
+ @if [ "Z${COMPARE_FILTER_IN}Z" = "ZZ" ] ; then \
+ echo "## Can't compare debian/tmp and the debs produced (no COMPARE_FILTER_IN filter defined)" ; \
+ else \
+ echo "## Compare the content of debian/tmp and the debs produced..." ; \
+ find debian/tmp -type f | cut -d/ -f3- | $(COMPARE_FILTER_IN) | sort > $(LIST_INSTALLED) ; \
+ find $(PKG_DIRS) -type f | cut -d/ -f3- | $(COMPARE_FILTER_OUT) | sort > $(LIST_IN_DEBS) ; \
+ diff -u $(LIST_INSTALLED) $(LIST_IN_DEBS) | grep -E '^(\+|-).' | tail -n +3 ; \
+ fi
@echo "## End of Compare"
-
+ @rm -f $(LIST_BUILT) $(LIST_INSTALLED) $(LIST_IN_DEBS)