<p>Here is a typical meson.build file, from the project<br>
gnome-builder:</p>
<p>project('gnome-builder', 'c',<br>
license: 'GPL3+',<br>
version: '3.26.4',<br>
meson_version: '>= 0.40.1',<br>
default_options: [<br>
'c_std=gnu11',<br>
'cpp_std=c++11',<br>
'warning_level=2',<br>
'with_channel=other',<br>
],<br>
)</p>
<p>version_split = meson.project_version().split('.')<br>
MAJOR_VERSION = version_split[0]<br>
MINOR_VERSION = version_split[1]<br>
MICRO_VERSION = version_split[2]</p>
<p>pkgdocdir_abs = join_paths(get_option('prefix'), get_option('datadir'), 'doc', 'gnome-builder')<br>
pkglibdir_abs = join_paths(get_option('prefix'), get_option('libdir'), 'gnome-builder')<br>
pkglibdir = join_paths(get_option('libdir'), 'gnome-builder')<br>
pkgincludedir = join_paths(get_option('includedir'), 'gnome-builder')<br>
pkggirdir = join_paths(get_option('datadir'),'gnome-builder', 'gir-1.0')<br>
pkgtypelibdir = join_paths(get_option('libdir'), 'gnome-builder', 'girepository-1.0')<br>
pkgvapidir = join_paths(get_option('datadir'), 'gnome-builder/vapi')</p>
<p>I think it is a python file. Would it work to just associate ".meson"<br>
file types with the ".py" extension? Is there a document that describes<br>
how to add such a new file type (or associate with it?)</p>
<p>If it is really just a python file then it may be enough to just<br>
append ".meson" as to how .py files are parsed.</p>
<p>Not sure where the filetypes are defined; one file I found<br>
via grep was</p>
<p><strong>data/filetype_extensions.conf</strong>:Python=<em>.py;</em>.pyw;SConstruct;SConscript;wscript;</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/geany/geany/issues/1734#issuecomment-362352158">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABDrJ6LmqroAe04uPhK24FG1xuDTZVwZks5tQf1HgaJpZM4RY6_L">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJ6GzvyLQQuDA5Y3GIJC5ebI6H9Eyks5tQf1HgaJpZM4RY6_L.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/geany/geany/issues/1734#issuecomment-362352158"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/geany/geany","title":"geany/geany","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/geany/geany"}},"updates":{"snippets":[{"icon":"PERSON","message":"@shevegen in #1734: Here is a typical meson.build file, from the project\r\ngnome-builder:\r\n\r\n\r\n\r\nproject('gnome-builder', 'c',\r\n          license: 'GPL3+',\r\n          version: '3.26.4',\r\n    meson_version: '\u003e= 0.40.1',\r\n  default_options: [\r\n                     'c_std=gnu11',\r\n                     'cpp_std=c++11',\r\n                     'warning_level=2',\r\n                     'with_channel=other',\r\n                   ],\r\n)\r\n\r\nversion_split = meson.project_version().split('.')\r\nMAJOR_VERSION = version_split[0]\r\nMINOR_VERSION = version_split[1]\r\nMICRO_VERSION = version_split[2]\r\n\r\npkgdocdir_abs = join_paths(get_option('prefix'), get_option('datadir'), 'doc', 'gnome-builder')\r\npkglibdir_abs = join_paths(get_option('prefix'), get_option('libdir'), 'gnome-builder')\r\npkglibdir = join_paths(get_option('libdir'), 'gnome-builder')\r\npkgincludedir = join_paths(get_option('includedir'), 'gnome-builder')\r\npkggirdir = join_paths(get_option('datadir'),'gnome-builder', 'gir-1.0')\r\npkgtypelibdir = join_paths(get_option('libdir'), 'gnome-builder', 'girepository-1.0')\r\npkgvapidir = join_paths(get_option('datadir'), 'gnome-builder/vapi')\r\n\r\nI think it is a python file. Would it work to just associate \".meson\"\r\nfile types with the \".py\" extension? Is there a document that describes\r\nhow to add such a new file type (or associate with it?)\r\n\r\nIf it is really just a python file then it may be enough to just\r\nappend \".meson\" as to how .py files are parsed.\r\n\r\nNot sure where the filetypes are defined; one file I found\r\nvia grep was\r\n\r\n  **data/filetype_extensions.conf**:Python=*.py;*.pyw;SConstruct;SConscript;wscript;\r\n"}],"action":{"name":"View Issue","url":"https://github.com/geany/geany/issues/1734#issuecomment-362352158"}}}</script>