summaryrefslogtreecommitdiff
path: root/Makefile.am
AgeCommit message (Collapse)AuthorFilesLines
2016-11-18tests: Test wl_interface_equalYong Bakos1-0/+3
The test suite did not cover wl_interface_equal, so add one test that specifically tests this method. Add the new test to Makefile.am. Signed-off-by: Yong Bakos <ybakos@humanoriented.com> [Pekka: add assert(&wl_registry_interface != &copy);] Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2016-11-17Makefile: build also test programs during a normal buildPekka Paalanen1-5/+3
Put also test programs into noinst_PROGRAMS so that they get always built. In check_PROGRAMS they are built for 'make check' but not for 'make'. This makes it harder to accidentally break the test programs. v2: also change check_LTLIBRARIES to noinst_LTLIBRARIES Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Daniel Stone <daniels@collabora.com>
2016-11-16Makefile: do not put TESTS into check_PROGRAMSPekka Paalanen1-3/+5
If you assign TESTS into check_PROGRAMS, you cannot add a test that is not built from source files. Instead, use a temporary variable built_test_programs to hold the names that are both programs built from source files and tests to execute. This change is required by the following patch adding wayland-scanner test script. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-08-12Add API to install protocol loggers on the server wl_displayGiulio Camuffo1-1/+4
The new wl_display_add_protocol_logger allows to set a function as a logger, which will get called when a new request is received or an event is sent. This is akin to setting WAYLAND_DEBUG=1, but more powerful because it can be enabled at run time and allows to show the log e.g. in a UI view. A test is added for the new functionality. Signed-off-by: Giulio Camuffo <giulio.camuffo@kdab.com> Reviewed-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Yong Bakos <ybakos@humanoriented.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2016-08-11server: add listener API for new clientsSungjae Park1-1/+4
Using display object, Emit a signal if a new client is created. In the server-side, we can get the destroy event of a client, But there is no way to get the created event of it. Of course, we can get the client object from the global registry binding callbacks. But it can be called several times with same client object. And even if A client creates display object, (so there is a connection), The server could not know that. There could be more use-cases not only for this. Giulio: a test is added for the new functionality Signed-off-by: Sung-jae Park <nicesj@nicesj.com> Signed-off-by: Giulio Camuffo <giulio.camuffo@kdab.com> Reviewed-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2016-02-29build: fix ./configure --disable-dtd-validationPekka Paalanen1-1/+4
When configured with --disable-dtd-validation: CPPAS src/dtddata.o src/dtddata.S: Assembler messages: src/dtddata.S:39: Error: file not found: src/wayland.dtd.embed Makefile:1520: recipe for target 'src/dtddata.o' failed This is because the variable name used does not match the implicit variable name in autoconf. Fix the variable name, making both --disable-dtd-validation and --enable-dtd-validation to what they should. Do not try to build dtddata.S if dtd-validation is disabled. It depends on wayland.dtd.embed which is created by configure only if dtd-validation is enabled. If not building dtddata.S, also make sure the extern definitions in scanner.c are compiled out. Bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=575212 Reported-by: leio@gentoo.org Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net> Tested-by: Bryce Harrington <bryce@osg.samsung.com>
2016-02-17Revert "build: build distcheck with --enable-fatal-warnings"Derek Foreman1-2/+0
This reverts commit 8125919b0d8e7c776652e4f1d829b9edfa6c4a68. This makes things far more annoying than intended, especially since the list of default warnings isn't consistent from distro to distro.
2016-02-16build: build distcheck with --enable-fatal-warningsDerek Foreman1-0/+2
Signed-off-by: Derek Foreman <derekf@osg.samsung.com> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2015-11-19Makefile: use automake rule for compiling .SPekka Paalanen1-3/+0
Automake seems to have its own rules for compiling an .o from an .S. Essentially it does the same as our hand-crafted rule, but adds some things like dependency file generation. Remove our hand-crafted rule to use the automake rule, it is less surprising. http://www.gnu.org/software/automake/manual/html_node/Assembly-Support.html Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Tested-by: Víctor Jáquez <vjaquez@igalia.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-11-17Validate the protocol xml during scanningPeter Hutterer1-3/+8
Embed the wayland.dtd protocol data into the scanner binary so we can validate external protocol files without requiring makefile changes. Hat-tip to Pekka Paalanen for the embedding trick. The embedding trick doesn't work well if the to-be-embedded file is in a different location than the source file, so copy/link it during configure and then build it in from the local directory. The current expat parser is not a validating parser, moving scanner.c to another parser has the risk of breaking compatibility. This patch adds libxml2 as extra (optional) dependency, but that also requires parsing the input twice. If the protocol fails validation a warning is printed but no error is returned otherwise. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-11-17Revert "Remove protocol/wayland.dtd"Peter Hutterer1-2/+2
This reverts commit 06fb8bd371403d43bc192577abd6b0a0c8b29c59. Having a DTD hooked up gives an indication of what we expect the protocol to be, which is a clearer documentation than the current "whatever scanner.c manages to parse". Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-10-09Remove protocol/wayland.dtdAuke Booij1-2/+2
The wayland scanner defines the protocol. The DTD specification is not used. Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Nils Christopher Brause <nilschrbrause@googlemail.com>
2015-07-23build: Build libwayland-privateDerek Foreman1-5/+7
This splits the bulk of libwayland-util into libwayland-private. libwayland-util (which is just wayland-util.c) is for use with the scanner. libwayland-private is everything else. Most things will want to link both libs. Signed-off-by: Derek Foreman <derekf@osg.samsung.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-07-17build: always build wayland-scannerRoss Burton1-4/+5
The previous idiom for building a cross-compiled Wayland is to build once for the build host (with --enable-scanner --disable-libraries) to get a wayland-scanner binary that can then be used in a cross-compile (with --disable-scanner). The problem with this is that the cross wayland is missing a wayland-scanner binary, which means you then can't do any Wayland development on the target. Instead, always build wayland-scanner for the target and change --enable/disable-scanner to --with/without-host-scanner. Normal builds use the default of --without-host-scanner and run the wayland-scanner it just built, and cross-compiled builds pass --with-host-scanner to use a previously built host scanner but still get a wayland-scanner to install. (a theoretically neater solution would be to build two scanners if required (one to run and one to install), but automake makes this overly complicated) [daniels: Bikeshedded naming with Ross's OK.] Signed-off-by: Ross Burton <ross.burton@intel.com> Reviewed-by: Daniel Stone <daniels@collabora.com>
2015-06-23build: Use AM_CFLAGS instead of GCC_CFLAGS everywhereDerek Foreman1-4/+4
This will make it easier if we ever want to add new flags to everything in the future. Signed-off-by: Derek Foreman <derekf@osg.samsung.com> Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-06-18build: Build a subset of libwayland_util when not building librariesDerek Foreman1-6/+9
The scanner doesn't need anything but wayland-util.c/.h so we can shrink wayland-util when not building the main libraries. Signed-off-by: Derek Foreman <derekf@osg.samsung.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-06-18build: Allow disabling building of wayland librariesDerek Foreman1-22/+25
When cross-compiling it may be useful to build only the wayland-scanner natively. This patch makes it possible to disable build of the libraries. Signed-off-by: Derek Foreman <derekf@osg.samsung.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-06-18build: Stop putting FFI_CFLAGS in AM_CFLAGSDerek Foreman1-1/+2
AM_CFLAGS are the defaults passed to anything that doesn't specify its own _CFLAGS, so instead of putting FFI_CFLAGS there, let's just add that to anything that actually needs it. The only thing that needs it but didn't have it specifically was libwayland_util (for connection.c) Signed-off-by: Derek Foreman <derekf@osg.samsung.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-06-18build: Move AM_CFLAGS and AM_CPPFLAGS to the top of Makefile.amDerek Foreman1-7/+7
AM_CFLAGS and AM_CPPFLAGS aren't positional, so putting them at a random place in Makefile.am can be misleading. Signed-off-by: Derek Foreman <derekf@osg.samsung.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-06-04docs: remove and ignore doc/doxygen_sqlite3.dbDerek Foreman1-1/+1
Some newer versions of doxygen are generating this file now, and if we don't clean it up distcheck will fail. Known to affect doxygen 1.8.8 from debian jessie. Signed-off-by: Derek Foreman <derekf@osg.samsung.com> Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com> Tested-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-05-21tests: add an headers testGiulio Camuffo1-2/+17
This test checks that the protocol and library headers include only what they are supposed to include. That is, that the core headers do not include the protocol headers and that the core protocol headers do not include the non core library headers. The build process now generates core protocol headers, but they are only used in the test and don't get installed. Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2015-04-30wayland-egl: add a core headerGiulio Camuffo1-0/+1
The new core header doesn't include any other header, since it really is not needed. Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-04-30introduce new headers wayland-client-core.h and wayland-server-core.hGiulio Camuffo1-0/+2
wayland-client.h and wayland-server.h include the protocol headers generated at build time. This means that a libwayland user cannot generate and use protocol code created from a wayland.xml newer than the installed libwayland, because it is not possible to only include the API header. Another use case is language bindings, which would generate their own protocol code and which only need to use the library ABI, not the generated C code. This commit adds wayland-client-core.h and wayland-server-core.h which do not include the protocol headers or any deprecated code. Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-01-28configure.ac: use pkg-config to find expatAndrew Oakley1-0/+1
This is now done in the same way as the libffi dependency and still allows the library to be installed in a non-standard location (with PKG_CONFIG_PATH).
2015-01-27tests: C++ compilation testMariusz Ceier1-0/+8
This test includes one of wayland headers, which produced error with C++ compiler. C compiler can't be used for this test, because it issues only a warning[1] and only when wayland headers are not installed in system headers path (/usr/include). [1] wayland-server-protocol.h:201:2: warning: implicit declaration of function ‘wl_resource_post_event’ [daniels: Merged in Marek's follow-up to check for a C++ compiler.] Signed-off-by: Mariusz Ceier <mceier+wayland@gmail.com> Signed-off-by: Marek Chalupa <mchqwerty@gmail.com> Reviewed-by: Daniel Stone <daniels@collabora.com>
2014-08-22tests: add test-compositorMarek Chalupa1-1/+3
This patch introduces a set of functions that can create a display and clients for tests. On server side the user can use functions: display_create() display_destroy() create_client() display_run() display_resume() and on client side the user can use: client_connect() client_disconnect() stop_display() The stop_display() and display_resume() are functions that serve as a barrier and also allow the display to take some action after the display_run() was called, because after the display is stopped, it can run arbitrary code until it calls display_resume(). client_connect() function connects to wayland display and creates a proxy to test_compositor global object, so it can ask for stopping the display later using stop_display(). An example: void client_main() { /* or client can use wl_display_connect(NULL) * and do all the stuff manually */ struct client *c = client_connect(); /* do some stuff, ... */ /* stop the display so that it can * do some other stuff */ stop_display(c, 1); /* ... */ client_disconnect(c); } TEST(dummy_tst) { struct display *d = display_create(); /* set up the display */ wl_global_create(d->wl_display, ...); /* ... */ create_client(d, client_main); display_run(); /* if we are here, the display has been stopped * and we can do some code, i. e. create another global or so */ wl_global_create(d->wl_display, ...); /* ... */ display_resume(d); /* resume display and clients */ display_destroy(d); } v2: added/changed message in few asserts that were not clear fixed codying style issues and typo client_create_with_name: fixed a condition in an assert get_socket_name: use also pid check_error: fix errno -> err [Pekka Paalanen: added test-compositor.h to SOURCES, added WL_HIDE_DEPRECATED to get rid of deprecated defs and lots of warnings, fixed one unchecked return value from write().] Signed-off-by: Marek Chalupa <mchqwerty@gmail.com> Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2014-07-07client: extend error handlingMarek Chalupa1-1/+1
When an error occurs, wl_display_get_error() does not provide any way of getting know if it was a local error or if it was an error event, respectively what object caused the error and what the error was. This patch introduces a new function wl_display_get_protocol_error() which will return error code, interface and id of the object that generated the error. wl_display_get_error() will work the same way as before. wl_display_get_protocol_error() DOES NOT indicate that a non-protocol error happened. It returns valid information only in that case that (protocol) error occurred, so it should be used after calling wl_display_get_error() with positive result. [Pekka Paalanen] Applied another hunk of Bryce's comments to docs, added libtool version bump. Reviewed-by: Pekka Paalanen <ppaalanen@gmail.com> Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
2014-05-12Do not distribute generated headersThierry Reding1-2/+4
The wayland-server-protocol.h and wayland-client-protocol.h headers are currently being shipped in tarballs created using make dist. This causes out-of-tree builds to fail since make will detect that the headers exist by looking at the source directory (via VPATH) and not regenerate them. But as opposed to ${top_builddir}/protocol, ${top_srcdir}/protocol is not part of the include path and therefore the shipped files can't be found during compilation. Two solutions exist to this problem: 1) add ${top_srcdir}/protocol to the include path to allow shipped files to be used if available or 2) don't ship these generated files in release tarballs. The latter seems the most appropriate. wayland-scanner is already a prerequisite in order to generate wayland-protocol.c, so it is either built as part of the package or provided externally. Generating all files from the protocol definition at build time also ensures that they don't get out of sync. Both of the generated headers are already listed in Makefile.am as nodist_*_SOURCES, but at the same time they appear in include_HEADERS, which will cause them to be added to the list of distributable files after all. To prevent that, split them off into nodist_include_HEADERS. Note that this problem will be hidden if a previous version of wayland has been installed, since these files will exist in /usr/include and be included from there. So this build error will only show for out-of-tree builds on systems that don't have wayland installed yet. Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-05-09tests: Add message version sanity testJonas Ådahl1-1/+4
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2014-03-11tests: Fix build of noinst fixed-benchmark testBryce W. Harrington1-0/+1
Solves this build error: tests/fixed-benchmark.o: In function `benchmark': ./wayland/tests/fixed-benchmark.c:82: undefined reference to `clock_gettime' ./wayland/tests/fixed-benchmark.c:84: undefined reference to `clock_gettime' Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
2014-03-10build: depend on generated protocol headersPekka Paalanen1-0/+2
Fixes the build failure where the protocol headers were not generated at all before compiling src/.libs/libwayland_server_la-wayland-server.o. The failure was reproducable by starting fresh with 'git clean -dxf' and not having any wayland headers installed system-wide. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2014-03-07build: Include protocol/ so we pick up generated headersKristian Høgsberg1-1/+5
2014-03-07build: Generated protocol files live in protocol/ nowKristian Høgsberg1-2/+2
Fix up the references in include_HEADERS.
2014-03-07build: Consolidate scanner build rulesKristian Høgsberg1-14/+5
2014-03-07build: Move tests/Makefile.am into toplevel Makefile.amKristian Høgsberg1-3/+76
2014-03-07build: Move src/Makefile.am into toplevel Makefile.amKristian Høgsberg1-6/+89
2014-03-06build: Move cursor Makefile.am into toplevel Makefile.amKristian Høgsberg1-1/+23
2014-02-18build: Move protocol/ Makefile.am into toplevel Makefile.amKristian Høgsberg1-2/+5
A small step towards non-recursive build system for wayland too.
2013-10-25protocol: validate the protocol against a dtdPeter Hutterer1-1/+1
The scanner is not very forgiving if the protocol doesn't match it's expectations and crashes without much of a notice. Thus, validate the protocol against a DTD. Move the protocol subdir forward so we validate first before trying anything else, and install the DTD so we can validate weston's protocols as well.
2013-07-03build: Add wayland-scanner.pc.Daiki Ueno1-1/+1
To allow user program to include wayland-scanner.m4 in tarball, move the path variables from it into wayland-scanner.pc.
2013-07-03build: Install wayland-scanner.mk under $(pkgdatadir).Daiki Ueno1-2/+2
2012-11-19Fix distcheck by adding back protocol/Makefile.amKristian Høgsberg1-1/+1
5909dddc78573774bd3a93c280831a7d18d82994 removed protocol/Makefile.am which meant protocol/wayland.xml no longer got included in the tarball. Add back protocol/Makefile.am and configure.ac bits and add protocol to subdirs in Makefile.am to fix this.
2012-11-12doc: Remove unused css and xslt for the protocolTiago Vignatti1-1/+1
This was added previously (commit 015c42e1) when we didn't have docbook formatted documentation. Now it became quite useless. Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2012-10-15configure: Make documentation option work in factTiago Vignatti1-1/+5
Also, now doxygen is mandatory for building the documentation (looks reasonable because both man-pages and publican will need it). Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2012-05-22Introduce libwayland-cursor, a cursor helper libraryAnder Conselvan de Oliveira1-1/+1
The purpose of this library is to be the equivalent of libXcursor in the X world. This library is compatible with X cursor themes and loads them directly into an shm pool making it easy for the clients to get buffer for each cursor image. The code for handling the X cursor theme was taken from libXcursor. The files cursor/xcursor.[ch] are a stripped down version of that library containing only the interfaces necessary for implementing the wayland counterpart.
2012-03-03Add tests subdir to toplevel SUBDIRS variableKristian Høgsberg1-1/+1
Artie spotted this.
2012-02-29Hook up autotools for publicanPeter Hutterer1-1/+1
automake doesn't seem to provide a sensible method to install a directory of stuff in $(docdir). Do it manually then. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-02-23protocol: add xslt stylesheet to prettify the protocolPeter Hutterer1-1/+1
Includes rudimentary styling only. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-08-12Rename source subdir from wayland to srcKristian Høgsberg1-1/+1
2011-02-25Add wayland-scanner.mk to EXTRA_DIST for make distcheckRico Tzschichholz1-1/+3