|
| 1 | +# Copyright (c) 2025, Postgres Professional |
| 2 | + |
| 3 | +# Does not support the PGXS infrastructure at this time. Please, compile as part |
| 4 | +# of the contrib source tree. |
| 5 | + |
| 6 | +jsquery_sources=files( |
| 7 | +'jsonb_gin_ops.c', |
| 8 | +'jsquery_constr.c', |
| 9 | +'jsquery_extract.c', |
| 10 | +'jsquery_io.c', |
| 11 | +'jsquery_op.c', |
| 12 | +'jsquery_support.c', |
| 13 | +) |
| 14 | + |
| 15 | +jsquery_gram=custom_target('jsquerygram', |
| 16 | +input:'jsquery_gram.y', |
| 17 | +kwargs: bison_kw, |
| 18 | +) |
| 19 | +generated_sources+= jsquery_gram.to_list() |
| 20 | +jsquery_sources+= jsquery_gram |
| 21 | + |
| 22 | +run_command(flex,'--outfile=jsquery_scan.c','jsquery_scan.l',check:true) |
| 23 | + |
| 24 | +if host_system=='windows' |
| 25 | + jsquery_sources+= rc_lib_gen.process(win32ver_rc,extra_args: [ |
| 26 | +'--NAME','jsquery', |
| 27 | +'--FILEDESC','jsquery - language to query jsonb data type.',]) |
| 28 | +endif |
| 29 | + |
| 30 | +jsquery=shared_module('jsquery', |
| 31 | + jsquery_sources, |
| 32 | +include_directories:include_directories('.'), |
| 33 | +kwargs: contrib_mod_args, |
| 34 | +) |
| 35 | +contrib_targets+= jsquery |
| 36 | + |
| 37 | +install_data( |
| 38 | +'jsquery.control', |
| 39 | +'jsquery--1.0--1.1.sql', |
| 40 | +'jsquery--1.1.sql', |
| 41 | +kwargs: contrib_data_args, |
| 42 | +) |
| 43 | + |
| 44 | +tests+= { |
| 45 | +'name':'jsquery', |
| 46 | +'sd':meson.current_source_dir(), |
| 47 | +'bd':meson.current_build_dir(), |
| 48 | +'regress': { |
| 49 | +'sql': [ |
| 50 | +'jsquery', |
| 51 | + ], |
| 52 | + }, |
| 53 | +} |