summaryrefslogtreecommitdiff
path: root/qt-kde-team/2/list-missing.mk
blob: 8fb82ac10ae0b8ceb093f1ffca3dff0aaf1eb3d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Copyright © 2003 Colin Walters <walters@debian.org>
# Copyright © 2005-2011 Jonas Smedegaard <dr@jones.dk>
# Copyright © 2010-2011 Modestas Vainius <modax@debian.org>
# Description: Defines various random rules, including a list-missing rule
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2, or (at
# your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

ifdef dqk_dir

list-missing:
	@if test -d debian/tmp; then \
	  (cd debian/tmp && find . -type f -o -type l | grep -v '/DEBIAN/' | sort) > debian/dhmk-install-list; \
	  (for package in $(shell dh_listpackages); do \
	     (cd debian/$$package && find . -type f -o -type l); \
	   done; \
	   test -e debian/not-installed && grep -v '^#' debian/not-installed; \
	   ) | sort -u > debian/dhmk-package-list; \
	  diff -u debian/dhmk-install-list debian/dhmk-package-list | sed '1,2d' | egrep '^-' || true; \
	else \
	  echo "All files were installed into debian/$(shell dh_listpackages | head -n1)."; \
	fi

check-not-installed:
	@test -e debian/not-installed && \
	(for i in $(shell grep -v '^#' debian/not-installed); do \
		test -e debian/tmp/$$i || printf "File $$i not found in debian/tmp \n"; \
	done;) \
	|| printf "ERROR: debian/not-installed not found.\n"


post_clean:
	rm -f debian/dhmk-install-list debian/dhmk-package-list

.PHONY: list-missing check-not-installed

endif