mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 15:06: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,
|
||||
output : '@BASENAME@.o',
|
||||
arguments : ['-G', '-s', '@INPUT@', '-o', '@OUTPUT@'])
|
||||
# FIXME: $(SED) -e "s,define STAP_HAS_SEMAPHORES 1,undef STAP_HAS_SEMAPHORES,"
|
||||
# -e "s,define _SDT_HAS_SEMAPHORES 1,undef _SDT_HAS_SEMAPHORES,"
|
||||
dtrace_hdr_gen = generator(dtrace,
|
||||
dtrace_hdr_gen = generator(python,
|
||||
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)
|
||||
enable_dtrace = true
|
||||
endif
|
||||
|
Loading…
Reference in New Issue
Block a user