build: Mechanically generate ABI versions from version number

If we're strict about applying something resembling semantic versioning
to the "marketing" version number, then we can mechanically generate
the ABI version from it.

This limits the range of valid micro versions (patchlevels) to 0-99.

Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
Simon McVittie
2022-05-04 16:40:11 +01:00
committed by Sam Lantinga
parent 60d702ac74
commit fff97c95eb
5 changed files with 57 additions and 35 deletions

View File

@@ -17,14 +17,10 @@
* Bump ABI version information
* `configure.ac`: `CMakeLists.txt`: `SDL_INTERFACE_AGE`, `SDL_BINARY_AGE`
* `SDL_BINARY_AGE += 1`
* set `SDL_INTERFACE_AGE` to 0
* if backwards compatibility has been broken,
set both `SDL_BINARY_AGE` and `SDL_INTERFACE_AGE` to 0
* `Xcode/SDL/SDL.xcodeproj/project.pbxproj`: `DYLIB_CURRENT_VERSION`,
`DYLIB_COMPATIBILITY_VERSION`
* increment first number in `DYLIB_CURRENT_VERSION`
* `CMakeLists.txt`, `Xcode/SDL/SDL.xcodeproj/project.pbxproj`:
`DYLIB_CURRENT_VERSION`, `DYLIB_COMPATIBILITY_VERSION`
* set first number in `DYLIB_CURRENT_VERSION` to
(100 * *minor*) + 1
* set second number in `DYLIB_CURRENT_VERSION` to 0
* if backwards compatibility has been broken,
increase `DYLIB_COMPATIBILITY_VERSION` (?)
@@ -45,12 +41,9 @@
* Bump ABI version information
* `configure.ac`: `CMakeLists.txt`: `SDL_INTERFACE_AGE`, `SDL_BINARY_AGE`
* `SDL_INTERFACE_AGE += 1`
* `SDL_BINARY_AGE += 1`
* `Xcode/SDL/SDL.xcodeproj/project.pbxproj`: `DYLIB_CURRENT_VERSION`,
`DYLIB_COMPATIBILITY_VERSION`
* increment second number in `DYLIB_CURRENT_VERSION`
* `CMakeLists.txt`, `Xcode/SDL/SDL.xcodeproj/project.pbxproj`:
`DYLIB_CURRENT_VERSION`, `DYLIB_COMPATIBILITY_VERSION`
* set second number in `DYLIB_CURRENT_VERSION` to *patchlevel*
* Regenerate `configure`
@@ -77,8 +70,13 @@
* Bump ABI version information
* Same places as listed above
* Assume that the next feature release will contain new API/ABI
* `CMakeLists.txt`, `Xcode/SDL/SDL.xcodeproj/project.pbxproj`:
`DYLIB_CURRENT_VERSION`, `DYLIB_COMPATIBILITY_VERSION`
* set first number in `DYLIB_CURRENT_VERSION` to
(100 * *minor*) + *patchlevel* + 1
* set second number in `DYLIB_CURRENT_VERSION` to 0
* if backwards compatibility has been broken,
increase `DYLIB_COMPATIBILITY_VERSION` (?)
* Regenerate `configure`