mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-26 15:36:14 +01:00
meson: Undefine STAP_HAS_SEMAPHORES and _STD_HAS_SEMAPHORES as autotools did
This commit is contained in:
parent
e955cd4842
commit
4a33e2a176
18
meson.build
18
meson.build
@ -2307,11 +2307,21 @@ if want_dtrace
|
|||||||
dtrace_obj_gen = generator(dtrace,
|
dtrace_obj_gen = generator(dtrace,
|
||||||
output : '@BASENAME@.o',
|
output : '@BASENAME@.o',
|
||||||
arguments : ['-G', '-s', '@INPUT@', '-o', '@OUTPUT@'])
|
arguments : ['-G', '-s', '@INPUT@', '-o', '@OUTPUT@'])
|
||||||
# FIXME: $(SED) -e "s,define STAP_HAS_SEMAPHORES 1,undef STAP_HAS_SEMAPHORES,"
|
dtrace_hdr_gen = generator(python,
|
||||||
# -e "s,define _SDT_HAS_SEMAPHORES 1,undef _SDT_HAS_SEMAPHORES,"
|
|
||||||
dtrace_hdr_gen = generator(dtrace,
|
|
||||||
output : '@BASENAME@.h',
|
output : '@BASENAME@.h',
|
||||||
arguments : ['-h', '-s', '@INPUT@', '-o', '@OUTPUT@'])
|
arguments : ['-c', '''
|
||||||
|
import subprocess, sys
|
||||||
|
subprocess.run(sys.argv[1:], check=True)
|
||||||
|
output = sys.argv[6]
|
||||||
|
with open(output) as f:
|
||||||
|
contents = f.read()
|
||||||
|
contents = contents.replace("define STAP_HAS_SEMAPHORES 1",
|
||||||
|
"undef STAP_HAS_SEMAPHORES")
|
||||||
|
contents = contents.replace("define _SDT_HAS_SEMAPHORES 1",
|
||||||
|
"undef _SDT_HAS_SEMAPHORES")
|
||||||
|
with open(output, "w") as f:
|
||||||
|
f.write(contents)
|
||||||
|
''', dtrace.full_path(), '-h', '-s', '@INPUT@', '-o', '@OUTPUT@'])
|
||||||
glib_conf.set('HAVE_DTRACE', 1)
|
glib_conf.set('HAVE_DTRACE', 1)
|
||||||
enable_dtrace = true
|
enable_dtrace = true
|
||||||
endif
|
endif
|
||||||
|
Loading…
Reference in New Issue
Block a user