include bsd.own.mk to ensure that USE_XZ_SETS is set properly before using it.

this should fix PR#56919.
This commit is contained in:
mrg 2022-07-10 04:01:07 +00:00
parent e7d7b85e33
commit 441b3b4dac

View File

@ -1,6 +1,8 @@
# $NetBSD: Makefile,v 1.11 2020/06/03 07:06:18 rin Exp $
# $NetBSD: Makefile,v 1.12 2022/07/10 04:01:07 mrg Exp $
# Build a tiny limited gzip (i.e. for tiny boot media)
.include <bsd.own.mk>
SRCDIR= ${.CURDIR}/../../../usr.bin/gzip
PROG= gzip
@ -11,15 +13,17 @@ CPPFLAGS+= -DNO_BZIP2_SUPPORT
CPPFLAGS+= -DNO_COMPRESS_SUPPORT
CPPFLAGS+= -DNO_PACK_SUPPORT
CPPFLAGS+= -DNO_LZ_SUPPORT
CPPFLAGS+= ${"${USE_XZ_SETS:Uno}"!="no":?:-DNO_XZ_SUPPORT}
# for crunched binaries this does not take effect, also check the
# LIBS entry in the lists file
DPADD= ${LIBZ}
LDADD= -lz
.if ${USE_XZ_SETS:Uno} != "no"
DPADD+= ${LIBLZMA}
LDADD+= -llzma
.else
CPPFLAGS+= -DNO_XZ_SUPPORT
.endif
.include <bsd.prog.mk>