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/lib/tar \
22 --enable-backup-scripts \
27 build: build-arch build-indep
28 build-arch: build-stamp
29 build-indep: build-stamp
30 build-stamp: configure-stamp
32 RSH="/usr/bin/rsh" CFLAGS="-O2 -g -Wall -fno-gnu89-inline" $(MAKE)
34 ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
35 ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
37 if test $$runas = "root" ; \
39 echo "Sorry, but the test suite is not designed to be run as root."; \
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/lib/tar
64 install -m 755 debian/rmt.sh debian/tar/etc/rmt
65 mv debian/tar/usr/lib/tar/rmt debian/tar/usr/sbin/rmt-tar
66 install -m 755 debian/tarcat debian/tar/usr/sbin/tarcat
68 mv debian/tar/usr/sbin/backup debian/tar-scripts/usr/sbin/tar-backup
69 mv debian/tar/usr/sbin/restore debian/tar-scripts/usr/sbin/tar-restore
70 mv debian/tar/usr/lib/tar/backup.sh debian/tar-scripts/usr/lib/tar/
71 mv debian/tar/usr/lib/tar/dump-remind debian/tar-scripts/usr/lib/tar/
73 # Build architecture-independent files here.
74 binary-indep: build install
76 # Build architecture-dependent files here.
77 binary-arch: build install
81 mv -f debian/tar/usr/share/doc/tar/ChangeLog \
82 debian/tar/usr/share/doc/tar/changelog
83 mv -f debian/tar/usr/share/doc/tar/ChangeLog.1 \
84 debian/tar/usr/share/doc/tar/changelog.1
88 dh_installman debian/tar.1 debian/rmt.8 debian/tarcat.1
89 mv debian/tar/usr/share/man/man8/rmt.8 \
90 debian/tar/usr/share/man/man8/rmt-tar.8
92 rm -f debian/tar/usr/share/info/dir*
94 dh_installchangelogs #CHANGELOGS#
105 binary: binary-indep binary-arch
106 .PHONY: build clean binary-indep binary-arch binary install configure