Commit Graph

277 Commits

Author SHA1 Message Date
Corentin Noël 4aa848d5d6 Properly name the targets 2018-06-19 03:22:18 +00:00
Corentin Noël b58f71cd73 gdbus_codegen: Keep the same behavior for all GLib versions
previous version duplicated the outputs disallowing to select only the .c files or the .h files
The docbook output files weren't listed too.
2018-06-19 03:22:18 +00:00
Corentin Noël 551f99ffff generate_gir: Add all the files provided by the CustomTarget 2018-06-18 12:00:28 +00:00
Xavier Claessens c5cb65eb7c gtkdoc: Run gtkdoc-scangobj command from build directory
All paths in CFLAGS are relative to build_root, so current directory
must be there we invoking gtkdoc-scangobj.

Closes: #3379
2018-06-17 15:38:30 +03:00
Robert Ancell 375dcd546a gdbus_codegen: Support --c-generate-autocleanup 2018-06-08 12:36:50 +00:00
Robert Ancell 83665a482a gdbus_codegen: Support arbitrary extra arguments 2018-06-07 15:14:07 +00:00
Xavier Claessens aa879b7f0c Fix issues found by flake8 2018-06-06 20:02:37 +00:00
Xavier Claessens b7d442150d Move <lang>_args to coredata.compiler_options 2018-06-06 20:02:37 +00:00
Salamandar 2fb6018763 Add 0.46.0 features 2018-06-01 14:23:24 +02:00
Salamandar 4741f1e243 Add 0.42.0 features 2018-06-01 14:23:24 +02:00
Salamandar fa6550b277 Add 0.40.0 features 2018-06-01 14:23:24 +02:00
Salamandar accea4889b Add 0.37.0 features 2018-06-01 14:23:24 +02:00
Mathieu Duponchelle 6dd896d001 gnome/mkenums: allow passing generated files as templates 2018-05-23 23:23:08 +02:00
Nirbheek Chauhan 86cc4f2707 gdbus_codegen: Guess the output list for docbook generation
We were setting it to a file list that would always be wrong, and
always out of date since it would never exist.

However, the output list is not predictable. It usually has a 1-1
relationship with the input XML files, but it may not.

This must be fixed later with API for users to provide the output
names.

See: https://github.com/mesonbuild/meson/pull/3539
2018-05-09 21:04:55 +05:30
Nirbheek Chauhan 7ca2b8caca gtkdoc: Fix typo that made xml_files an array of arrays 2018-05-09 21:04:19 +05:30
Nirbheek Chauhan c1f275bfa6 gnome.gtkdoc: Allow passing file objects as xml_files
If we pass a source files() object, we will look for it in the build
directory, which is wrong. If we pass a build files() object (from
configure_file()), we will find it in the build directory, and then
try to copy it on top of itself in gtkdochelper.py getting a
SameFileError.

Add a test for it, and also properly iterate custom target outputs
when adding to content files.
2018-05-06 20:25:16 +05:30
Nirbheek Chauhan c5865c50c4 gnome: Use the header basename for #include in mkenums_simple
Otherwise, when you use a File target, the value will be the full path
to the header from the build root, which is not what anyone wants.
2018-05-05 17:33:29 +02:00
Nirbheek Chauhan 45aa57f660 gnome: Update minimum glib version for gdbus-codegen
The fix has landed upstream, and will be in the next glib stable
release. I have verified that it fixes the problem described in #3488
and that the 'frameworks/7 gnome' test passes now.
2018-05-05 11:36:46 +03:00
Nirbheek Chauhan 2e0485bb9b gnome: Disable usage of new --body and --header args
The new --body and --header args are broken because they do not allow
the use of --output-directory to set the correct `#include "foo.h"`
line in `foo.c`. The changes in the gdbus test case show this.

Disabled till this can be fixed in glib.

