[parser] Makefile nonsense
Includes are now explicit so they can be extracted into dependencies for the makefile.
This commit is contained in:
parent
385c378edb
commit
6692d12d36
4 changed files with 59 additions and 0 deletions
16
makedep.py
Normal file
16
makedep.py
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import tomllib
|
||||
|
||||
|
||||
def main():
|
||||
with open("pyproject.toml", "rb") as f:
|
||||
result = tomllib.load(f)
|
||||
version = result["project"]["version"]
|
||||
includes = result["tool"]["pdm"]["build"]["includes"]
|
||||
with open("lrparser.mk", "w", encoding="utf-8") as f:
|
||||
f.write("# This file generated by makedep.py\n")
|
||||
f.write(f"VERSION={version}\n")
|
||||
f.write(f"PYTHON_SOURCES=\\\n\t{' \\\n\t'.join(includes)}\n")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Loading…
Add table
Add a link
Reference in a new issue