Unify the include style of shared/ headers

When all shared/ headers are included in the same way, we can drop unnecessary
include seach paths from the compiler.

This include style was chosen because it is prevalent in the code base. Doing
anything different would have been a bigger patch.

This also means that we need to keep the project root directory in the include
search path, which means that one could accidentally include private headers
with

	#include "libweston/dbus.h"

or even

	#include <libweston/dbus.h>

IMO such problem is smaller than the churn caused by any of the alternatives,
and we should be able to catch those in review. We might even be able to catch
those with grep in CI if necessary.

The "bad" include style was found with:
$ for h in shared/*.h; do git grep -F $(basename $h); done | grep -vF '"shared/'

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
This commit is contained in:
Pekka Paalanen 2019-04-05 16:09:45 +03:00
parent acf84fd29f
commit c232f8d934
18 changed files with 21 additions and 21 deletions

View File

@ -34,7 +34,7 @@
#include <GLES2/gl2.h>
#include <EGL/egl.h>
#include "../shared/platform.h"
#include "shared/platform.h"
struct window;
struct seat;

View File

@ -51,7 +51,7 @@
#include "shared/xalloc.h"
#include "window.h"
#include "weston-egl-ext.h"
#include "shared/weston-egl-ext.h"
static int option_blit;

View File

@ -48,9 +48,9 @@
#include "weston.h"
#include <libweston/libweston.h>
#include "../shared/os-compatibility.h"
#include "../shared/helpers.h"
#include "../shared/string-helpers.h"
#include "shared/os-compatibility.h"
#include "shared/helpers.h"
#include "shared/string-helpers.h"
#include "git-version.h"
#include <libweston/version.h>
#include "weston.h"

View File

@ -30,7 +30,7 @@
#include <libweston/libweston.h>
#include <libweston/zalloc.h>
#include "helpers.h"
#include "shared/helpers.h"
#include <libweston-desktop/libweston-desktop.h>
#include "internal.h"

View File

@ -57,7 +57,7 @@
#include "shared/timespec-util.h"
#include "shared/string-helpers.h"
#include "renderer-gl/gl-renderer.h"
#include "weston-egl-ext.h"
#include "shared/weston-egl-ext.h"
#include "pixman-renderer.h"
#include "pixel-formats.h"
#include "libbacklight.h"

View File

@ -49,7 +49,7 @@
#include <libweston/libweston.h>
#include <libweston/backend-wayland.h>
#include "renderer-gl/gl-renderer.h"
#include "weston-egl-ext.h"
#include "shared/weston-egl-ext.h"
#include "pixman-renderer.h"
#include "shared/helpers.h"
#include "shared/image-loader.h"

View File

@ -58,7 +58,7 @@
#include "shared/timespec-util.h"
#include "shared/file-util.h"
#include "renderer-gl/gl-renderer.h"
#include "weston-egl-ext.h"
#include "shared/weston-egl-ext.h"
#include "pixman-renderer.h"
#include "presentation-time-server-protocol.h"
#include "linux-dmabuf.h"

View File

@ -34,7 +34,7 @@
#include <drm_fourcc.h>
#include <wayland-client-protocol.h>
#include "helpers.h"
#include "shared/helpers.h"
#include "wayland-util.h"
#include "pixel-formats.h"
@ -60,7 +60,7 @@
.bits.a = a_, \
.component_type = PIXEL_COMPONENT_TYPE_FIXED
#include "weston-egl-ext.h"
#include "shared/weston-egl-ext.h"
/**
* Table of DRM formats supported by Weston; RGB, ARGB and YUV formats are

View File

@ -35,7 +35,7 @@
#include "gl-renderer.h"
#include "gl-renderer-internal.h"
#include "pixel-formats.h"
#include "weston-egl-ext.h"
#include "shared/weston-egl-ext.h"
#include <assert.h>

View File

@ -57,7 +57,7 @@
#include "shared/helpers.h"
#include "shared/platform.h"
#include "shared/timespec-util.h"
#include "weston-egl-ext.h"
#include "shared/weston-egl-ext.h"
#define GR_GL_VERSION(major, minor) \
(((uint32_t)(major) << 16) | (uint32_t)(minor))

View File

@ -34,7 +34,7 @@
#include "timeline.h"
#include <libweston/libweston.h>
#include "file-util.h"
#include "shared/file-util.h"
struct timeline_log {
clock_t clk_id;

View File

@ -26,7 +26,7 @@
#include "config.h"
#include <libweston/weston-log.h>
#include "helpers.h"
#include "shared/helpers.h"
#include <libweston/libweston.h>
#include "weston-log-internal.h"

View File

@ -26,7 +26,7 @@
#include "config.h"
#include <libweston/weston-log.h>
#include "helpers.h"
#include "shared/helpers.h"
#include <libweston/libweston.h>
#include "weston-log-internal.h"

View File

@ -26,7 +26,7 @@
#include "config.h"
#include <libweston/weston-log.h>
#include "helpers.h"
#include "shared/helpers.h"
#include <libweston/libweston.h>
#include "weston-log-internal.h"

View File

@ -27,7 +27,7 @@
#include "config.h"
#include <libweston/weston-log.h>
#include "helpers.h"
#include "shared/helpers.h"
#include <libweston/libweston.h>
#include "weston-log-internal.h"

View File

@ -35,7 +35,7 @@
#include <libweston/libweston.h>
#include "compositor/weston.h"
#include "file-util.h"
#include "shared/file-util.h"
#include "libweston-internal.h"
static char *

View File

@ -34,7 +34,7 @@
#include <unistd.h>
#include <time.h>
#include "timespec-util.h"
#include "shared/timespec-util.h"
#include "shared/helpers.h"
#include "zunitc/zunitc.h"

View File

@ -45,7 +45,7 @@
#include "xwayland.h"
#include "xwayland-internal-interface.h"
#include "cairo-util.h"
#include "shared/cairo-util.h"
#include "hash.h"
#include "shared/helpers.h"