Closes https://github.com/mesonbuild/meson/issues/3488
2018-05-04 23:00:23 +03:00
Jussi Pakkanen ccaf5711cd Install generated gdbus header with old glib version too. 2018-04-28 00:19:29 +03:00
Nirbheek Chauhan 74404db469 gnome: If pkg-config is not found, assume glib is 2.54 (#3443)
* gnome: If pkg-config is not found, assume glib is 2.0

Checking the pkg-config file to confirm tool versions is a hack, and
should eventually be replaced with checking the actual versions of the
tools.

* gnome: Actually assume glib version is 2.54 if not found

It is actually not possible to build most projects with the GNOME
module if your glib is older, particularly genmarshal and
gdbus-codegen generate unusable output without newer arguments that
were added for Meson.
2018-04-21 17:05:31 +03:00
Nirbheek Chauhan b5c919ebfe gnome: gdbus-codegen add a `sources:` kwarg
It accepts multiple XML files, not just one. For example, glib uses
it that way.
2018-04-20 18:24:18 +00:00
Iñigo Martínez a52543cd1e gdbus_codegen: Fix install_dir parameter
The `install` parameter that is present in the `permittedKwargs`
annotation is wrong. The correct parameter name, which is also
consistent with the rest of functions in the `gnome` module, is
`install_dir`.
2018-04-18 21:15:52 +03:00
Nirbheek Chauhan 6cdd14fc4e find_program: Don't spam when called from a module
The user doesn't need to know whether or not the program was found,
especially not when it's spammed for every gnome.foo() function
2018-04-15 14:13:35 +05:30
Jussi Pakkanen 998892ed29 Updated all modules to work with the new API. 2018-04-15 13:32:38 +05:30
Jussi Pakkanen bdb57cf62a Convert Gnome module to use find_program from interpreter. 2018-04-15 13:32:38 +05:30
Iñigo Martínez 435cd8c922 gdbus_codegen: Fix new generated objects
The `ct` variable used in the ModuleReturnValue is created only for
versions earlier than 2.55.2. However, in newer versions that
variable does not exist.
2018-04-12 08:18:07 +02:00
Iñigo Martínez e656b9c819 gdbus_codegen: Fix custom target name
The namebase which is used as the target name, also holds part of
the file names. This used in combination generates files with wrong
names.
2018-04-12 08:10:13 +02:00
Nirbheek Chauhan d7b401f7d7 gdbus_codegen: Return 2 targets when docbook is disabled
Also document this behaviour, test it, and fix the return value from
the module -- we create one target and return it thrice to the build
file
2018-04-11 21:30:47 +05:30
Iñigo Martínez b2636ceef9 gnome: Validate docbook parameter is a string
The `docbook` parameter used in `gdbus_codegen` should contain
the prefix string in `PREFIX-NAME.xml`. Therefore it has to be
validated as a string.
2018-04-11 17:22:20 +02:00
Iñigo Martínez 351b59f03a gnome: Split header and code targets in gdbus_codegen()
The development version of `glib` (2.55.2) has acquired support for
generating gdbus header and source code files separately. This
allows dependencies to be more fine grained on those targets
depending only on the header.
2018-04-11 17:22:12 +02:00
Emmanuele Bassi e103675a39 Never install the glib-mkenums generated C source (#3374)
* Never install the glib-mkenums generated C source

When using gnome.mkenums_simple() we end up installing the generated
C source file alongside the C header file, if `install_header` is set
to True. This is caused by mkenums_simple() acting as a wrapper for
mkenums() without template files; mkenums() won't be able to know if
we're generating the header or the source, and will use the presence
of `install_header` as the deciding factor as to whether the generated
file should be installed.

When generating the C source file, we should always unset the
`install_header` option to False, just like mkenums() expects.

Closes #3373

* Verify that mkenums_simple() does not install C sources

When asked to installed the generated C header file.
2018-04-09 23:35:57 +03:00
Iñigo Martínez c1fcc8ab3e gnome.gtkdoc: Fix generated files used as content files
The `gtkdoc` function in the `gnome` module is able to use generated
files as content files, but the path to these is wrong in the used
command line.
2018-04-04 22:47:10 +03:00
Aleksey Filippov 077d59daa4 Add link_whole argument to declare_dependency() 2018-03-06 01:44:26 +00:00
Nirbheek Chauhan 0c1c387703 gnome: Fix depend_files listing for compile_resources
Also add a unit test that will test all codepaths for old Glib tools
versions.

Closes https://github.com/mesonbuild/meson/issues/2860
2018-02-20 19:26:16 +02:00
Jon Turney 7bfcf68777 Add get_pkgconfig_variable(default:)
Also use that to squelch the warning for internal uses which handle the
variable missing case (just gnome at the moment)

A follow up to PR #2914
2018-02-08 00:35:38 +02:00
Ting-Wei Lan 7b4bcdf21e gnome: Always use an ordered set to store LDFLAGS
The order of -L flags in LDFLAGS is critical to the build. Any
unexpected reordering can cause undefined reference error when linking.
2018-01-07 01:56:05 +08:00
Ting-Wei Lan ab2f68ec9c gnome.generate_gir: Pass *FLAGS set in the environment to g-ir-scanner
The reason for this change is the same as the previous commit. Although
g-ir-scanner can pick arguments from CFLAGS, CPPFLAGS, LDFLAGS
environment variables by itself, it is still better for build systems
to put them on the command line instead of relying on users to setup
the same environment.

Since g-ir-scanner doesn't provide a way to set arbitrary linker flags
on the command line, arguments in LDFLAGS that are not started with -L
are not passed.
2018-01-07 01:56:00 +08:00
Ting-Wei Lan 08113da388 gnome.gtkdoc: Pass *FLAGS set in the environment to gtkdoc-scangobj
GLib-based libraries and applications require gettext library to compile
and link. On non-GNU systems such as FreeBSD, gettext is not included in
libc and it is required to pass '-L/usr/local/lib -lintl' to the linker
to satisfy the dependency on gettext. The pkg-config file provided by
GLib already has '-lintl', but users still have to remember to put
'-L/usr/local/lib' into LDFLAGS. If we don't pass LDFLAGS to
gtkdoc-scangobj, the linker will not be able to find '-lintl' when no
dependencies of the project provides '-L/usr/local/lib'.

Since all *FLAGS are commonly used in many build systems, this commit
adds support for not only LDFLAGS but also CFLAGS and CPPFLAGS.

Fixes #1724
2018-01-07 01:45:47 +08:00
Iñigo Martínez f022cb3a40 gnome.gtkdoc: Add dependencies over generated targets
The gtkdoc function can also use generated targets to create
documentation. However, the dependencies over these generated files
are missing, so these must be also included in the run target.
2017-12-22 20:58:13 +01:00
Iñigo Martínez f92d117bec gnome.gtkdoc: Add support for non string based content files
gnome's gtkdoc function does not support content files which are
not strings. However, there are situations where files generated
by other targets might be needed.
2017-12-19 17:45:58 +01:00
Michael James Gratton 93c988b453 Enable re-compilation of GNOME gschema files if they have changed.
* mesonbuild/modules/gnome.py (GnomeModule.compile_schemas): Allow the
  depend_files kwarg.

* docs/markdown/Gnome-module.md: Add docs for new kwarg (and the only
  other one that is permitted).
2017-12-13 21:31:32 +02:00
Jussi Pakkanen 018deb48fe
Merge pull request #2663 from inigomartinez/pkg-config-define-variable
dependencies: Allow pkg-config to define variables
2017-12-03 22:53:44 +02:00
Iñigo Martínez 44dd429ee5 dependencies: Fix pkg-config variable definition
In a previous commit variable definition was added in pkg-config.
However, this commit was not complete.

This fixes the missing parts of that commit.
2017-12-01 13:49:01 +01:00
Nirbheek Chauhan e1bdc098ca gnome.compile_resources: Prefer generated files over source files
We should always prefer generated files over onces in the source tree
else if the same file also exists in the source tree we get strange
behaviour where we ignore dependencies and the project has to be
built twice to be fully up-to-date.

See: https://bugzilla.gnome.org/show_bug.cgi?id=787677

Closes https://github.com/mesonbuild/meson/issues/2686
2017-11-30 23:15:19 +02:00
Patrick Griffis 643d3a4976 gnome.gtkdoc: Fix missing permitted kwargs
Found by https://bugzilla.gnome.org/show_bug.cgi?id=790998
2017-11-29 12:36:11 -05:00
Xavier Claessens 9e2d078948 gnome: Add include_directories parameter to gtkdoc() 2017-11-10 18:23:47 +02:00
Martin Kelly 02bea7d5bf namespace run_targets by subproject
Currently, run_target does not get namespaced for each subproject,
unlike executable and others. This means that two subprojects sharing
the same run_target name cause meson to crash.

Fix this by moving the subproject namespacing logic from the BuildTarget
class to the Target class.
2017-10-31 01:04:38 +02:00
Patrick Griffis f220a5dd86 gnome: Fix compile_schemas() using path sep in target name 2017-10-25 21:01:16 +03:00
Corentin Noël fd860482e5 Allow to give source files to GtkDoc by respecting the File class 2017-10-18 00:39:39 +03:00
Rico Tzschichholz 8b8e1ee620 gnome: g-ir-scanner accepts multiple symbol-prefix arguments 2017-10-08 14:04:34 +03:00
Jussi Pakkanen 357b34f915 Merge pull request #2375 from centricular/gnome-gir-fixes
Fix GNOME gir generation with lists of dependency lists
2017-10-02 00:04:18 +03:00
Patrick Griffis 893d101fff gnome: Add header kwarg to generate_gir()
This is a commonly used flag so lets make it more obvious.
2017-10-01 20:15:21 +03:00
Nirbheek Chauhan bb0e18b738 Use listify and extract_as_list everywhere
They now flatten by default and unhold objects if required

Includes unit tests.
2017-10-01 22:27:48 +05:30
Nirbheek Chauhan 26dada3797 gnome: Flatten and unholder all dependencies
Otherwise lists-of-lists get ignored instead
2017-10-01 12:07:04 +05:30
Dylan Baker dda5e8cadb Allow CustomTarget's to be indexed
This allows a CustomTarget to be indexed, and the resulting indexed
value (a CustomTargetIndex type), to be used as a source in other
targets. This will confer a dependency on the original target, but only
inserts the source file returning by index the original target's
outputs. This can allow a CustomTarget that creates both a header and a
code file to have it's outputs split, for example.

Fixes #1470
2017-09-27 22:01:24 +03:00
Luke Shumaker 4dbbb4884c flake8: Clean up complained-about unused imports
This also adds a "# noqa: F401" comment on an unused "import lzma",
which we are using it in a try/except block that is being used to
check if the lzma module is importable; of course it is unused.

v2: This turned out to be a little tricky.

    mesonbuild/modules/__init__.py had the "unused" import:

        from ..interpreterbase import permittedKwargs, noKwargs

    However, that meant that the various modules could do things like:

        from . import noKwargs # "." is "mesonbuild.modules"

    Which breaks when you remove __init__.py's "unused" import.  I
    could have tagged that import with "# noqa: F401", but instead I
    chose to have each of the module import directly from
    "..interpreterbase" instead of ".".
2017-09-21 13:41:03 -04:00
Luke Shumaker bb25260f00 flake8: Perform suggested whitespace/formatting changes
This only touches newlines, spaces, and (occaisionally) commas.  Anything
else is left for another commit.
2017-09-21 11:59:03 -04:00
Alexis Jeandet e553d0807b Last round with listify function refactoring.
Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>
2017-09-18 22:25:34 +02:00
Alexis Jeandet bf64cf569b Gnome, pkgconfig, Qt4, Qt5 and windows modules slightly refactored.
Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>
2017-09-18 22:21:22 +02:00
Jussi Pakkanen 19e22ac88a Merge pull request #2216 from ebassi/yelp-linguas
Support LINGUAS for gnome.yelp() languages
2017-09-14 21:35:50 +03:00
Emmanuele Bassi 6f1d7e3d0a Add deprecation warning for gnome.yelp() argument
The 'languages' argument is deprecated; the LINGUAS file supercedes it
as the canonical source of translations.
2017-09-12 21:45:04 +01:00
Iñigo Martínez 540c928e30 gnome: Docbook generation for gdbus_codegen()
Add new 'docbook' argument which generates Docbook documentation for
each D-Bus interface. The docbook argument will be used as prefix
in `PREFIX`-NAME.xml pattern, and NAME will be replaced by the D-Bus
interfaces.
2017-09-12 20:29:24 +03:00
Emmanuele Bassi 2cabcb39c9 gnome: Flatten the sources for generate_gir()
If we don't do that, the traversal of the sources list to generate the
sources file for g-ir-scanner is going to explode with a Python
backtrace like this one:

  File "/usr/lib/python3.5/site-packages/mesonbuild/modules/gnome.py", line 463, in generate_gir
    gir_filelist.write(os.path.join(srcdir, s) + '\n')
  File "/usr/lib/python3.5/posixpath.py", line 89, in join
    genericpath._check_arg_types('join', a, *p)
  File "/usr/lib/python3.5/genericpath.py", line 143, in _check_arg_types
    (funcname, s.__class__.__name__)) from None

if the sources list contains a list.
2017-09-04 23:26:53 +03:00
Patrick Griffis 04b2c67b7d gnome.gdbus_codegen(): Add annotations keyword
Fixes #2123
2017-09-04 19:26:04 +03:00
Elliott Sales de Andrade 7fb1973cac Use include-uninstalled for internal gir deps.
This stops g-ir-scanner from trying to search for the pkg-config file
for an internal gir, which won't be available.
2017-08-31 22:15:15 +03:00
Chun-wei Fan aeaefce81e modules/gnome.py: Use a filelist for generate_gir()
On Windows, one will face the issue of the 8192-character limit for each
command line, so this will cause an issue when one is building items
like GTK+ with introspection, because the g-ir-scanner command line will
likely get too long, which will clearly break the build.  This will
affect all Windows builds.

Make use of the --filelist option that is already in g-ir-scanner, and
generate such a file list from the sources that are fed to
generate_gir(), named as
$(builddir)/$(target_id)/<NameSpace>_<NameSpaceVersion>_gir_filelist
and using it during the build.
2017-08-31 21:39:47 +03:00
Matthias Klumpp 5275548b5c gnome: Ensure gir always works with asan, even if used together with ubsan
This really resolves #1910 by making it also work in cases where asan
and ubsan are used together via "-Db_sanitize=address,undefined".
2017-08-29 18:38:51 +03:00
Matthias Klumpp d49eeb243f gnome: Fix typo in gtkdoc_html_dir, so it returns the correct path 2017-08-29 18:38:07 +03:00
Thibault Saunier f2a60b87cb gnome: Fix g-ir-scanner linking args for all code paths
We were fixing them up only in the dependency code path and not
in the InternalDependency one. Just make sure to do it once for all.
2017-08-23 15:00:19 -03:00
Jussi Pakkanen 50fb7d37ab Make all functionality invokable via the main Meson binary,
which can be a Windows .exe file.
2017-08-18 12:08:20 +03:00
Marinus Schraal c8e61f112d gnome: use VAPIGEN from the environment if set
Allow setting the vapigen binary by passing it as an environment
variable.
2017-08-14 20:28:53 +03:00
Tim-Philipp Müller 4e476c82f3 gnome: add mkenums_simple()
99% of all mkenums uses in C libraries use the same basic template,
so add a mkenums_simple() function that takes care of everything for
us based on that template.

Features:
 - optional function declaration decorator such as GLIB_AVAILABLE
 - optional extra header prefix (e.g. for include needed for decorator)
 - optional extra body prefix (e.g. for additional includes)
 - optional function name prefix (e.g. to add leading underscores)

Fixes issue #1384
2017-08-14 19:40:36 +03:00
Nirbheek Chauhan 556966003e gnome: Allow passing build_by_default: to some functions
Closes https://github.com/mesonbuild/meson/issues/2174
2017-08-13 21:17:47 +03:00
Tim-Philipp Müller 60b83a5f0a gnome: add 'ignore_headers' to permitted kwarg list for gnome.gtkdoc() 2017-08-13 21:17:04 +03:00
Nirbheek Chauhan 7aed29e2c3 gnome: Fix parsing of resource custom target files
gnome.compile_resources() was not parsing custom target sources
properly. It was using the custom target name as the output of the
custom target instead of looking at the list of outputs.

Also modify the GNOME framework test to expose this.
2017-08-13 21:13:28 +03:00
Florian Müllner 691ad706ad gnome: Only translate -l flags to --extra-library
Other linker arguments may contain '-l' as well, for instance
'-L/usr/lib/x86_64-linux-gnu/foo' with Debian-style multiarch.
2017-08-13 21:12:43 +03:00
Jussi Pakkanen d335a84b9e A few more lgtm fixes. 2017-08-04 12:54:31 +03:00
Florian Müllner 00a3d1ac4f gnome: Fix translation of -l to --extra-library args
We prefer to use the --extra-library parameter for passing -l arguments
to g-ir-scanner, however we need to be careful to only replace the first
'-l' occurrence to not translate
  '-lfoo-lib'
to
  '--extra-library=foo--extra-library=ib'
2017-08-02 21:45:50 +03:00
Emmanuele Bassi de45352d9d gnome: Support new glib-genmarshal arguments
The glib-genmarshal tool was rewritten in GLib 2.53.3, and now supports
more command line arguments, such as:

  "--pragma-once": emits a "#pragma once" instead of the old header
    guards when generating the header file
  "--prototypes": emits the marshallers prototype when generating the
    source file
  "-D,-U": defines and undefines pre-processor symbols
  "--include-header": emits an "#include" directive when generating the
    source file for the specified header file

Meson should take advantage of these new options, as they can be used to
replace most of the ad hoc build rules that projects are currently using
to implement the same thing.

Instead of mapping each option to a named argument, I used the same
approach as the compile_resources() and generate_gir() methods; the
genmarshal() method now has an 'extra_args' argument that can be used to
pass extra arguments to the glib-genmarshal tool.
2017-07-23 16:30:34 +01:00
Nicolas Dufresne 12be4b6644 gnome: Fix wrong include path
When dealing with the SharedLibrary or StaticLibrary include
directories, we where not taking into acount that path are relative to
the source tree. With proper helper, this works now. This fixues issue
where the gir may be generated bug from headers found in the prefix.
2017-07-21 20:16:50 +03:00
Patrick Griffis 9683082c4c gnome.genmarshal(): Include generated header in generated source
This silences any strict-prototype warnings if enabled.
2017-07-20 12:27:38 +03:00
Nirbheek Chauhan a0bd896b2f gnome module: Add -lfoo after -Lbar LDFLAGS
Otherwise they won't take effect
2017-07-17 12:41:54 +05:30
Jussi Pakkanen 9c02e57f88 Qapla' 2017-07-02 16:55:12 +03:00
Jussi Pakkanen ecde592b86 Fix custom target sources 2017-07-01 01:13:45 +03:00
Elliott Sales de Andrade 241790f72d Fix typo in generate_gir keyword name. 2017-06-30 11:16:49 -04:00
Jussi Pakkanen 3262be23dc Fixed issues raised in review. 2017-06-26 23:29:42 +03:00
Jussi Pakkanen 80d665e8de Converted some modules. 2017-06-26 21:10:27 +03:00
Jussi Pakkanen 080307dd71 Merge pull request #1948 from mesonbuild/tingping/gnome-sanitize-fixes
Fix gnome.generate_gir() with address sanitizer
2017-06-22 06:19:29 -04:00
Jussi Pakkanen a48a9217e4 Merge pull request #1966 from QuLogic/gtkdoc-libraries
Small gtkdoc improvements
2017-06-22 06:00:04 -04:00
Jussi Pakkanen 2d659b649b Merge pull request #1924 from mesonbuild/tingping/yelp-fixes
Various yelp fixes
2017-06-21 04:36:30 -04:00
Elliott Sales de Andrade 70776cda98 Add build include directory to gtkdoc source paths.
This enables gtkdoc to produce documentation on files that were
generated, using configure_file, for example.
2017-06-19 20:52:12 -04:00
Elliott Sales de Andrade ca798e1538 Add all internal dep rpaths to gnome module builds.
Running gtkdoc on a shared library that depends on another shared
library would fail otherwise.
2017-06-19 19:07:09 -04:00
Elliott Sales de Andrade 6bc14424b4 Use absolute path to target dir within gnome module.
Stuff like gtkdoc may not be run in the top-level build directory, so
these paths need to be absolute.

Fixes #1950.
2017-06-19 19:05:42 -04:00
Patrick Griffis ccb253189a gnome.generate_gir(): Fix linking to libasan if sanitizer enabled
This is a bit of a workaround linking directly to it but it is
at least functional unlike before.

Fixes #1910
2017-06-17 07:08:31 -04:00
Patrick Griffis 604adce33f gnome: Fix getting sanitize cflags for gir
There was an API break somewhere and this wasn't kept in sync.

Part of #1910
2017-06-15 22:40:00 -04:00
Florian Müllner a3dda095bc gnome: Guard all cflags passed to g-ir-scanner
While g-ir-scanner's compatible -I and -D flags cover what most dependencies
use, there's no guarantee that a dependency's cflags don't include more
exotic flags that conflict with the tool's own options.

For a real world example, mozjs-38 has '-include some-header-file.h', which
translates to '--include nclude another-file-to-scan.h' for the scanner;
unless for some reason there's an 'nclude' GIR available on the system,
the target will thus fail.

For this purpose, g-ir-scanner allows explicitly marking some flags as
preprocessor/compiler flags by guarding them with --cflags-begin and
--cflags-end. Make sure it is used this for all cflags, not only for
global and project flags.
2017-06-11 21:48:15 +02:00
Florian Müllner 4b8dc3b746 gnome: Fix includedir cflags
Include directories are passed with the -I flag to both the compiler
and g-ir-scanner, not as input files.
2017-06-11 21:40:14 +02:00
Jussi Pakkanen f792641b34 Merge pull request #1927 from centricular/gir-rpath-link
Work around GNU ld bug with -rpath,$ORIGIN
2017-06-11 14:54:10 +03:00
Nirbheek Chauhan 1e42241ef3 gnome: Don't assume that a C compiler is being used 2017-06-11 14:36:33 +05:30