#!/usr/bin/make -f

# GCC 15 默认 C23 标准将 constexpr 变为保留关键字，而 unifdef.c 用它作变量名；
# 固定编译标准为 gnu17（GCC<=14 的默认值），恢复编译。
export CFLAGS := $(shell dpkg-buildflags --get CFLAGS) -std=gnu17

%:
	dh $@

# The prefix variable defaults to $HOME unless overridden.
override_dh_auto_install:
	dh_auto_install -- prefix=/usr

# multimissing test is not locale clean.  See Bug#841427.
override_dh_auto_test:
	env LC_ALL=C dh_auto_test

# dh_installman fails, unneeded, avoid.
override_dh_installman:

# The full changelog is small.
override_dh_installchangelogs:
	dh_installchangelogs --no-trim

override_dh_auto_clean:
	rm -f build-stamp
	rm -f unifdef
	rm -f version.h
	rm -f tests/*.out tests/*.err tests/*.rc
