Re: [Mesa-dev] [PATCH 07/13] autotools: set XA versions in configure.ac and configure header file
On 7 November 2017 at 00:30, Dylan Baker wrote: > Quoting Emil Velikov (2017-11-02 07:00:16) >> On 1 November 2017 at 22:49, Dylan Baker wrote: >> > Currently the versions are set in the header, and then sed is used to >> > extract them, so that autotools can use them elsewhere. >> > >> > This is odd. Autotools is perfectly capable of configuring the header >> > with the versions, and then they don't need to be extracted from the >> > the header. This is cleaner and more obvious. >> > >> > Tested with make distcheck. >> > >> The idea was to have a place (like VERSION) to grab the version and >> reuse across the board. >> Since nobody the only other user can handle .in files - it makes sense >> to remove the rather nasty construct. >> >> >> > +XA_VERSION_MAJOR=2 >> > +AC_SUBST([XA_VERSION_MAJOR]) >> Please drop the _VERSION bit and temporary variables. > > XA_VERSION is used in the xatracker.pc file, do you want a separate change to > replace that with major.minor.tiny? I can certainly add that to v2. > I'd leave XA_VERSION as-is same as XA_{MAJOR,MINOR,TINY} (no _VERSION) as per the earlier example. Those are cosmetic changes, which are better suited in separate patch. Thanks Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 07/13] autotools: set XA versions in configure.ac and configure header file
Quoting Emil Velikov (2017-11-02 07:00:16) > On 1 November 2017 at 22:49, Dylan Baker wrote: > > Currently the versions are set in the header, and then sed is used to > > extract them, so that autotools can use them elsewhere. > > > > This is odd. Autotools is perfectly capable of configuring the header > > with the versions, and then they don't need to be extracted from the > > the header. This is cleaner and more obvious. > > > > Tested with make distcheck. > > > The idea was to have a place (like VERSION) to grab the version and > reuse across the board. > Since nobody the only other user can handle .in files - it makes sense > to remove the rather nasty construct. > > > > +XA_VERSION_MAJOR=2 > > +AC_SUBST([XA_VERSION_MAJOR]) > Please drop the _VERSION bit and temporary variables. XA_VERSION is used in the xatracker.pc file, do you want a separate change to replace that with major.minor.tiny? I can certainly add that to v2. > It make inconsistent with the rest of Mesa. > > AC_SUBST([XA_MAJOR], 2) > AC_SUBST([XA_MINOR], 2) > AC_SUBST([XA_TINY], 0) > > With the above > Reviewed-by: Emil Velikov > > The tiny -> patch change is good, but please keep that separate change > and update nine for consistency. > > Thanks > Emil signature.asc Description: signature ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 07/13] autotools: set XA versions in configure.ac and configure header file
With Emil's suggestions, Reviewed-by: Matt Turner ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 07/13] autotools: set XA versions in configure.ac and configure header file
On 2 November 2017 at 14:00, Emil Velikov wrote: > On 1 November 2017 at 22:49, Dylan Baker wrote: >> Currently the versions are set in the header, and then sed is used to >> extract them, so that autotools can use them elsewhere. >> >> This is odd. Autotools is perfectly capable of configuring the header >> with the versions, and then they don't need to be extracted from the >> the header. This is cleaner and more obvious. >> >> Tested with make distcheck. >> > The idea was to have a place (like VERSION) to grab the version and > reuse across the board. > Since nobody the only other user can handle .in files - it makes sense > to remove the rather nasty construct. > > >> +XA_VERSION_MAJOR=2 >> +AC_SUBST([XA_VERSION_MAJOR]) > Please drop the _VERSION bit and temporary variables. > It make inconsistent with the rest of Mesa. > > AC_SUBST([XA_MAJOR], 2) > AC_SUBST([XA_MINOR], 2) > AC_SUBST([XA_TINY], 0) > I've butchered the numbers - should be 2.3.0 -Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 07/13] autotools: set XA versions in configure.ac and configure header file
On 1 November 2017 at 22:49, Dylan Baker wrote: > Currently the versions are set in the header, and then sed is used to > extract them, so that autotools can use them elsewhere. > > This is odd. Autotools is perfectly capable of configuring the header > with the versions, and then they don't need to be extracted from the > the header. This is cleaner and more obvious. > > Tested with make distcheck. > The idea was to have a place (like VERSION) to grab the version and reuse across the board. Since nobody the only other user can handle .in files - it makes sense to remove the rather nasty construct. > +XA_VERSION_MAJOR=2 > +AC_SUBST([XA_VERSION_MAJOR]) Please drop the _VERSION bit and temporary variables. It make inconsistent with the rest of Mesa. AC_SUBST([XA_MAJOR], 2) AC_SUBST([XA_MINOR], 2) AC_SUBST([XA_TINY], 0) With the above Reviewed-by: Emil Velikov The tiny -> patch change is good, but please keep that separate change and update nine for consistency. Thanks Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 07/13] autotools: set XA versions in configure.ac and configure header file
Currently the versions are set in the header, and then sed is used to extract them, so that autotools can use them elsewhere. This is odd. Autotools is perfectly capable of configuring the header with the versions, and then they don't need to be extracted from the the header. This is cleaner and more obvious. Tested with make distcheck. cc: Matt Turner Signed-off-by: Dylan Baker --- configure.ac| 17 - .../state_trackers/xa/{xa_tracker.h => xa_tracker.h.in} | 6 +++--- 2 files changed, 11 insertions(+), 12 deletions(-) rename src/gallium/state_trackers/xa/{xa_tracker.h => xa_tracker.h.in} (97%) diff --git a/configure.ac b/configure.ac index 9aa02f55ded..8565d4fca55 100644 --- a/configure.ac +++ b/configure.ac @@ -2808,15 +2808,13 @@ AM_CONDITIONAL(HAVE_VULKAN_COMMON, test "x$VULKAN_DRIVERS" != "x") AC_SUBST([XVMC_MAJOR], 1) AC_SUBST([XVMC_MINOR], 0) -XA_HEADER="$srcdir/src/gallium/state_trackers/xa/xa_tracker.h" -XA_MAJOR=`grep "#define XA_TRACKER_VERSION_MAJOR" $XA_HEADER | $SED 's/^#define XA_TRACKER_VERSION_MAJOR //'` -XA_MINOR=`grep "#define XA_TRACKER_VERSION_MINOR" $XA_HEADER | $SED 's/^#define XA_TRACKER_VERSION_MINOR //'` -XA_TINY=`grep "#define XA_TRACKER_VERSION_PATCH" $XA_HEADER | $SED 's/^#define XA_TRACKER_VERSION_PATCH //'` - -AC_SUBST([XA_MAJOR], $XA_MAJOR) -AC_SUBST([XA_MINOR], $XA_MINOR) -AC_SUBST([XA_TINY], $XA_TINY) -AC_SUBST([XA_VERSION], "$XA_MAJOR.$XA_MINOR.$XA_TINY") +XA_VERSION_MAJOR=2 +AC_SUBST([XA_VERSION_MAJOR]) +XA_VERSION_MINOR=3 +AC_SUBST([XA_VERSION_MINOR]) +XA_VERSION_PATCH=0 +AC_SUBST([XA_VERSION_PATCH]) +AC_SUBST([XA_VERSION], "$XA_MAJOR.$XA_MINOR.$XA_PATCH") AC_ARG_ENABLE(valgrind, [AS_HELP_STRING([--enable-valgrind], @@ -2898,6 +2896,7 @@ AC_CONFIG_FILES([Makefile src/gallium/state_trackers/va/Makefile src/gallium/state_trackers/vdpau/Makefile src/gallium/state_trackers/xa/Makefile + src/gallium/state_trackers/xa/xa_tracker.h src/gallium/state_trackers/xvmc/Makefile src/gallium/targets/d3dadapter9/Makefile src/gallium/targets/d3dadapter9/d3d.pc diff --git a/src/gallium/state_trackers/xa/xa_tracker.h b/src/gallium/state_trackers/xa/xa_tracker.h.in similarity index 97% rename from src/gallium/state_trackers/xa/xa_tracker.h rename to src/gallium/state_trackers/xa/xa_tracker.h.in index 44b3eb5cbe4..cbd2ae55092 100644 --- a/src/gallium/state_trackers/xa/xa_tracker.h +++ b/src/gallium/state_trackers/xa/xa_tracker.h.in @@ -36,9 +36,9 @@ #include -#define XA_TRACKER_VERSION_MAJOR 2 -#define XA_TRACKER_VERSION_MINOR 3 -#define XA_TRACKER_VERSION_PATCH 0 +#define XA_TRACKER_VERSION_MAJOR @XA_VERSION_MAJOR@ +#define XA_TRACKER_VERSION_MINOR @XA_VERSION_MINOR@ +#define XA_TRACKER_VERSION_PATCH @XA_VERSION_PATCH@ #define XA_FLAG_SHARED (1 << 0) #define XA_FLAG_RENDER_TARGET (1 << 1) -- 2.14.3 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev