usr.bin/gh-bc: fix Makefile for WITHOUT_NLS_CATALOGS case

Some macro definitions had been moved into a Makefile section
that depends on MK_NLS_CATALOGS != "no", leading to LTO and the
installation of tests being disabled in the WITHOUT_NLS_CATALOGS
case.

Reported by:	Yuri <yuri@aetern.org>
This commit is contained in:
Stefan Eßer 2023-07-29 20:52:53 +02:00
parent dbac8474fe
commit 382af2f8d7

View File

@ -61,6 +61,14 @@ CFLAGS+= -DNDEBUG
CFLAGS+= -DNLSPATH=/usr/share/nls/%L/%N.cat
CFLAGS+= -I${BCDIR}/include
# prevent floating point incompatibilities caused by -flto on some architectures
.if ${MACHINE_ARCH} != riscv64
CFLAGS+= -flto
.endif
HAS_TESTS= yes
SUBDIR.${MK_TESTS}+= tests
.if ${MK_NLS_CATALOGS} == "no"
CFLAGS+= -DBC_ENABLE_NLS=0
MAN_SRC_BC= bc/N.1
@ -70,14 +78,6 @@ CFLAGS+= -DBC_ENABLE_NLS=1
MAN_SRC_BC= bc/A.1
MAN_SRC_DC= dc/A.1
# prevent floating point incompatibilities caused by -flto on some architectures
.if ${MACHINE_ARCH} != riscv64
CFLAGS+= -flto
.endif
HAS_TESTS= yes
SUBDIR.${MK_TESTS}+= tests
.for catalog in ${CATALOGS}
NLS+= ${catalog:C/.*://}
NLSSRCFILES_${catalog:C/.*://}= ${catalog:C/.*://}.msg