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" ./configure \
16 --libexecdir=/usr/sbin \
21 build: build-arch build-indep
22 build-arch: build-stamp
23 build-indep: build-stamp
24 build-stamp: configure-stamp
26 RSH="/usr/bin/rsh" CFLAGS="-O2 -g -Wall -fno-gnu89-inline" $(MAKE)
28 ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
29 ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
31 if test $$runas = "root" ; \
33 echo "Sorry, but the test suite is not designed to be run as root."; \
36 (cd tests ; $(MAKE) clean)
41 perl debian/tarman > debian/tar.1
47 rm -f build-stamp configure-stamp debian/tar.1
48 [ ! -f Makefile ] || $(MAKE) distclean
57 make install bindir=`pwd`/debian/tar/bin prefix=`pwd`/debian/tar/usr \
58 libexecdir=`pwd`/debian/tar/usr/sbin
59 install -m 755 debian/rmt.sh debian/tar/etc/rmt
60 mv debian/tar/usr/sbin/rmt debian/tar/usr/sbin/rmt-tar
62 # Build architecture-independent files here.
63 binary-indep: build install
65 # Build architecture-dependent files here.
66 binary-arch: build install
70 mv -f debian/tar/usr/share/doc/tar/ChangeLog \
71 debian/tar/usr/share/doc/tar/changelog
72 mv -f debian/tar/usr/share/doc/tar/ChangeLog.1 \
73 debian/tar/usr/share/doc/tar/changelog.1
77 dh_installman debian/tar.1 debian/rmt.8
78 mv debian/tar/usr/share/man/man8/rmt.8 \
79 debian/tar/usr/share/man/man8/rmt-tar.8
81 rm -f debian/tar/usr/share/info/dir*
83 dh_installchangelogs #CHANGELOGS#
94 binary: binary-indep binary-arch
95 .PHONY: build clean binary-indep binary-arch binary install configure