Commit Graph

658 Commits

Author SHA1 Message Date
Aurelien Jarno caa1ef6318 Fix depfixer on MIPS. 2016-10-24 12:14:42 -07:00
Jussi Pakkanen a76f9cfe3b Merge pull request #915 from centricular/dependency-error-msg-and-more
Improve error when using the dependencies kwarg
2016-10-23 08:56:39 -07:00
Patrick Griffis d9473095f2 gnome: Don't pass ldflags to g-ir-scanner
In this context -l refers to shared libraries that the gir
provides so you end up with a dozen unecessary libs in your
gir file.
2016-10-23 08:53:27 -07:00
Patrick Griffis 423c8dbb40 gettext: Add update-po target
For each project this creates a <project>-update-po target.
When ran this updates the pot file and then merges it back
into the po files in the source directory with `msgmerge`
for project maintainers and translators.

Fixes #819
2016-10-23 08:46:48 -07:00
Nirbheek Chauhan 70265c3782 Improve error when using the dependencies kwarg
The error message is misleading (talks about external dependencies), and
doesn't tell you what you need to do (use the output of
declare_dependency, dependency, or find_library). At the same time
rename add_external_deps to add_deps since it adds internal deps too.

Plus many more error message improvements all over the place.
2016-10-23 18:02:19 +05:30
Nirbheek Chauhan f79c4396f8 Add repr() implementation for Dependency()
Easier to debug
2016-10-23 18:02:02 +05:30
Jussi Pakkanen b50f3e6976 Merge pull request #934 from mesonbuild/wip/tingping/gnome-yelp
gnome: Add yelp() function
2016-10-23 04:39:15 -07:00
Jussi Pakkanen 5f20b38d44 Force configure input files to be utf-8. Closes #927. 2016-10-23 04:38:54 -07:00
Guillaume Poirier-Morency f7a60099f6 pkgconfig: Fix absolute 'libdir' and 'includedir' 2016-10-23 04:38:34 -07:00
Patrick Griffis ed3cc537cb gnome: Fix building gobject-introspection with sanitizer
Fixes #922
2016-10-22 15:04:16 -07:00
Jussi Pakkanen 885a3c706f Merged dpkg-architecture fix for Gentoo. 2016-10-23 01:01:21 +03:00
Jussi Pakkanen 1e3e22c66e Merge pull request #938 from centricular/fix-unity-builds
Several commits that fix unity builds
2016-10-22 14:38:06 -07:00
Patrick Griffis 8b27a48d56 Don't default to lib64 if symlink
Some distros, such as Arch, symlink lib64 to lib for compat reasons
and programs shouldn't actually install there.
2016-10-22 14:37:46 -07:00
Jouni Kosonen 1ed3317a8b Only default to dpkg-architecture output in Debian derivatives 2016-10-22 14:00:46 +03:00
Nirbheek Chauhan 7e9203fac9 Fix Unity builds for Fortran and D targets
Also warn if we're trying to use a unity build on a target with fortran
or D sources.
2016-10-21 08:39:12 +05:30
Nirbheek Chauhan 57ce7d4618 Add support for extracting objects in unity builds
Not only does extract_all_objects() now work properly again,
extract_objects() also works if you specify a subset of sources all of
which have been compiled into a single unified object.

