[build] No need to pass source directory to gen-hb-version
The input file is by definition in the source directory, so dirname() that instead of needing the directory to be passed. Needed because a follow-up commit will change when this is called, and the source directory isn't trivially available at that point.
This commit is contained in:
parent
faf09f5466
commit
bc1c93fbe0
|
@ -4,15 +4,15 @@
|
|||
|
||||
import os, sys, shutil
|
||||
|
||||
if len (sys.argv) < 5:
|
||||
if len (sys.argv) < 4:
|
||||
sys.exit(__doc__)
|
||||
|
||||
version = sys.argv[1]
|
||||
major, minor, micro = version.split (".")
|
||||
|
||||
OUTPUT = sys.argv[2]
|
||||
CURRENT_SOURCE_DIR = sys.argv[3]
|
||||
INPUT = sys.argv[4]
|
||||
INPUT = sys.argv[3]
|
||||
CURRENT_SOURCE_DIR = os.path.dirname(INPUT)
|
||||
|
||||
with open (INPUT, "r", encoding='utf-8') as template:
|
||||
with open (OUTPUT, "wb") as output:
|
||||
|
|
|
@ -286,7 +286,7 @@ custom_target('hb-version.h',
|
|||
input: 'hb-version.h.in',
|
||||
output: 'hb-version.h',
|
||||
command: [find_program('gen-hb-version.py'), meson.project_version(),
|
||||
'@OUTPUT@', '@CURRENT_SOURCE_DIR@', '@INPUT@'],
|
||||
'@OUTPUT@', '@INPUT@'],
|
||||
)
|
||||
|
||||
ragel = find_program('ragel', required: false)
|
||||
|
|
Loading…
Reference in New Issue