freebsd-dev/usr.bin/localedef/Makefile
Alex Richardson 00c61a3b43 Allow bootstrapping localdef on non-FreeBSD systems
The current localedef simply assumes that the locale headers on build system
are compatible with those on the target system which is not necessarily true.
It generally works on FreeBSD (as long as we don't change the locale headers),
but Linux and macOS provide completely different locale headers.

This change adds new bootstrap headers that namespace certain xlocale
structures defined or used by in the headers that localdef needs.
This is required since system headers *must* be able to include the "real"
locale headers for printf(), etc., but we also want to access the target
systems's internal locale structures.

Reviewed By: yuripv, brooks
Differential Revision: https://reviews.freebsd.org/D25229
2020-07-15 12:07:59 +00:00

30 lines
434 B
Makefile

# $FreeBSD$
PROG= localedef
SRCS= charmap.c \
collate.c \
ctype.c \
localedef.c \
messages.c \
monetary.c \
numeric.c \
parser.y \
scanner.c \
time.c \
wide.c
WARNS= 3
${SRCS:M*.c}: parser.h
parser.h: parser.y
IGNORE_PRAGMA= yes
CFLAGS+= -I. -I${.CURDIR}
.if defined(BOOTSTRAPPING)
CFLAGS+= -I${.CURDIR}/bootstrap
.endif
CFLAGS+= -I${SRCTOP}/lib/libc/locale
CFLAGS+= -I${SRCTOP}/lib/libc/stdtime
.include <bsd.prog.mk>