Rizin
unix-like reverse engineering framework and cli tools
meson_cmake_prefix_dir Namespace Reference

Functions

def parse ()
 
def main ()
 

Function Documentation

◆ main()

def meson_cmake_prefix_dir.main ( void  )

Definition at line 25 of file meson_cmake_prefix_dir.py.

25 def main():
26  prefix_dir, cmake_dir = parse()
27 
28  prefix_dir = os.path.abspath(prefix_dir)
29  if not os.path.isabs(cmake_dir):
30  cmake_dir = os.path.abspath(os.path.join(prefix_dir, cmake_dir))
31 
32  # always use linux dir separator, CMake will take care of converting it properly
33  relpath = os.path.relpath(prefix_dir, cmake_dir).replace(os.sep, "/")
34  print("%s" % (relpath,))
35 
36 
Definition: regcomp.c:57
int replace(char *string, const char *token, const char *fmt,...)
Definition: tms320_dasm.c:325

References replace().

◆ parse()

def meson_cmake_prefix_dir.parse ( )

Definition at line 14 of file meson_cmake_prefix_dir.py.

14 def parse():
15  if len(sys.argv) <= 2:
16  print("Usage: {} <prefixdir> <cmakedir>".format(sys.argv[0]))
17  sys.exit(1)
18 
19  prefix_dir = sys.argv[1]
20  cmake_dir = sys.argv[2]
21 
22  return prefix_dir, cmake_dir
23 
24 
size_t len
Definition: 6502dis.c:15

References len.