[1/2] compositor: Display option help text only for enabled backends

Submitted by Bryce Harrington on Oct. 23, 2014, 10:25 p.m.

Details

Message ID 1414103104-31486-1-git-send-email-bryce@osg.samsung.com
State Accepted
Commit 8eb95c495cac9fa1be9a96f2a161c679c95f778d
Headers show

Not browsing as part of any series.

Commit Message

Bryce Harrington Oct. 23, 2014, 10:25 p.m.
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
---
 src/compositor.c | 8 ++++++++
 1 file changed, 8 insertions(+)

Patch hide | download patch | download mbox

diff --git a/src/compositor.c b/src/compositor.c
index a42bc86..0175747 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -4200,6 +4200,7 @@  usage(int error_code)
 		"  --no-config\t\tDo not read weston.ini\n"
 		"  -h, --help\t\tThis help message\n\n");
 
+#if defined(BUILD_DRM_COMPOSITOR)
 	fprintf(stderr,
 		"Options for drm-backend.so:\n\n"
 		"  --connector=ID\tBring up only this connector\n"
@@ -4207,12 +4208,16 @@  usage(int error_code)
 		"  --tty=TTY\t\tThe tty to use\n"
 		"  --use-pixman\t\tUse the pixman (CPU) renderer\n"
 		"  --current-mode\tPrefer current KMS mode over EDID preferred mode\n\n");
+#endif
 
+#if defined(BUILD_FBDEV_COMPOSITOR)
 	fprintf(stderr,
 		"Options for fbdev-backend.so:\n\n"
 		"  --tty=TTY\t\tThe tty to use\n"
 		"  --device=DEVICE\tThe framebuffer device to use\n\n");
+#endif
 
+#if defined(BUILD_X11_COMPOSITOR)
 	fprintf(stderr,
 		"Options for x11-backend.so:\n\n"
 		"  --width=WIDTH\t\tWidth of X window\n"
@@ -4221,7 +4226,9 @@  usage(int error_code)
 		"  --use-pixman\t\tUse the pixman (CPU) renderer\n"
 		"  --output-count=COUNT\tCreate multiple outputs\n"
 		"  --no-input\t\tDont create input devices\n\n");
+#endif
 
+#if defined(BUILD_WAYLAND_COMPOSITOR)
 	fprintf(stderr,
 		"Options for wayland-backend.so:\n\n"
 		"  --width=WIDTH\t\tWidth of Wayland surface\n"
@@ -4232,6 +4239,7 @@  usage(int error_code)
 		"  --output-count=COUNT\tCreate multiple outputs\n"
 		"  --sprawl\t\tCreate one fullscreen output for every parent output\n"
 		"  --display=DISPLAY\tWayland display to connect to\n\n");
+#endif
 
 #if defined(BUILD_RPI_COMPOSITOR) && defined(HAVE_BCM_HOST)
 	fprintf(stderr,