💻 Coding
Meson meson.build from a Source Inventory (Version-Locked, No Invented Options)
Write Meson meson.build files from a source inventory. Version-lock the Meson pin. Do not invent options or extra targets.
0Reviews
Prompt
Act as a Meson meson.build author who only uses a pasted source inventory. You write meson.build targets and option() lines the inventory already names. You do not invent extra options, wrap files, or extra executables. This is not a CMakeLists.txt dump, not a Bazel BUILD, and not a Buck2 TARGETS file.
You work only from Inputs. Do not invent stats, citations, quotes, URLs, names, IDs, or records that are not in Inputs.
Inputs:
- Source inventory I lock (names, kinds, srcs I allow): [Sources]
- Meson version I lock (or UNKNOWN): [Version]
- Options I lock (or NONE): [Options]
- Language I lock (or UNKNOWN): [LangCode]
- Words I must not use: [Banned]
- What I must never invent (options, extra srcs, wrap files, extra targets): [Never]
- Output format: [Format]
- Language for comments: [Lang]
- Test targets I allow (or NONE): [Tests]
Generate:
1. Honesty ledger: Sources, Version, Options, LangCode, Tests, Lang. Forbidden: invented option, extra srcs, wrap file.
2. Option lock table: each Options line quoted. If a build needs an option not listed, write NOT IN INPUTS.
3. project(): meson_version from Version or VERSION UNKNOWN. default_options only from Options or NONE.
4. meson.build: targets only from Sources. srcs only listed files. Do not add a wrap file unless Sources named it.
5. Refuse list: cmake_minimum_required, bazel_dep, Buck2 prelude, invented get_option('foo').
6. Tests: quote Tests or write NONE. Do not add a catch-all test() glob.
7. Never: do not write a wrapdb URL. Do not invent a C++ standard if LangCode is UNKNOWN.
8. Compliance pass: quote Banned and Never hits. Cut them. Format as Format.
Constraints:
- Meson meson.build from Sources and Options only. Not CMake and not Bazel.
- Never invent options, extra srcs, or wrap files.
- Only Tests named in Inputs.
- No emojis.Instructions
Replace every [bracket] with your details before running. Works on ChatGPT, Claude, and Gemini.
Examples
Example Input
Sources: executable name=mailer; srcs=src/cli.c; deps=libutil as pasted. static_library name=util; srcs=lib/util.c as pasted. shared_library NOT IN INPUTS. wrap file NOT IN INPUTS. Version: 1.5.1 as pasted Options: NONE (do not invent warning_level) LangCode: c as pasted. cpp NOT IN INPUTS. Banned: latest, wrapdb, always, guaranteed Never: invent options, invent extra srcs, invent wrap files, invent a test glob Format: ledger + lock-table + meson.build + refuse + gaps Lang: English comments Tests: NONE (do not add test())
Example Output
1. Ledger. Sources: executable mailer srcs src/cli.c deps libutil; static_library util srcs lib/util.c. shared_library NOT IN INPUTS. wrap NOT IN INPUTS. Version 1.5.1. Options NONE. LangCode c. Tests NONE. Lang English. Forbidden: latest, wrapdb, always, guaranteed, invented options, extra srcs, wrap files, test glob.
2. Lock table. options NONE. warning_level NOT IN INPUTS. cpp NOT IN INPUTS. wrapdb URL NOT IN INPUTS.
3. project() sketch. meson_version 1.5.1 as pasted. default_options omitted. Options NONE.
project('mailer', 'c', meson_version: '>=1.5.1')
# cpp not added. LangCode is c as pasted.
4. meson.build sketches.
util = static_library('util', 'lib/util.c')
executable('mailer', 'src/cli.c', link_with: util)
# shared_library omitted. NOT IN INPUTS.
# subproject wrap omitted. NOT IN INPUTS.
5. Refuse. cmake_minimum_required: refused. bazel_dep: refused. Buck2 prelude: refused. get_option('warning_level'): refused. wrapdb URL: refused. test() glob: refused.
6. Tests. NONE. test() not added.
7. Never. No minted option(). No extra src. No wrap file.
8. Compliance. Banned hits none. Format ledger+lock-table+meson.build+refuse+gaps. Gaps: warning_level, shared_library, wrap file, test names, cpp language.
Missing-data policy: if a field was blank, write NOT IN INPUTS rather than guessing. Lock any tool version named in Inputs; if unnamed, write unknown. No invented testimonials, star ratings, or press logos. If legal, clinical, insurance, HR, education-plan, or veterinary content appears, add a one-line not-advice and de-identify banner. Quote banned-word hits and cut them. End with a gaps list of five bullets the user still owes you. Character and byte caps in the job are hard; print counts when relevant. Refuse to backfill DOIs, exam dumps, PHI, PII, or compensation promises not in Inputs.