So, for instance, this allows you to extract all the objects
corresponding to the C sources compiled into a target consisting of
C and C++ sources.
2016-10-21 08:00:39 +05:30
Nirbheek Chauhan 9c9c5ab2a8 Implement get_default_suffix in the base Compiler class
This way every compiler has it implemented
2016-10-21 08:00:39 +05:30
Nirbheek Chauhan b070f505d3 ninja: Generate Vala compile rules after all header_deps are found
Same reason as generated C sources
2016-10-21 08:00:39 +05:30
Nirbheek Chauhan 8bee336e2a ninja: Always use RawFilename for unity sources and deps
The use of has_dir_part is a terrible back that we need to move away
from. This will eventually be fixed by always using File() objects
everywhere. For now, this is needed for unity builds to work.
2016-10-21 07:30:02 +05:30
Nirbheek Chauhan 6f4406928b BuildTarget: Add compilers needed by generated sources 2016-10-21 07:11:11 +05:30
Nirbheek Chauhan 93035fd112 Print a useful error when unable to determine linker 2016-10-21 07:11:11 +05:30
Patrick Griffis 1781129740 gnome: Add yelp() function
Fixes #881
Mentioned in #295
2016-10-19 18:44:19 -04:00
AlexandreFoley 263cb6a5f0 add support of mercurial repo for wrap,… (#937)
* add support for wrap of mercurial repo, and a test with a clone of the sample subproject used for the git test into a mercuriel repo.

* Added myself to author list, and switched the URL of the sample subproject in the wrap file to one under the control of the project's maintainers.
2016-10-20 00:10:00 +03:00
Jussi Pakkanen e908910187 Can query pkg-config variables from the system. Closes #726. 2016-10-19 22:36:34 +03:00
Patrick Griffis 44690763b0 gnome: Include build dir in gtkdoc-mkhtml path 2016-10-19 21:16:29 +03:00
Jussi Pakkanen d367738ec7 Merge pull request #908 from centricular/vala-generated-sources
Support all kinds of generated vala and vapi sources
2016-10-19 21:15:22 +03:00
Patrick Griffis 22debf6ffc gnome: Fix gresource warning incorrectly being shown on 2.50+ 2016-10-19 21:15:05 +03:00
Nirbheek Chauhan 65e9761cb1 Support all kinds of generated vala and vapi sources
This is the first step in making Vala support have feature-parity with
C/C++ support. Vala and Vapi sources generated with Generators and
CustomTargets are no longer ignored. Dependencies are setup properly and
they are added to the commandline.
2016-10-19 20:46:04 +05:30
Nirbheek Chauhan 23b060f0aa Ninja: Consolidate generated sources handling
Pre-calculate the output directory for GeneratedList and CustomTarget so
we can directly use the same code for both while compiling C/C++ files
and headers.

There is no reason to have separate branches for GeneratedList and
CustomTarget since both can be used in almost exactly the same way for
generating sources.

This is going to used next for adding generated sources support to Vala.
2016-10-19 20:46:04 +05:30
Nirbheek Chauhan 092c593acd Process dependencies for all targets not just C/C++
This isn't useful yet because we currently only have dependencies for
C/C++ targets (the rest all use link deps), but we will need this for
Vala, Rust, and more.
2016-10-19 20:42:11 +05:30
Nirbheek Chauhan 419b84784f CustomTarget: Use get_outputs() instead of get_filename()
get_filename() made no sense for CustomTarget since it can have multiple
outputs. Also use get_outputs() for GeneratedList since it has the same
meaning and remove unused set_generated().

As a side-effect, we now install all the outputs of a CustomTarget.
2016-10-19 20:42:11 +05:30
Hemmo Nieminen c4fabc8ecf Don't mention non-existing log files after testing. 2016-10-19 01:08:54 +03:00
Jussi Pakkanen 24552819b4 Force dep versions into the version kwarg. 2016-10-19 01:03:29 +03:00
Jussi Pakkanen d8cd194214 Merge pull request #866 from centricular/vala-no-c-warn-args
Don't add C warning args while building Vala C code
2016-10-18 22:52:56 +03:00
Scott D Phillips 08aeac22a9 Don't raise exception when a fallback dependency is not found
If a fallback dependency is not found just return None.  The
caller can then raise the exception it already has if
required=True, or just continue on if required=False.
2016-10-17 19:32:09 +03:00
Jussi Pakkanen 17ecb4fff4 Merge pull request #862 from valum-framework/pkgconfig-prevent-trailing-slash
Improvements for the pkgconfig module
2016-10-16 23:22:13 +03:00
Guillaume Poirier-Morency bda92b37ee pkgconfig: Accept string for 'libraries' and 'libraries_private' 2016-10-16 11:33:31 -04:00
Guillaume Poirier-Morency 9ebc140832 pkgconfig: Process private libraries like regular ones 2016-10-16 11:33:11 -04:00
Guillaume Poirier-Morency 9429183c1d pkgconfig: Fix typo in 'Libs.private'
It's no different from 'Libs', so we specify as well the directory.
2016-10-16 11:06:17 -04:00
Guillaume Poirier-Morency 3090419181 pkgconfig: Add missing 'URL' and 'Conflicts' entries 2016-10-16 11:06:17 -04:00
Guillaume Poirier-Morency a33c5c50f1 pkgconfig: Rename 'CFlags' for 'Cflags' 2016-10-16 11:04:40 -04:00
Guillaume Poirier-Morency e9f66b1930 pkgconfig: Prevent trailing space
Prepend instead of appending a space so that we never end with a
trailing space.
2016-10-16 11:04:40 -04:00
Jussi Pakkanen 04eda3efc8 Merge pull request #861 from thiblahute/master
Add a .copy() method to environment object and add a way to let the user know if a dependency is internal
2016-10-16 18:01:48 +03:00
Patrick Griffis f30be6fb92 gettext: Add ability to set GETTEXTDATADIRS
Some projects use this to allow using local its files
2016-10-16 17:54:16 +03:00
Jussi Pakkanen a417efdf24 Merge pull request #793 from ssssam/sam/gresource-dependencies
gnome: allow use of generated files with compile_resources()
2016-10-16 17:47:39 +03:00
Patrick Griffis d7fdeb4d15 gnome: Avoid unhandled exception 2016-10-16 17:38:54 +03:00
Nirbheek Chauhan 4332df01b8 Add no-warning args while building Vala C code
This is done by adding a new compiler method called 'no_warn_args' which
returns the argument(s) required for the compiler to emit no warnings
for that compilation.

This take care of not disabling warnings for C code compiled into the
BuildTarget. Also includes tests for ensuring all this.

https://github.com/mesonbuild/meson/issues/864
2016-10-14 19:13:21 +05:30
Thibault Saunier 77b379f5cf Try using already setup fallback subprojects before using native dependency
In the case the main project set a subproject for a dependency another
subprojects uses, that other subproject should rather use the first
subproject rather that using native dependency.

For example in gst-all we set all GStreamer modules as subprojects
and, gst-plugins-base is set after gstreamer core, and
we want gst-plugins-base to always use GStreamer core from the subproject
and not the possibly avalaible native one.
2016-10-14 11:25:16 +02:00
Thibault Saunier fcaf319e49 interpreter: Add a way to copy and environment object
It is really usefull when you have common variables defined
for all tests and then need to set some extra ones for each test
2016-10-14 11:25:16 +02:00
Thibault Saunier 7e2390f355 interpreter: Add a type_name method to DependencyHolder
And remove the InternalDependencyHolder class.

In some cases we need to know the type of dependency we are
dealing with. For example in GStreamer if the dependency
is not an internal one, then we need to get some env var
from pkg-config to know where to find some plugins necessary
to run some tests.
2016-10-14 11:25:15 +02:00