mirror of
https://github.com/genodelabs/genode.git
synced 2025-02-28 04:13:17 +00:00
The files are generated via flex and bison. Until now, this step was performed when preparing the libc port. Unfortunately, the generated files have subtle differences depending on the flex/bison versions installed in the host. For example, the bison version number appears in the generated code. This, in turn, breaks the hash mechanism of the depot where a src/libc archive ends up being slightly different when created on different hosts. By moving the code generation to the build stage, the src/libc archive merely contains the nslexer.l and nsparser.y source files but not the generated files.
51 lines
1.2 KiB
Makefile
51 lines
1.2 KiB
Makefile
LIBC_NET_DIR = $(LIBC_DIR)/lib/libc/net
|
|
|
|
# needed for compiling getservbyname() and getservbyport()
|
|
SRC_C = getservent.c nsdispatch.c nsparser.c nslexer.c
|
|
|
|
# needed for getaddrinfo()
|
|
SRC_C += getaddrinfo.c
|
|
|
|
# needed for getnameinfo()
|
|
SRC_C += getnameinfo.c name6.c
|
|
|
|
# needed for gethostbyname()
|
|
SRC_C += gethostnamadr.c gethostbydns.c gethostbyht.c map_v4v6.c
|
|
|
|
# needed for getprotobyname()
|
|
SRC_C += getprotoent.c getprotoname.c
|
|
|
|
# defines in6addr_any
|
|
SRC_C += vars.c
|
|
|
|
# b64_ntop
|
|
SRC_C += base64.c
|
|
|
|
SRC_C += rcmd.c rcmdsh.c
|
|
|
|
include $(REP_DIR)/lib/mk/libc-common.inc
|
|
|
|
INC_DIR += $(REP_DIR)/include/libc
|
|
INC_DIR += $(REP_DIR)/include/libc/sys
|
|
INC_DIR += $(LIBC_PORT_DIR)/include/libc/sys
|
|
|
|
# needed for name6.c, contains res_private.h
|
|
INC_DIR += $(LIBC_DIR)/lib/libc/resolv
|
|
|
|
vpath %.c $(LIBC_NET_DIR)
|
|
|
|
nslexer.o: nsparser.c nsparser.c
|
|
|
|
nslexer.c: nslexer.l
|
|
$(MSG_CONVERT)$(notdir $@)
|
|
$(VERBOSE)flex -P_nsyy -t $< | sed -e '/YY_BUF_SIZE/s/16384/1024/' > $@
|
|
|
|
vpath nslexer.l $(LIBC_NET_DIR)
|
|
|
|
nsparser.c: nsparser.y
|
|
$(MSG_CONVERT)$(notdir $@)
|
|
$(VERBOSE)bison -d -p_nsyy $< \
|
|
--defines=$(LIBC_PORT_DIR)/src/lib/libc/lib/libc/net/nsparser.h --output=$@
|
|
|
|
vpath nsparser.y $(LIBC_NET_DIR)
|