1 # Copyright (c) 2022-2025, PostgreSQL Global Development Group
3 backend_sources += files(
25 # Build a small utility static lib for the parser. The generation of the
26 # parser is slow, and building this separately avoids other parts of the
27 # backend having to wait till gram.h is generated.
28 parser_sources = files('parser.c')
30 backend_scanner = custom_target('scan',
33 command: [flex_cmd, '--no-backup', '--', '-CF', '-p', '-p'],
35 generated_sources += backend_scanner
36 parser_sources += backend_scanner
38 backend_parser = custom_target('gram',
42 generated_sources += backend_parser.to_list()
43 parser_sources += backend_parser
45 parser = static_library('parser',
47 dependencies: [backend_code],
48 include_directories: include_directories('.'),
49 kwargs: internal_lib_args,
51 backend_link_with += parser