meson: Move the BUILD_DATE/TIME setup to configure time.

By having it as a custom_target with build_always, every "ninja -C
build" would rebuild Xorg for the new date/time, even if the rest of
Xorg didn't change.

We could build the rest of Xorg into a static lib, and regenerate
date/time when the static lib changes and link that into a final Xorg,
but BUILD_DATE/TIME is such a dubious feature (compared to including a
git sha, which is easy with meson) it doesn't seem worth the build
time cost.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
Eric Anholt 2017-09-01 12:22:59 -07:00 committed by Adam Jackson
parent 05e7e8b587
commit 5abaa50b29

View File

@ -65,11 +65,9 @@ if get_option('pciaccess')
srcs_xorg_common += ['xf86pciBus.c', 'xf86VGAarbiter.c'] srcs_xorg_common += ['xf86pciBus.c', 'xf86VGAarbiter.c']
endif endif
srcs_xorg_common += custom_target( srcs_xorg_common += configure_file(
'xf86Build.h',
output: 'xf86Build.h', output: 'xf86Build.h',
command: [join_paths(meson.current_source_dir(), 'xf86Build.sh'), '@OUTPUT@'], command: ['sh', join_paths(meson.current_source_dir(), 'xf86Build.sh'), '@OUTPUT@'],
build_always: true,
) )
srcs_xorg_common += custom_target( srcs_xorg_common += custom_target(