Multiple @BASENAME@ for configure_file() raising warning
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 6.6k
- Forks
- 1.9k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 33
Description
I have this snippet of meson :
configure_file(
input: 'intel_sanitize_gpu.in',
output: '@BASENAME@',
install_dir: get_option('bindir'),
configuration: sanitize_data,
)
libintel_sanitize_gpu = shared_library(
'intel_sanitize_gpu',
files('intel_sanitize_gpu.c'),
dependencies : [dep_dl, dep_thread],
include_directories : [inc_common, inc_intel, inc_drm_uapi],
link_with : [libintel_common, libmesa_util],
c_args : [c_vis_args, no_override_init_args],
install_dir: get_option('libexecdir'),
install: true,
)
configure_file(
input : 'intel_dump_gpu.in',
output : '@BASENAME@',
install_dir: get_option('bindir'),
configuration: sanitize_data,
)
It's raising the following warning :
WARNING: Output file "src/intel/tools/@BASENAME@" for configure_file() at src/intel/tools/meson.build:67 overwrites configure_file() output at src/intel/tools/meson.build:49
(line 49 is first configure_file(), line 67 and the second one)
The resulting files are fine, it's just odd to raise a warning on a template that should be replaced.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the two configure_file() calls from the issue in a meson.build file, then trace configure_file() output-name handling and the warning for duplicate outputs. Done means the @BASENAME@ placeholders resolve to distinct files without the spurious overwrite warning, while genuine duplicate outputs still warn.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100