Re: [PATCH weston 4/6] libweston: use new versioning scheme
On 4 July 2016 at 15:45, Quentin Glidic wrote: > On 04/07/2016 16:23, Emil Velikov wrote: >> >> Use the documented libweston-$major.so.0.$minor.$patch scheme. >> >> An (almost) identical one is used by GLIB, GTK{2,3}, QT5, json-glib and >> others. >> >> v2: >> - Use shorter variable names LIBWESTON_{MAJOR,MINOR...} >> - Correctly use -version-info. >> - Drop unneeded @LIBWESTON_VERSION_MAJOR@ additions. >> >> Signed-off-by: Emil Velikov >> --- >> >> XXX: >> - Should we rename libweston{,-0}.pc.in ? >> - Drop the s/LIBWESTON_ABI_VERSION/LIBWESTON_MAJOR/ hunk ? >> - Keep the configure libweston_*_version variables shorter ? >> - Yes, the LT_VERSION_INFO hunk looks a bit nasty, yet this is what GTK >> is doing, once you unraver the 2-3 layers of variables. It works as >> expected though, and I'd imagine others are doing a similar trick. >> >> fixup! libweston: use new versioning scheme > > > Looks good. A bit hard to read but I thing you at least build-tested it. :-) > > I think you can drop the "v2" part in the commit message, btw. > I've noticed that other commits keep their revision history above the --- line, and thus is present in git log. So I take that it's a nice to have, but here it's just useless ? > One last comment inline to make it perfect. > > > >> --- >> Makefile.am | 24 >> compositor/weston.pc.in | 2 +- >> configure.ac| 12 +--- >> 3 files changed, 22 insertions(+), 16 deletions(-) >> >> diff --git a/Makefile.am b/Makefile.am >> index b050c60..1c3d553 100644 >> --- a/Makefile.am >> +++ b/Makefile.am >> @@ -5,7 +5,7 @@ noinst_PROGRAMS = >> libexec_PROGRAMS = >> moduledir = $(libdir)/weston >> module_LTLIBRARIES = >> -libweston_moduledir = $(libdir)/libweston-${LIBWESTON_ABI_VERSION} >> +libweston_moduledir = $(libdir)/libweston-$(LIBWESTON_MAJOR) >> libweston_module_LTLIBRARIES = >> noinst_LTLIBRARIES = >> BUILT_SOURCES = >> @@ -61,15 +61,15 @@ CLEANFILES = weston.ini \ >> internal-screenshot-00.png \ >> $(BUILT_SOURCES) >> >> -lib_LTLIBRARIES = libweston.la >> -libweston_la_CPPFLAGS = $(AM_CPPFLAGS) -DIN_WESTON >> -libweston_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) >> $(LIBUNWIND_CFLAGS) >> -libweston_la_LIBADD = $(COMPOSITOR_LIBS) $(LIBUNWIND_LIBS) \ >> +lib_LTLIBRARIES = libweston-@LIBWESTON_MAJOR@.la >> +libweston_@LIBWESTON_MAJOR@_la_CPPFLAGS = $(AM_CPPFLAGS) -DIN_WESTON >> +libweston_@LIBWESTON_MAJOR@_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) >> $(LIBUNWIND_CFLAGS) >> +libweston_@LIBWESTON_MAJOR@_la_LIBADD = $(COMPOSITOR_LIBS) >> $(LIBUNWIND_LIBS) \ >> $(DLOPEN_LIBS) -lm $(CLOCK_GETTIME_LIBS) \ >> $(LIBINPUT_BACKEND_LIBS) libshared.la >> -libweston_la_LDFLAGS = -release ${LIBWESTON_ABI_VERSION} >> +libweston_@LIBWESTON_MAJOR@_la_LDFLAGS = -version-info $(LT_VERSION_INFO) >> >> -libweston_la_SOURCES = \ >> +libweston_@LIBWESTON_MAJOR@la_SOURCES =\ >> libweston/git-version.h \ >> libweston/log.c \ >> libweston/compositor.c \ >> @@ -121,7 +121,7 @@ systemd_notify_la_SOURCES = \ >> libweston/compositor.h >> endif >> >> -nodist_libweston_la_SOURCES = \ >> +nodist_libweston_@LIBWESTON_MAJOR@_la_SOURCES = >> \ >> protocol/weston-screenshooter-protocol.c\ >> protocol/weston-screenshooter-server-protocol.h \ >> protocol/text-cursor-position-protocol.c\ >> @@ -137,7 +137,7 @@ nodist_libweston_la_SOURCES = >> \ >> protocol/linux-dmabuf-unstable-v1-protocol.c\ >> protocol/linux-dmabuf-unstable-v1-server-protocol.h >> >> -BUILT_SOURCES += $(nodist_libweston_la_SOURCES) >> +BUILT_SOURCES += $(nodist_libweston_@LIBWESTON_MAJOR@_la_SOURCES) >> >> bin_PROGRAMS += weston >> >> @@ -148,7 +148,7 @@ weston_CPPFLAGS = $(AM_CPPFLAGS) -DIN_WESTON >> \ >> weston_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(LIBUNWIND_CFLAGS) >> weston_LDADD = $(COMPOSITOR_LIBS) $(LIBUNWIND_LIBS) \ >> $(DLOPEN_LIBS) $(LIBINPUT_BACKEND_LIBS) \ >> - -lm libshared.la libweston.la >> + -lm libshared.la libweston-@LIBWESTON_MAJOR@.la >> >> weston_SOURCES = \ >> compositor/main.c \ >> @@ -225,12 +225,12 @@ endif >> endif # BUILD_WESTON_LAUNCH >> >> pkgconfigdir = $(libdir)/pkgconfig >> -pkgconfig_DATA = compositor/weston.pc >> libweston/libweston-${LIBWESTON_ABI_VERSION}.pc >> +pkgconfig_DATA = compositor/weston.pc >> libweston/libweston-${LIBWESTON_MAJOR}.pc >> >> wayland_sessiondir = $(datadir)/wayland-sessions >> dist_wayland_session_DATA = compositor/weston.desktop >> >> -libwestonincludedir = $(includedir)/libweston-${LIBWESTON_ABI_VERSION} >> +libwestonincludedir = $(i
Re: [PATCH weston 4/6] libweston: use new versioning scheme
On 04/07/2016 16:23, Emil Velikov wrote: Use the documented libweston-$major.so.0.$minor.$patch scheme. An (almost) identical one is used by GLIB, GTK{2,3}, QT5, json-glib and others. v2: - Use shorter variable names LIBWESTON_{MAJOR,MINOR...} - Correctly use -version-info. - Drop unneeded @LIBWESTON_VERSION_MAJOR@ additions. Signed-off-by: Emil Velikov --- XXX: - Should we rename libweston{,-0}.pc.in ? - Drop the s/LIBWESTON_ABI_VERSION/LIBWESTON_MAJOR/ hunk ? - Keep the configure libweston_*_version variables shorter ? - Yes, the LT_VERSION_INFO hunk looks a bit nasty, yet this is what GTK is doing, once you unraver the 2-3 layers of variables. It works as expected though, and I'd imagine others are doing a similar trick. fixup! libweston: use new versioning scheme Looks good. A bit hard to read but I thing you at least build-tested it. :-) I think you can drop the "v2" part in the commit message, btw. One last comment inline to make it perfect. --- Makefile.am | 24 compositor/weston.pc.in | 2 +- configure.ac| 12 +--- 3 files changed, 22 insertions(+), 16 deletions(-) diff --git a/Makefile.am b/Makefile.am index b050c60..1c3d553 100644 --- a/Makefile.am +++ b/Makefile.am @@ -5,7 +5,7 @@ noinst_PROGRAMS = libexec_PROGRAMS = moduledir = $(libdir)/weston module_LTLIBRARIES = -libweston_moduledir = $(libdir)/libweston-${LIBWESTON_ABI_VERSION} +libweston_moduledir = $(libdir)/libweston-$(LIBWESTON_MAJOR) libweston_module_LTLIBRARIES = noinst_LTLIBRARIES = BUILT_SOURCES = @@ -61,15 +61,15 @@ CLEANFILES = weston.ini \ internal-screenshot-00.png \ $(BUILT_SOURCES) -lib_LTLIBRARIES = libweston.la -libweston_la_CPPFLAGS = $(AM_CPPFLAGS) -DIN_WESTON -libweston_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(LIBUNWIND_CFLAGS) -libweston_la_LIBADD = $(COMPOSITOR_LIBS) $(LIBUNWIND_LIBS) \ +lib_LTLIBRARIES = libweston-@LIBWESTON_MAJOR@.la +libweston_@LIBWESTON_MAJOR@_la_CPPFLAGS = $(AM_CPPFLAGS) -DIN_WESTON +libweston_@LIBWESTON_MAJOR@_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(LIBUNWIND_CFLAGS) +libweston_@LIBWESTON_MAJOR@_la_LIBADD = $(COMPOSITOR_LIBS) $(LIBUNWIND_LIBS) \ $(DLOPEN_LIBS) -lm $(CLOCK_GETTIME_LIBS) \ $(LIBINPUT_BACKEND_LIBS) libshared.la -libweston_la_LDFLAGS = -release ${LIBWESTON_ABI_VERSION} +libweston_@LIBWESTON_MAJOR@_la_LDFLAGS = -version-info $(LT_VERSION_INFO) -libweston_la_SOURCES = \ +libweston_@LIBWESTON_MAJOR@la_SOURCES =\ libweston/git-version.h \ libweston/log.c \ libweston/compositor.c \ @@ -121,7 +121,7 @@ systemd_notify_la_SOURCES = \ libweston/compositor.h endif -nodist_libweston_la_SOURCES = \ +nodist_libweston_@LIBWESTON_MAJOR@_la_SOURCES = \ protocol/weston-screenshooter-protocol.c\ protocol/weston-screenshooter-server-protocol.h \ protocol/text-cursor-position-protocol.c\ @@ -137,7 +137,7 @@ nodist_libweston_la_SOURCES = \ protocol/linux-dmabuf-unstable-v1-protocol.c\ protocol/linux-dmabuf-unstable-v1-server-protocol.h -BUILT_SOURCES += $(nodist_libweston_la_SOURCES) +BUILT_SOURCES += $(nodist_libweston_@LIBWESTON_MAJOR@_la_SOURCES) bin_PROGRAMS += weston @@ -148,7 +148,7 @@ weston_CPPFLAGS = $(AM_CPPFLAGS) -DIN_WESTON \ weston_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(LIBUNWIND_CFLAGS) weston_LDADD = $(COMPOSITOR_LIBS) $(LIBUNWIND_LIBS) \ $(DLOPEN_LIBS) $(LIBINPUT_BACKEND_LIBS) \ - -lm libshared.la libweston.la + -lm libshared.la libweston-@LIBWESTON_MAJOR@.la weston_SOURCES = \ compositor/main.c \ @@ -225,12 +225,12 @@ endif endif # BUILD_WESTON_LAUNCH pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = compositor/weston.pc libweston/libweston-${LIBWESTON_ABI_VERSION}.pc +pkgconfig_DATA = compositor/weston.pc libweston/libweston-${LIBWESTON_MAJOR}.pc wayland_sessiondir = $(datadir)/wayland-sessions dist_wayland_session_DATA = compositor/weston.desktop -libwestonincludedir = $(includedir)/libweston-${LIBWESTON_ABI_VERSION} +libwestonincludedir = $(includedir)/libweston-${LIBWESTON_MAJOR} libwestoninclude_HEADERS = \ libweston/version.h \ libweston/compositor.h \ diff --git a/compositor/weston.pc.in b/compositor/weston.pc.in index 09e8580..6890a77 100644 --- a/compositor/weston.pc.in +++ b/compositor/weston.pc.in @@ -8,5 +8,5 @@ pkglibexecdir=${libexecdir}/@PACKAGE@ Name: Weston Plugin API Description: Header files for Weston plugin
[PATCH weston 4/6] libweston: use new versioning scheme
Use the documented libweston-$major.so.0.$minor.$patch scheme. An (almost) identical one is used by GLIB, GTK{2,3}, QT5, json-glib and others. v2: - Use shorter variable names LIBWESTON_{MAJOR,MINOR...} - Correctly use -version-info. - Drop unneeded @LIBWESTON_VERSION_MAJOR@ additions. Signed-off-by: Emil Velikov --- XXX: - Should we rename libweston{,-0}.pc.in ? - Drop the s/LIBWESTON_ABI_VERSION/LIBWESTON_MAJOR/ hunk ? - Keep the configure libweston_*_version variables shorter ? - Yes, the LT_VERSION_INFO hunk looks a bit nasty, yet this is what GTK is doing, once you unraver the 2-3 layers of variables. It works as expected though, and I'd imagine others are doing a similar trick. fixup! libweston: use new versioning scheme --- Makefile.am | 24 compositor/weston.pc.in | 2 +- configure.ac| 12 +--- 3 files changed, 22 insertions(+), 16 deletions(-) diff --git a/Makefile.am b/Makefile.am index b050c60..1c3d553 100644 --- a/Makefile.am +++ b/Makefile.am @@ -5,7 +5,7 @@ noinst_PROGRAMS = libexec_PROGRAMS = moduledir = $(libdir)/weston module_LTLIBRARIES = -libweston_moduledir = $(libdir)/libweston-${LIBWESTON_ABI_VERSION} +libweston_moduledir = $(libdir)/libweston-$(LIBWESTON_MAJOR) libweston_module_LTLIBRARIES = noinst_LTLIBRARIES = BUILT_SOURCES = @@ -61,15 +61,15 @@ CLEANFILES = weston.ini \ internal-screenshot-00.png \ $(BUILT_SOURCES) -lib_LTLIBRARIES = libweston.la -libweston_la_CPPFLAGS = $(AM_CPPFLAGS) -DIN_WESTON -libweston_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(LIBUNWIND_CFLAGS) -libweston_la_LIBADD = $(COMPOSITOR_LIBS) $(LIBUNWIND_LIBS) \ +lib_LTLIBRARIES = libweston-@LIBWESTON_MAJOR@.la +libweston_@LIBWESTON_MAJOR@_la_CPPFLAGS = $(AM_CPPFLAGS) -DIN_WESTON +libweston_@LIBWESTON_MAJOR@_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(LIBUNWIND_CFLAGS) +libweston_@LIBWESTON_MAJOR@_la_LIBADD = $(COMPOSITOR_LIBS) $(LIBUNWIND_LIBS) \ $(DLOPEN_LIBS) -lm $(CLOCK_GETTIME_LIBS) \ $(LIBINPUT_BACKEND_LIBS) libshared.la -libweston_la_LDFLAGS = -release ${LIBWESTON_ABI_VERSION} +libweston_@LIBWESTON_MAJOR@_la_LDFLAGS = -version-info $(LT_VERSION_INFO) -libweston_la_SOURCES = \ +libweston_@LIBWESTON_MAJOR@la_SOURCES =\ libweston/git-version.h \ libweston/log.c \ libweston/compositor.c \ @@ -121,7 +121,7 @@ systemd_notify_la_SOURCES = \ libweston/compositor.h endif -nodist_libweston_la_SOURCES = \ +nodist_libweston_@LIBWESTON_MAJOR@_la_SOURCES = \ protocol/weston-screenshooter-protocol.c\ protocol/weston-screenshooter-server-protocol.h \ protocol/text-cursor-position-protocol.c\ @@ -137,7 +137,7 @@ nodist_libweston_la_SOURCES = \ protocol/linux-dmabuf-unstable-v1-protocol.c\ protocol/linux-dmabuf-unstable-v1-server-protocol.h -BUILT_SOURCES += $(nodist_libweston_la_SOURCES) +BUILT_SOURCES += $(nodist_libweston_@LIBWESTON_MAJOR@_la_SOURCES) bin_PROGRAMS += weston @@ -148,7 +148,7 @@ weston_CPPFLAGS = $(AM_CPPFLAGS) -DIN_WESTON \ weston_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(LIBUNWIND_CFLAGS) weston_LDADD = $(COMPOSITOR_LIBS) $(LIBUNWIND_LIBS) \ $(DLOPEN_LIBS) $(LIBINPUT_BACKEND_LIBS) \ - -lm libshared.la libweston.la + -lm libshared.la libweston-@LIBWESTON_MAJOR@.la weston_SOURCES = \ compositor/main.c \ @@ -225,12 +225,12 @@ endif endif # BUILD_WESTON_LAUNCH pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = compositor/weston.pc libweston/libweston-${LIBWESTON_ABI_VERSION}.pc +pkgconfig_DATA = compositor/weston.pc libweston/libweston-${LIBWESTON_MAJOR}.pc wayland_sessiondir = $(datadir)/wayland-sessions dist_wayland_session_DATA = compositor/weston.desktop -libwestonincludedir = $(includedir)/libweston-${LIBWESTON_ABI_VERSION} +libwestonincludedir = $(includedir)/libweston-${LIBWESTON_MAJOR} libwestoninclude_HEADERS = \ libweston/version.h \ libweston/compositor.h \ diff --git a/compositor/weston.pc.in b/compositor/weston.pc.in index 09e8580..6890a77 100644 --- a/compositor/weston.pc.in +++ b/compositor/weston.pc.in @@ -8,5 +8,5 @@ pkglibexecdir=${libexecdir}/@PACKAGE@ Name: Weston Plugin API Description: Header files for Weston plugin development Version: @WESTON_VERSION@ -Requires.private: libweston-@LIBWESTON_ABI_VERSION@ +Requires.private: libweston-@LIBWESTON_MAJOR@ Cflags: -I${includedir}/weston diff --git a/configure.ac b/configure.ac index 85a475