3 DEB_BUILD_GNU_TYPE = $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
4 DEB_HOST_GNU_TYPE = $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
5 ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
6 CONFARGS = --host=$(DEB_HOST_GNU_TYPE)
9 configure: configure-stamp
12 cp -f /usr/share/misc/config.sub build-aux/config.sub
13 cp -f /usr/share/misc/config.guess build-aux/config.guess
14 RSH="/usr/bin/rsh" CFLAGS="-O2 -g -Wall" \
15 ./configure --prefix=/usr --libexecdir=/usr/sbin $(CONFARGS)
19 build-stamp: configure-stamp
21 RSH="/usr/bin/rsh" CFLAGS="-O2 -g -Wall -fno-gnu89-inline" $(MAKE)
23 ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
24 ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
25 (cd tests ; $(MAKE) clean)
30 perl debian/tarman > debian/tar.1
36 rm -f build-stamp configure-stamp debian/tar.1
37 [ ! -f Makefile ] || $(MAKE) distclean
46 make install bindir=`pwd`/debian/tar/bin prefix=`pwd`/debian/tar/usr \
47 libexecdir=`pwd`/debian/tar/usr/sbin
48 install -m 755 debian/rmt.sh debian/tar/etc/rmt
49 mv debian/tar/usr/sbin/rmt debian/tar/usr/sbin/rmt-tar
51 # Build architecture-independent files here.
52 binary-indep: build install
54 # Build architecture-dependent files here.
55 binary-arch: build install
59 mv -f debian/tar/usr/share/doc/tar/ChangeLog \
60 debian/tar/usr/share/doc/tar/changelog
61 mv -f debian/tar/usr/share/doc/tar/ChangeLog.1 \
62 debian/tar/usr/share/doc/tar/changelog.1
66 dh_installman debian/tar.1 debian/rmt.8
67 mv debian/tar/usr/share/man/man8/rmt.8 \
68 debian/tar/usr/share/man/man8/rmt-tar.8
70 rm -f debian/tar/usr/share/info/dir*
72 dh_installchangelogs #CHANGELOGS#
83 binary: binary-indep binary-arch
84 .PHONY: build clean binary-indep binary-arch binary install configure