diff --git a/Makefile.am b/Makefile.am index 19511f765..763a772df 100644 --- a/Makefile.am +++ b/Makefile.am @@ -142,7 +142,7 @@ EXTRA_DIST += \ include/xorg-config.h.meson.in \ include/xwin-config.h.meson.in \ hw/xfree86/loader/symbol-test.c \ - hw/xfree86/common/xf86Build.sh \ + buildDateTime.sh \ composite/meson.build \ config/meson.build \ damageext/meson.build \ @@ -213,3 +213,5 @@ EXTRA_DIST += \ xfixes/meson.build \ Xi/meson.build \ xkb/meson.build + +DISTCLEANFILES = buildDateTime.h diff --git a/hw/xfree86/common/xf86Build.h.in b/buildDateTime.h.in similarity index 100% rename from hw/xfree86/common/xf86Build.h.in rename to buildDateTime.h.in diff --git a/hw/xfree86/common/xf86Build.sh b/buildDateTime.sh similarity index 100% rename from hw/xfree86/common/xf86Build.sh rename to buildDateTime.sh diff --git a/configure.ac b/configure.ac index 1107bd8b7..5055d271d 100644 --- a/configure.ac +++ b/configure.ac @@ -2407,6 +2407,7 @@ if test "x$CONFIG_HAL" = xno && test "x$CONFIG_UDEV" = xno; then fi AC_CONFIG_FILES([ +buildDateTime.h Makefile glx/Makefile include/Makefile @@ -2442,7 +2443,6 @@ hw/Makefile hw/xfree86/Makefile hw/xfree86/Xorg.sh hw/xfree86/common/Makefile -hw/xfree86/common/xf86Build.h hw/xfree86/ddc/Makefile hw/xfree86/dixmods/Makefile hw/xfree86/doc/Makefile diff --git a/hw/xfree86/common/Makefile.am b/hw/xfree86/common/Makefile.am index 41758fd2e..5d344584d 100644 --- a/hw/xfree86/common/Makefile.am +++ b/hw/xfree86/common/Makefile.am @@ -45,14 +45,15 @@ libcommon_la_SOURCES = xf86Configure.c xf86Bus.c xf86Config.c \ xf86Mode.c xorgHelper.c xf86Extensions.h \ xf86Extensions.c $(XF86VMODESOURCES) \ $(XVSOURCES) $(BUSSOURCES) $(RANDRSOURCES) -nodist_libcommon_la_SOURCES = xf86DefModeSet.c xf86Build.h +nodist_libcommon_la_SOURCES = xf86DefModeSet.c libcommon_la_LIBADD = $(top_builddir)/config/libconfig.la AM_CPPFLAGS = $(XORG_INCS) -I$(srcdir)/../ddc -I$(srcdir)/../i2c \ -I$(srcdir)/../loader -I$(srcdir)/../parser \ -I$(srcdir)/../vbe -I$(srcdir)/../int10 \ -I$(srcdir)/../vgahw -I$(srcdir)/../dixmods/extmod \ - -I$(srcdir)/../modes -I$(srcdir)/../ramdac -I$(srcdir)/../dri2 + -I$(srcdir)/../modes -I$(srcdir)/../ramdac -I$(srcdir)/../dri2 \ + -I$(top_builddir) sdk_HEADERS = compiler.h fourcc.h xf86.h xf86Module.h xf86Opt.h \ xf86PciInfo.h xf86Priv.h xf86Privstr.h \ @@ -62,7 +63,6 @@ sdk_HEADERS = compiler.h fourcc.h xf86.h xf86Module.h xf86Opt.h \ xf86platformBus.h xf86MatchDrivers.h \ xaarop.h -DISTCLEANFILES = xf86Build.h CLEANFILES = $(BUILT_SOURCES) EXTRA_DIST = \ diff --git a/hw/xfree86/common/meson.build b/hw/xfree86/common/meson.build index 3e617dc36..a59aeb98f 100644 --- a/hw/xfree86/common/meson.build +++ b/hw/xfree86/common/meson.build @@ -74,11 +74,6 @@ if get_option('pciaccess') srcs_xorg_common += ['xf86pciBus.c', 'xf86VGAarbiter.c'] endif -srcs_xorg_common += configure_file( - output: 'xf86Build.h', - command: ['sh', join_paths(meson.current_source_dir(), 'xf86Build.sh'), '@OUTPUT@'], -) - srcs_xorg_common += custom_target( 'xf86DefModeSet.c', output: 'xf86DefModeSet.c', @@ -89,7 +84,7 @@ srcs_xorg_common += custom_target( xorg_common = static_library('xorg_common', srcs_xorg_common, - include_directories: [inc, xorg_inc], + include_directories: [inc, xorg_inc, top_dir_inc], dependencies: [ common_dep, dbus_dep, diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c index 7d53987cb..1a2520c2a 100644 --- a/hw/xfree86/common/xf86Init.c +++ b/hw/xfree86/common/xf86Init.c @@ -65,7 +65,7 @@ #include "xf86_OSlib.h" #include "xf86cmap.h" #include "xorgVersion.h" -#include "xf86Build.h" +#include "buildDateTime.h" #include "mipointer.h" #include #include diff --git a/hw/xquartz/Makefile.am b/hw/xquartz/Makefile.am index 4da896d76..65061ae8a 100644 --- a/hw/xquartz/Makefile.am +++ b/hw/xquartz/Makefile.am @@ -2,13 +2,13 @@ noinst_LTLIBRARIES = libXquartz.la AM_CFLAGS = $(DIX_CFLAGS) AM_OBJCFLAGS = $(DIX_CFLAGS) AM_CPPFLAGS = \ - -DBUILD_DATE=\"$(BUILD_DATE)\" \ -DXSERVER_VERSION=\"$(VERSION)\" \ -DINXQUARTZ \ -DUSE_NEW_CLUT \ -DXFree86Server \ -I$(top_srcdir)/miext/rootless \ -I$(top_builddir)/pseudoramiX \ + -I$(top_builddir) \ -DX11LIBDIR=\"$(libdir)\" if GLX diff --git a/hw/xquartz/darwin.c b/hw/xquartz/darwin.c index ccfe5f963..5c7e96e87 100644 --- a/hw/xquartz/darwin.c +++ b/hw/xquartz/darwin.c @@ -34,6 +34,7 @@ #include #include +#include "buildDateTime.h" #include "os.h" #include "servermd.h" #include "inputstr.h" @@ -168,7 +169,7 @@ DarwinPrintBanner(void) { ErrorF("Xquartz starting:\n"); ErrorF("X.Org X Server %s\n", XSERVER_VERSION); - ErrorF("Build Date: %s\n", BUILD_DATE); + ErrorF("Build Date: %d\n", BUILD_DATE); } /* diff --git a/hw/xquartz/mach-startup/Makefile.am b/hw/xquartz/mach-startup/Makefile.am index b2c446af8..59696f8bb 100644 --- a/hw/xquartz/mach-startup/Makefile.am +++ b/hw/xquartz/mach-startup/Makefile.am @@ -1,6 +1,6 @@ AM_CPPFLAGS = \ -I$(srcdir)/.. \ - -DBUILD_DATE=\"$(BUILD_DATE)\" \ + -I$(top_builddir) \ -DXSERVER_VERSION=\"$(VERSION)\" \ -DX11BINDIR=\"$(bindir)\" diff --git a/hw/xquartz/mach-startup/bundle-main.c b/hw/xquartz/mach-startup/bundle-main.c index b40366244..5a593e75f 100644 --- a/hw/xquartz/mach-startup/bundle-main.c +++ b/hw/xquartz/mach-startup/bundle-main.c @@ -62,6 +62,7 @@ #include "mach_startupServer.h" #include "console_redirect.h" +#include "buildDateTime.h" /* From darwinEvents.c ... but don't want to pull in all the server cruft */ void @@ -81,9 +82,9 @@ extern int noPanoramiXExtension; #define DEFAULT_STARTX X11BINDIR "/startx -- " X11BINDIR "/Xquartz" #define DEFAULT_SHELL "/bin/sh" -#ifndef BUILD_DATE -#define BUILD_DATE "" -#endif +#define _STRINGIZE(s) #s +#define STRINGIZE(s) _STRINGIZE(s) + #ifndef XSERVER_VERSION #define XSERVER_VERSION "?" #endif @@ -99,7 +100,7 @@ asm (".desc ___crashreporter_info__, 0x10"); #endif static const char *__crashreporter_info__base = - "X.Org X Server " XSERVER_VERSION " Build Date: " BUILD_DATE; + "X.Org X Server " XSERVER_VERSION " Build Date: " STRINGIZE(BUILD_DATE); char *bundle_id_prefix = NULL; static char *server_bootstrap_name = NULL; diff --git a/hw/xwin/glx/meson.build b/hw/xwin/glx/meson.build index 57cce039d..95f248953 100644 --- a/hw/xwin/glx/meson.build +++ b/hw/xwin/glx/meson.build @@ -72,7 +72,7 @@ xwin_glx = static_library( srcs_windows_glx, include_directories: [ inc, - top_srcdir_inc, + top_dir_inc, include_directories('../'), ], dependencies: common_dep, @@ -89,7 +89,7 @@ WGLthunk = shared_library( srcs_wgl_thunk, include_directories: [ inc, - top_srcdir_inc, + top_dir_inc, ], c_args: xwin_glx_c_args + [ '-Wno-unused-function', diff --git a/hw/xwin/meson.build b/hw/xwin/meson.build index 72e4fe3c2..3ec809fef 100644 --- a/hw/xwin/meson.build +++ b/hw/xwin/meson.build @@ -142,7 +142,7 @@ xwin_dep = [ executable( server_name, srcs_windows, - include_directories: [inc, top_srcdir_inc], + include_directories: [inc, top_dir_inc], dependencies: xwin_dep, link_with: [ xwin_windowsdri, diff --git a/meson.build b/meson.build index e835e2d31..75261f4b7 100644 --- a/meson.build +++ b/meson.build @@ -531,7 +531,7 @@ endif glx_inc = include_directories('glx') -top_srcdir_inc = include_directories('.') +top_dir_inc = include_directories('.') serverconfigdir = join_paths(get_option('libdir'), 'xorg') @@ -566,6 +566,12 @@ manpage_config.set('modulepath', module_dir) manpage_config.set('suid_wrapper_dir', join_paths(get_option('prefix'), 'libexec')) manpage_config.set('default_font_path', default_font_path) +# generate header containing date & time build was configued +build_date_time = configure_file( + output: 'buildDateTime.h', + command: ['sh', join_paths(meson.current_source_dir(), 'buildDateTime.sh'), '@OUTPUT@'], +) + # Include must come first, as it sets up dix-config.h subdir('include')