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 CFLAGS = `dpkg-buildflags --get CFLAGS`
11 LDFLAGS += `dpkg-buildflags --get LDFLAGS`
12 CPPFLAGS = `dpkg-buildflags --get CPPFLAGS`
14 configure: configure-stamp
17 cp -f /usr/share/misc/config.sub build-aux/config.sub
18 cp -f /usr/share/misc/config.guess build-aux/config.guess
19 RSH="/usr/bin/rsh" CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" ./configure \
21 --libexecdir=/usr/sbin \
26 build: build-arch build-indep
27 build-arch: build-stamp
28 build-indep: build-stamp
29 build-stamp: configure-stamp
31 RSH="/usr/bin/rsh" CFLAGS="-O2 -g -Wall -fno-gnu89-inline" $(MAKE)
33 ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
34 ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
36 if test $$runas = "root" ; \
38 echo "Sorry, but the test suite is not designed to be run as root."; \
41 (cd tests ; $(MAKE) clean)
46 perl debian/tarman > debian/tar.1
52 rm -f build-stamp configure-stamp debian/tar.1
53 [ ! -f Makefile ] || $(MAKE) distclean
62 make install bindir=`pwd`/debian/tar/bin prefix=`pwd`/debian/tar/usr \
63 libexecdir=`pwd`/debian/tar/usr/sbin
64 install -m 755 debian/rmt.sh debian/tar/etc/rmt
65 mv debian/tar/usr/sbin/rmt debian/tar/usr/sbin/rmt-tar
66 install -m 755 debian/tarcat debian/tar/usr/sbin/tarcat
68 # Build architecture-independent files here.
69 binary-indep: build install
71 # Build architecture-dependent files here.
72 binary-arch: build install
76 mv -f debian/tar/usr/share/doc/tar/ChangeLog \
77 debian/tar/usr/share/doc/tar/changelog
78 mv -f debian/tar/usr/share/doc/tar/ChangeLog.1 \
79 debian/tar/usr/share/doc/tar/changelog.1
83 dh_installman debian/tar.1 debian/rmt.8
84 mv debian/tar/usr/share/man/man8/rmt.8 \
85 debian/tar/usr/share/man/man8/rmt-tar.8
87 rm -f debian/tar/usr/share/info/dir*
89 dh_installchangelogs #CHANGELOGS#
100 binary: binary-indep binary-arch
101 .PHONY: build clean binary-indep binary-arch binary install configure