strace/debian/rules
Dmitry V. Levin 73166c3fd1 debian: sync with 4.21-1 package
Versioned dependency on debhelper is not updated for backwards
compatibility.

* debian/changelog.in: Fix ancient changelog entries.
* debian/control (Build-Depends): Add dependency on libbluetooth-dev.
(Standards-Version): Update to 4.1.3.
(Vcs-Git, Vcs-Browser): Move from alioth to salsa.d.o.
(strace, strace-udeb) <Architecture>: Change to linux-any.
(strace64, strace-udeb) <Priority>: Change to optional.
* debian/rules: Use /usr/share/dpkg/architecture.mk instead of manually
setting build variables.
(configure): New target.
(build/Makefile, build-udeb/Makefile, build64/Makefile): Depend on it.
(binary-arch): Use build64/strace.1 for strace64 subpackage.
* debian/strace.manpages: Add build/ prefix.
* debian/strace64.manpages: Add build64/ prefix.
2018-02-25 00:31:14 +00:00

104 lines
2.4 KiB
Makefile
Executable File

#! /usr/bin/make -f
#export DH_VERBOSE=1
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk
include /usr/share/dpkg/architecture.mk
CFLAGS += -Wall -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
MAKEFLAGS += -j$(NUMJOBS)
endif
extra_build_targets += build-udeb-stamp
arch64_map = i386=x86_64 powerpc=powerpc64 sparc=sparc64 s390=s390x
ifneq (,$(filter $(DEB_HOST_ARCH)=%, $(arch64_map)))
HOST64 = $(strip $(patsubst $(DEB_HOST_ARCH)=%, %, \
$(filter $(DEB_HOST_ARCH)=%, $(arch64_map))))-linux-gnu
CC64 = gcc -m64
extra_build_targets += build64-stamp
endif
ifeq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
CONFIG_OPTS = --build=$(DEB_BUILD_GNU_TYPE)
else
CONFIG_OPTS = --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
endif
all: build
build: build-arch build-indep
build-arch: build-stamp $(extra_build_targets)
build-indep: build-stamp $(extra_build_targets)
configure:
./bootstrap
%-stamp: %/Makefile
$(MAKE) -C $*
ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
$*/strace -V
$(MAKE) -C $* check VERBOSE=1
endif
touch $@
build/Makefile: configure
mkdir -p $(@D)
cd $(@D); sh ../configure --enable-mpers=check --prefix=/usr $(CONFIG_OPTS)
build-udeb/Makefile: configure
mkdir -p $(@D)
cd $(@D); sh ../configure --enable-mpers=check --prefix=/usr \
--without-libunwind --without-libiberty $(CONFIG_OPTS)
build64/Makefile: configure
mkdir -p $(@D)
cd $(@D); CC="$(CC64)" sh ../configure --enable-mpers=check --prefix=/usr --build=$(DEB_BUILD_GNU_TYPE) --host=$(HOST64)
clean:
dh_testdir
dh_testroot
rm -rf build build-udeb build64 strace64.1 debian/strace64.substvars
dh_clean
binary: binary-indep binary-arch
binary-indep:
binary-arch: build
test -f build-stamp || make $(MFLAGS) -f debian/rules build
# prepare 64bit executable and manpage, if it has been built
test -f build64-stamp && ( mv build64/strace build64/strace64 ; \
mv build64/strace.1 build64/strace64.1 ) || true
dh_testdir -a
dh_testroot -a
dh_installdirs -a
dh_installdocs -a
dh_installman -a
dh_installexamples -a
dh_installchangelogs -a
dh_install -a
dh_link -a
dh_strip -a
dh_compress -a
dh_fixperms -a
dh_installdeb -a
dh_shlibdeps -a
dh_gencontrol -a
dh_md5sums -a
dh_builddeb -a