File: rules

package info (click to toggle)
xfsprogs 4.9.0+nmu1
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 8,012 kB
  • ctags: 10,574
  • sloc: ansic: 110,850; sh: 3,804; makefile: 863; python: 126
file content (96 lines) | stat: -rwxr-xr-x 2,435 bytes parent folder | download
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
#!/usr/bin/make -f

export DH_VERBOSE=1

package = xfsprogs
develop = xfslibs-dev
bootpkg = xfsprogs-udeb

version = $(shell dpkg-parsechangelog | grep ^Version: | cut -d ' ' -f 2)
target ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
udebpkg = $(bootpkg)_$(version)_$(target).udeb

dirme  = debian/$(package)
dirdev = debian/$(develop)
dirdi  = debian/$(bootpkg)
pkgme  = DIST_ROOT=`pwd`/$(dirme);  export DIST_ROOT;
pkgdev = DIST_ROOT=`pwd`/$(dirdev); export DIST_ROOT;
pkgdi  = DIST_ROOT=`pwd`/$(dirdi); export DIST_ROOT;
stdenv = @GZIP=-q; export GZIP;

options = export DEBUG=-DNDEBUG DISTRIBUTION=debian \
	  INSTALL_USER=root INSTALL_GROUP=root \
	  LOCAL_CONFIGURE_OPTIONS="--enable-readline=yes --enable-blkid=yes" ;
diopts  = $(options) \
	  export OPTIMIZER=-Os LOCAL_CONFIGURE_OPTIONS="--enable-gettext=no" ;
checkdir = test -f debian/rules

build: built
built: dibuild config
	@echo "== dpkg-buildpackage: build" 1>&2
	$(MAKE) default
	touch built

config: .census
.census:
	@echo "== dpkg-buildpackage: configure" 1>&2
	$(checkdir)
	AUTOHEADER=/bin/true dh_autoreconf
	$(options) $(MAKE) include/platform_defs.h
	touch .census

dibuild:
	$(checkdir)
	@echo "== dpkg-buildpackage: installer" 1>&2
	if [ ! -f mkfs/mkfs.xfs-$(bootpkg) ]; then \
		$(diopts) $(MAKE) include/platform_defs.h; \
		mkdir -p include/xfs; \
		for dir in include libxfs; do \
			$(MAKE) -C $$dir NODEP=1 install-headers; \
		done; \
		for dir in include libxfs libxcmd mkfs; do \
			$(MAKE) -C $$dir; \
		done; \
		mv mkfs/mkfs.xfs mkfs/mkfs.xfs-$(bootpkg); \
		$(MAKE) distclean; \
	fi

clean:
	@echo "== dpkg-buildpackage: clean" 1>&2
	$(checkdir)
	-rm -f built .census mkfs/mkfs.xfs-$(bootpkg)
	$(MAKE) distclean
	-rm -rf $(dirme) $(dirdev) $(dirdi)
	-rm -f debian/*substvars debian/files* debian/*.debhelper
	dh_autoreconf_clean
	dh_clean

binary-indep:

binary-arch: checkroot built
	@echo "== dpkg-buildpackage: binary-arch" 1>&2
	$(checkdir)
	-rm -rf $(dirme) $(dirdev) $(dirdi)
	$(pkgme)  $(MAKE) -C . install
	$(pkgdev) $(MAKE) -C . install-dev
	$(pkgdi)  $(MAKE) -C debian install-d-i
	$(pkgme)  $(MAKE) dist
	rmdir debian/xfslibs-dev/usr/share/doc/xfsprogs
	dh_installdocs
	dh_installchangelogs
	dh_strip
	dh_compress
	dh_fixperms
	dh_makeshlibs
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-indep binary-arch

checkroot:
	test 0 -eq `id -u`

.PHONY: binary binary-arch binary-indep clean checkroot