8000 Test extensions by nbyavuz · Pull Request #55 · anarazel/postgres · GitHub
[go: up one dir, main page]

Skip to content

Test extensions #55

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 14 commits into
base: meson
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
meson: add generated header stamps
  • Loading branch information
anarazel committed Jun 3, 2023
commit a8bbae39d16f08d6f302a52e6ef658050a2a8695
14 changes: 8 additions & 6 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -2706,6 +2706,8 @@ gen_export_kwargs = {
'install': false,
}

# command to create stamp files on all OSs
stamp_cmd = [python, '-c', 'import sys; open(sys.argv[1], "w")', '@OUTPUT0@']


###
Expand Down Expand Up @@ -2809,14 +2811,14 @@ subdir('src/port')
frontend_common_code = declare_dependency(
compile_args: ['-DFRONTEND'],
include_directories: [postgres_inc],
sources: generated_headers,
sources: generated_headers_stamp,
dependencies: [os_deps, zlib, zstd],
)

backend_common_code = declare_dependency(
compile_args: ['-DBUILDING_DLL'],
include_directories: [postgres_inc],
sources: generated_headers,
sources: generated_headers_stamp,
dependencies: [os_deps, zlib, zstd],
)

Expand All @@ -2831,15 +2833,15 @@ shlib_code = declare_dependency(
frontend_stlib_code = declare_dependency(
include_directories: [postgres_inc],
link_with: [common_static, pgport_static],
sources: generated_headers,
sources: generated_headers_stamp,
dependencies: [os_deps, libintl],
)

# all shared libraries not part of the backend should depend on this
frontend_shlib_code = declare_dependency(
include_directories: [postgres_inc],
link_with: [common_shlib, pgport_shlib],
sources: generated_headers,
sources: generated_headers_stamp,
dependencies: [shlib_code, os_deps, libintl],
)

Expand All @@ -2861,7 +2863,7 @@ subdir('src/fe_utils')
frontend_code = declare_dependency(
include_directories: [postgres_inc],
link_with: [fe_utils, common_static, pgport_static],
sources: generated_headers,
sources: generated_headers_stamp,
dependencies: [os_deps, libintl],
)

Expand Down Expand Up @@ -2889,7 +2891,7 @@ backend_code = declare_dependency(
include_directories: [postgres_inc],
link_args: ldflags_be,
link_with: [],
sources: generated_headers + generated_backend_headers,
sources: [generated_backend_headers_stamp],
dependencies: os_deps + backend_both_deps + backend_deps,
)

Expand Down
2 changes: 1 addition & 1 deletion src/backend/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ backend_mod_code = declare_dependency(
compile_args: pg_mod_c_args,
include_directories: postgres_inc,
link_args: pg_mod_link_args,
sources: generated_headers + generated_backend_headers,
sources: [generated_backend_headers_stamp],
dependencies: backend_mod_deps,
)

Expand Down
2 changes: 1 addition & 1 deletion src/fe_utils/meson.build
< BDCF /thead>
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ generated_sources += psqlscan
fe_utils_sources += psqlscan

fe_utils = static_library('libpgfeutils',
fe_utils_sources + generated_headers,
fe_utils_sources,
c_pch: pch_postgres_fe_h,
include_directories: [postgres_inc, libpq_inc],
c_args: host_system == 'windows' ? ['-DFD_SETSIZE=1024'] : [],
Expand Down
14 changes: 14 additions & 0 deletions src/include/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -186,3 +186,17 @@ install_subdir('catalog',

# autoconf generates the file there, ensure we get a conflict
generated_sources_ac += {'src/include': ['stamp-h', 'stamp-ext-h']}


generated_headers_stamp = custom_target('generated-headers-stamp.h',
output: 'generated-headers-stamp.h',
input: [generated_headers],
command: stamp_cmd,
)

generated_backend_headers_stamp = custom_target('generated-backend-headers-stamp.h',
output: 'generated-backend-headers-stamp.h',
input: [generated_backend_headers],
depends: generated_headers_stamp,
command: stamp_cmd,
)
0