Adding upstream version 3.0.4.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
This commit is contained in:
parent
1c8b56a4f5
commit
554424e00a
6822 changed files with 5440542 additions and 0 deletions
27
pdb/meson-enumcode.py
Normal file
27
pdb/meson-enumcode.py
Normal file
|
@ -0,0 +1,27 @@
|
|||
#!/usr/bin/env python3
|
||||
import os
|
||||
import sys
|
||||
import subprocess
|
||||
from datetime import datetime
|
||||
|
||||
PERL = sys.argv[1]
|
||||
top_srcdir = sys.argv[2]
|
||||
top_builddir = sys.argv[3]
|
||||
|
||||
# Environment for the pdbgen.pl file.
|
||||
os.environ['destdir'] = os.path.abspath(top_srcdir)
|
||||
os.environ['builddir'] = os.path.abspath(top_builddir)
|
||||
|
||||
os.chdir(top_srcdir)
|
||||
result = subprocess.run(
|
||||
[PERL,
|
||||
'-I', os.path.join(top_builddir, 'pdb'),
|
||||
'-I', os.path.join(top_srcdir, 'pdb'),
|
||||
os.path.join(top_srcdir, 'pdb', 'enumcode.pl')],
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE
|
||||
)
|
||||
if result.returncode == 0:
|
||||
with open(os.path.join(top_builddir, 'pdb', 'stamp-enumcode.h'), 'w') as f:
|
||||
f.write(f"/* Generated on {datetime.now().strftime('%a %b %d %H:%M:%S %Z %Y')}. */\n")
|
||||
sys.exit(result.returncode)
|
Loading…
Add table
Add a link
Reference in a new issue