summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2015-07-01 22:51:01 +0100
committerDaniel Stone <daniels@collabora.com>2015-07-17 12:19:08 +0100
commit21f80b89826d07bf687de35a1992a0b9bca3a51d (patch)
tree1b4273564c6c97bd75008b465a4cd1aadc6f916c /Makefile.am
parentba731f951c150ee83f0b8af03feec3fa18425ebf (diff)
build: always build wayland-scanner
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>
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am9
1 files changed, 5 insertions, 4 deletions
diff --git a/Makefile.am b/Makefile.am
index 58f5595..2dbc216 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -22,16 +22,17 @@ dist_pkgdata_DATA = \
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA =
-if ENABLE_SCANNER
-wayland_scanner = $(top_builddir)/wayland-scanner
bin_PROGRAMS = wayland-scanner
wayland_scanner_SOURCES = src/scanner.c
wayland_scanner_CFLAGS = $(EXPAT_CFLAGS) $(AM_CFLAGS)
wayland_scanner_LDADD = $(EXPAT_LIBS) libwayland-util.la
-$(BUILT_SOURCES) : wayland-scanner
pkgconfig_DATA += src/wayland-scanner.pc
-else
+
+if USE_HOST_SCANNER
wayland_scanner = wayland-scanner
+else
+$(BUILT_SOURCES) : wayland-scanner
+wayland_scanner = $(top_builddir)/wayland-scanner
endif
libwayland_util_la_CFLAGS = $(AM_CFLAGS)