summaryrefslogtreecommitdiff
path: root/giscanner/meson.build
diff options
context:
space:
mode:
authorPatrick Griffis <tingping@tingping.se>2017-10-23 04:53:04 -0400
committerNirbheek Chauhan <nirbheek@centricular.com>2018-03-10 19:05:19 +0530
commit69fe98bdccc9c1c50e51bdfffa26cddacf07b575 (patch)
treef3cf06942548616e072fbad478c008bb77b516a3 /giscanner/meson.build
parent81c7db8c53cc4dc1a7bb772fdca1bd5ec78708eb (diff)
downloadgobject-introspection-69fe98bdccc9c1c50e51bdfffa26cddacf07b575.tar.gz
Initial work on meson port
Diffstat (limited to 'giscanner/meson.build')
-rw-r--r--giscanner/meson.build74
1 files changed, 74 insertions, 0 deletions
diff --git a/giscanner/meson.build b/giscanner/meson.build
new file mode 100644
index 00000000..3bc4d015
--- /dev/null
+++ b/giscanner/meson.build
@@ -0,0 +1,74 @@
+pkglibdir = join_paths(get_option('libdir'), meson.project_name())
+giscannerdir = join_paths(pkglibdir, 'giscanner')
+install_data([
+ '__init__.py',
+ 'annotationmain.py',
+ 'annotationparser.py',
+ 'ast.py',
+ 'cachestore.py',
+ 'ccompiler.py',
+ 'codegen.py',
+ 'docmain.py',
+ 'docwriter.py',
+ 'dumper.py',
+ 'introspectablepass.py',
+ 'girparser.py',
+ 'girwriter.py',
+ 'gdumpparser.py',
+ 'libtoolimporter.py',
+ 'maintransformer.py',
+ 'message.py',
+ 'msvccompiler.py',
+ 'shlibs.py',
+ 'scannermain.py',
+ 'sectionparser.py',
+ 'sourcescanner.py',
+ 'testcodegen.py',
+ 'transformer.py',
+ 'utils.py',
+ 'xmlwriter.py',
+], install_dir: giscannerdir)
+
+install_data([
+ 'collections/__init__.py',
+ 'collections/counter.py',
+ 'collections/ordereddict.py',
+], install_dir: join_paths(giscannerdir, 'collections'))
+
+install_subdir('doctemplates', install_dir: giscannerdir)
+
+flex = find_program('flex')
+bison = find_program('bison')
+
+scannerparser = custom_target('scannerparser',
+ input: 'scannerparser.y',
+ output: ['scannerparser.c', 'scannerparser.h'],
+ command: [bison, '@INPUT@', '--defines=@OUTPUT1@', '--output=@OUTPUT0@']
+
+)
+
+scannerlexer = custom_target('scannerlexer',
+ input: 'scannerlexer.l',
+ output: 'scannerlexer.c',
+ command: [flex, '-o', '@OUTPUT@', '@INPUT@']
+)
+
+giscanner_lib = static_library('giscanner',
+ sources: [
+ 'sourcescanner.c',
+ scannerparser,
+ scannerlexer,
+ ],
+ dependencies: gio_dep,
+)
+
+# TODO: -export-symbols-regex "init_giscanner|PyInit__giscanner"
+py3.extension_module('_giscanner', 'giscannermodule.c',
+ link_with: giscanner_lib,
+ dependencies: [
+ gobject_dep,
+ dependency('python3'),
+ ],
+ install: true,
+ install_dir: giscannerdir,
+)