cpupower: Make versioning scheme more obvious and fix version link
PATCH 1/1 cpupower: Make versioning scheme more obvious and fix version link
Hi Shuah,
I can darkly remember this was discussed already, but it seems it's still broken.
Currently there is:
LIB_MAJ= 0.0.1
LIB_MIN= 1
Resulting in:
libcpupower.so.0.0.1
libcpupower.so -> libcpupower.so.0.0.1
libcpupower.so.1 -> libcpupower.so.0.0.1
The naming of the variables is confusing (MIN should be MAJ) and the result is wrong.
You get the desired result by:
-LIB_MAJ= 0.0.1
+LIB_MAJ= 1.0.1
LIB_MIN= 1
libcpupower.so.1.0.1
libcpupower.so -> libcpupower.so.1.0.1
libcpupower.so.1 -> libcpupower.so.1.0.1
Correct, but still confusing.
Here my suggestion to fix this with a reasonable (re-)naming:
-----------------
tools/power/cpupower/Makefile +7 -4
@@ -52,8 +52,11 @@ DESTDIR ?= # and _should_ modify the PACKAGE_BUGREPORT definition VERSION:= $(shell ./utils/version-gen.sh) -LIB_MAJ= 0.0.1 -LIB_MIN= 1 +LIB_FIX= 1 +LIB_MIN= 0 +LIB_MAJ= 1 +LIB_VER= $(LIB_MAJ).$(LIB_MIN).$(LIB_FIX) + PACKAGE = cpupower PACKAGE_BUGREPORT = [email protected]
@@ -203,9 +206,9 @@ $(OUTPUT)lib/%.o: $(LIB_SRC) $(LIB_HEADERS) $(OUTPUT)libcpupower.so.$(LIB_MAJ): $(LIB_OBJS) $(ECHO) " LD " $@ $(QUIET) $(CC) -shared $(CFLAGS) $(LDFLAGS) -o $@ \ - -Wl,-soname,libcpupower.so.$(LIB_MIN) $(LIB_OBJS) + -Wl,-soname,libcpupower.so.$(LIB_VER) $(LIB_OBJS) @ln -sf $(@F) $(OUTPUT)libcpupower.so - @ln -sf $(@F) $(OUTPUT)libcpupower.so.$(LIB_MIN) + @ln -sf $(@F) $(OUTPUT)libcpupower.so.$(LIB_VER) libcpupower: $(OUTPUT)libcpupower.so.$(LIB_MAJ)
Shuah Khan
maintainerQuoted 24 lines · Thomas Renninger
Hi Shuah,
I can darkly remember this was discussed already, but it seems it's still broken.
Currently there is:
LIB_MAJ= 0.0.1
LIB_MIN= 1Resulting in:
libcpupower.so.0.0.1
libcpupower.so -> libcpupower.so.0.0.1
libcpupower.so.1 -> libcpupower.so.0.0.1The naming of the variables is confusing (MIN should be MAJ) and the result is wrong.
You get the desired result by:
(quoted diff) +1
-1-LIB_MAJ= 0.0.1 +LIB_MAJ= 1.0.1LIB_MIN= 1
libcpupower.so.1.0.1
libcpupower.so -> libcpupower.so.1.0.1
libcpupower.so.1 -> libcpupower.so.1.0.1
Quoted 2 lines
Correct, but still confusing.
Here my suggestion to fix this with a reasonable (re-)naming:
I thought we fixed this one. Guess not. Can you send me a patch to fix this?
Quoted 22 lines
-----------------
tools/power/cpupower/Makefile +5
-2@@ -52,8 +52,11 @@ DESTDIR ?= # and _should_ modify the PACKAGE_BUGREPORT definition VERSION:= $(shell ./utils/version-gen.sh) -LIB_MAJ= 0.0.1 -LIB_MIN= 1 +LIB_FIX= 1 +LIB_MIN= 0 +LIB_MAJ= 1 +LIB_VER= $(LIB_MAJ).$(LIB_MIN).$(LIB_FIX) + PACKAGE = cpupower PACKAGE_BUGREPORT = [email protected]@@ -203,9 +206,9 @@ $(OUTPUT)lib/%.o: $(LIB_SRC) $(LIB_HEADERS) $(OUTPUT)libcpupower.so.$(LIB_MAJ): $(LIB_OBJS)
tools/power/cpupower/Makefile $(OUTPUT)lib/%.o: $(LIB_SRC) $(LIB_HEADERS) · line 214
Quoted 10 lines
tools/power/cpupower/Makefile +2
-2$(ECHO) " LD " $@ $(QUIET) $(CC) -shared $(CFLAGS) $(LDFLAGS) -o $@ \ - -Wl,-soname,libcpupower.so.$(LIB_MIN) $(LIB_OBJS) + -Wl,-soname,libcpupower.so.$(LIB_VER) $(LIB_OBJS) @ln -sf $(@F) $(OUTPUT)libcpupower.so - @ln -sf $(@F) $(OUTPUT)libcpupower.so.$(LIB_MIN) + @ln -sf $(@F) $(OUTPUT)libcpupower.so.$(LIB_VER) libcpupower: $(OUTPUT)libcpupower.so.$(LIB_MAJ)
thanks,
-- Shuah