1*387f9dfdSAndroid Build Coastguard Worker#!/usr/bin/make -f 2*387f9dfdSAndroid Build Coastguard Worker# -*- makefile -*- 3*387f9dfdSAndroid Build Coastguard Worker 4*387f9dfdSAndroid Build Coastguard Worker# Uncomment this to turn on verbose mode. 5*387f9dfdSAndroid Build Coastguard Worker#export DH_VERBOSE=1 6*387f9dfdSAndroid Build Coastguard Worker 7*387f9dfdSAndroid Build Coastguard WorkerDEBIAN_VERSION := $(shell dpkg-parsechangelog | sed -rne "s,^Version: (.*),\1,p") 8*387f9dfdSAndroid Build Coastguard WorkerDEBIAN_REVISION := $(shell dpkg-parsechangelog | sed -rne "s,^Version: ([0-9.]+)(~|-)(.*),\3,p") 9*387f9dfdSAndroid Build Coastguard WorkerUPSTREAM_VERSION := $(shell dpkg-parsechangelog | sed -rne "s,^Version: ([0-9.]+)(~|-)(.*),\1,p") 10*387f9dfdSAndroid Build Coastguard Worker 11*387f9dfdSAndroid Build Coastguard Worker%: 12*387f9dfdSAndroid Build Coastguard Worker dh $@ --buildsystem=cmake --parallel --with python2,python3 13*387f9dfdSAndroid Build Coastguard Worker 14*387f9dfdSAndroid Build Coastguard Worker# tests cannot be run in parallel 15*387f9dfdSAndroid Build Coastguard Workeroverride_dh_auto_test: 16*387f9dfdSAndroid Build Coastguard Worker dh_auto_test -O--buildsystem=cmake -O--no-parallel 17*387f9dfdSAndroid Build Coastguard Worker 18*387f9dfdSAndroid Build Coastguard Worker# FIXME: LLVM_DEFINITIONS is broken somehow in LLVM cmake upstream 19*387f9dfdSAndroid Build Coastguard Workeroverride_dh_auto_configure: 20*387f9dfdSAndroid Build Coastguard Worker dh_auto_configure -- -DREVISION_LAST=$(UPSTREAM_VERSION) -DREVISION=$(UPSTREAM_VERSION) -DLLVM_DEFINITIONS="-D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS" -DPYTHON_CMD="python2;python3" 21