Skip to contentSkip to conversation

Clean up some stale autotools artifacts

PATCH In review Joe Konno 3 participants 10 messages Feb 11, 2020 – Apr 2, 2020 Kbuild

lore
Share & tools
lore

Joe Konno

author
#0 lore raw

cover Clean up some stale autotools artifacts

From: Joe Konno <joe.konno(a)intel.com>

Sending these patches as a batch, but they are each stand-alone tweaks.

A few years ago I added a script that attempted to compile in a 'git describe' string into PowerTOP-- it has not performed to my expectations in the intervening time, so let's just remove it.

Also included in this batch are some autotools cleanups. We have been lugging around some m4 macros that, I assert, are no longer necessary.

Joe Konno (3):
Revert "configure.ac: version strings from git describe" configure.ac: required version to 2.69 configure.ac: ax_add_fortify_source

 .gitignore                     |   1 -
 Makefile.am                    |   2 -
 autogen.sh                     |   1 -
 configure.ac                   |   9 +-
 m4/ax_cxx_compile_stdcxx_11.m4 | 142 --------------
 m4/ax_pthread.m4               | 332 ---------------------------------
 m4/gcc_fortify_source_cc.m4    |  29 ---
 scripts/version                |  13 --
 src/display.cpp                |   2 +-
 9 files changed, 4 insertions(+), 527 deletions(-)
 delete mode 100644 m4/ax_cxx_compile_stdcxx_11.m4
 delete mode 100644 m4/ax_pthread.m4
 delete mode 100644 m4/gcc_fortify_source_cc.m4
 delete mode 100644 scripts/version
Signature · 1 line
2.25.0
author
#1 lore raw

PATCH 1/3 Revert "configure.ac: version strings from git describe"

From: Joe Konno <joe.konno(a)intel.com>

This doesn't work as well as I thought it would. So, let's remove it. As a result of the revert, remove a reference to a now-dead preprocessor define (PACKAGE_SHORT_VERSION).

This reverts commit 2daaaf54d07340610af759cc7f4c41742abb3277.

Signed-off-by Joe Konno <joe.konno(a)intel.com>
---
 .gitignore      |  1 -
 Makefile.am     |  2 --
 autogen.sh      |  1 -
 configure.ac    |  5 +----
 scripts/version | 13 -------------
 src/display.cpp |  2 +-
 6 files changed, 2 insertions(+), 22 deletions(-)
 delete mode 100644 scripts/version
.gitignore +0 -1
index 8358ca4c6c0f..c1fc2be37afe 100644
@@ -89,5 +89,4 @@ Makefile.in
 /src/powertop
 /stamp-h1
 /stamp-po
-/version*
 tags
Makefile.am +0 -2
index ffb5e91b2834..22429e0ce562 100644
@@ -15,6 +15,4 @@ EXTRA_DIST = \
 	TODO \
 	Android.mk \
 	COPYING \
-	version-long \
-	version-short \
 	autogen.sh
autogen.sh +0 -1
index 444f9998f806..e210037d70e0 100755
@@ -1,4 +1,3 @@
 #!/bin/sh	
 
-sh scripts/version
 autoreconf --install --verbose
configure.ac +1 -4
index ca7f1d5cefea..b3a6b2ca2639 100644
@@ -2,8 +2,7 @@
 # Process this file with autoconf to produce a configure script.
 
 AC_PREREQ([2.68])
-AC_INIT([powertop], m4_esyscmd_s([cat version-long]),
-	[powertop(a)lists.01.org], [], [https://01.org/powertop])
+AC_INIT([powertop], [2.12-pre], [powertop(a)lists.01.org], [], [https://01.org/powertop])
 AM_INIT_AUTOMAKE([
 	-Wall
 	1.12.2
@@ -152,8 +151,6 @@ AC_SEARCH_LIBS([inet_aton], [resolv], [], [
 	AC_MSG_ERROR([libresolv is required but was not found])
 ], [])
 
-AC_DEFINE([PACKAGE_SHORT_VERSION], m4_esyscmd_s([cat version-short]),
-	[Short package version])
 
 AS_IF([`pkg-config --exists bash-completion`], [
 	bashcompletiondir=`pkg-config --variable=completionsdir --define-variable=prefix=${prefix} bash-completion`
scripts/version deleted +0 -13
deleted file mode 100644
index 348b13d9f785..000000000000
@@ -1,13 +0,0 @@
-#!/bin/sh
-
-git branch > /dev/null 2>&1
-if [ "$?" = "0" ]; then
-	LONG=$(git describe --abbrev=7 --tags --always --dirty 2> /dev/null)
-	SHORT=\"$(git describe --tags --abbrev=0 2> /dev/null)\"
-else
-	LONG="RUN-VERSION-SCRIPT-IN-GIT-REPOSITORY-ONLY"
-	SHORT=\"$LONG\"
-fi
-
-echo $LONG  > version-long
-echo $SHORT > version-short
src/display.cpp +1 -1
index 7b3a7a2f2073..71311446728d 100644
@@ -117,7 +117,7 @@ void show_tab(unsigned int tab)
 
 	wattrset(tab_bar, A_REVERSE);
 	mvwprintw(tab_bar, 0,0, "%120s", "");
-	mvwprintw(tab_bar, 0,0, "PowerTOP %s", PACKAGE_SHORT_VERSION);
+	mvwprintw(tab_bar, 0,0, "PowerTOP %s", PACKAGE_VERSION);
 
 	bottom_line = newwin(1, 0, LINES-1, 0);
 	wattrset(bottom_line, A_REVERSE);
Signature · 1 line
2.25.0
#2 lore raw

[Powertop] Re: [PATCH 1/3 v1] Revert "configure.ac: version strings from git describe"

This patch has not been fully applied to the github project, the
src/display.cpp part has been left out, making the program now fail to
compile.
Please see https://github.com/fenrus75/powertop/commit/152a39949691d34e1c6d67272f3b63cbbe61bf81

Signature · 1 line
Anthony
Quoted 110 lines · Joe Konno

From: Joe Konno <joe.konno(a)intel.com>

This doesn't work as well as I thought it would. So, let's remove it. As a result of the revert, remove a reference to a now-dead preprocessor define (PACKAGE_SHORT_VERSION).

This reverts commit 2daaaf54d07340610af759cc7f4c41742abb3277.

Signed-off-by Joe Konno <joe.konno(a)intel.com>
---
 .gitignore      |  1 -
 Makefile.am     |  2 --
 autogen.sh      |  1 -
 configure.ac    |  5 +----
 scripts/version | 13 -------------
 src/display.cpp |  2 +-
 6 files changed, 2 insertions(+), 22 deletions(-)
 delete mode 100644 scripts/version
.gitignore +0 -1
index 8358ca4c6c0f..c1fc2be37afe 100644
@@ -89,5 +89,4 @@ Makefile.in
 /src/powertop
 /stamp-h1
 /stamp-po
-/version*
 tags
Makefile.am +0 -2
index ffb5e91b2834..22429e0ce562 100644
@@ -15,6 +15,4 @@ EXTRA_DIST = \
        TODO \
        Android.mk \
        COPYING \
-       version-long \
-       version-short \
        autogen.sh
autogen.sh +0 -1
index 444f9998f806..e210037d70e0 100755
@@ -1,4 +1,3 @@
 #!/bin/sh
 
-sh scripts/version
 autoreconf --install --verbose
configure.ac +1 -4
index ca7f1d5cefea..b3a6b2ca2639 100644
@@ -2,8 +2,7 @@
 # Process this file with autoconf to produce a configure script.
 
 AC_PREREQ([2.68])
-AC_INIT([powertop], m4_esyscmd_s([cat version-long]),
-       [powertop(a)lists.01.org], [], [https://01.org/powertop])
+AC_INIT([powertop], [2.12-pre], [powertop(a)lists.01.org], [], [https://01.org/powertop])
 AM_INIT_AUTOMAKE([
        -Wall
        1.12.2
@@ -152,8 +151,6 @@ AC_SEARCH_LIBS([inet_aton], [resolv], [], [
        AC_MSG_ERROR([libresolv is required but was not found])
 ], [])
 
-AC_DEFINE([PACKAGE_SHORT_VERSION], m4_esyscmd_s([cat version-short]),
-       [Short package version])
 
 AS_IF([`pkg-config --exists bash-completion`], [
        bashcompletiondir=`pkg-config --variable=completionsdir --define-variable=prefix=${prefix} bash-completion`
scripts/version deleted +0 -13
deleted file mode 100644
index 348b13d9f785..000000000000
@@ -1,13 +0,0 @@
-#!/bin/sh
-
-git branch > /dev/null 2>&1
-if [ "$?" = "0" ]; then
-       LONG=$(git describe --abbrev=7 --tags --always --dirty 2> /dev/null)
-       SHORT=\"$(git describe --tags --abbrev=0 2> /dev/null)\"
-else
-       LONG="RUN-VERSION-SCRIPT-IN-GIT-REPOSITORY-ONLY"
-       SHORT=\"$LONG\"
-fi
-
-echo $LONG  > version-long
-echo $SHORT > version-short
src/display.cpp +1 -2
index 7b3a7a2f2073..71311446728d 100644
@@ -117,7 +117,7 @@ void show_tab(unsigned int tab)
 
        wattrset(tab_bar, A_REVERSE);
        mvwprintw(tab_bar, 0,0, "%120s", "");
-       mvwprintw(tab_bar, 0,0, "PowerTOP %s", PACKAGE_SHORT_VERSION);
+       mvwprintw(tab_bar, 0,0, "PowerTOP %s", PACKAGE_VERSION);
 
        bottom_line = newwin(1, 0, LINES-1, 0);
        wattrset(bottom_line, A_REVERSE);
--

2.25.0
_______________________________________________
PowerTop mailing list -- powertop(a)lists.01.org
To unsubscribe send an email to powertop-leave(a)lists.01.org

#3 lore raw

[Powertop] Re: [PATCH 1/3 v1] Revert "configure.ac: version strings from git describe"

Also, configure.ac in github uses 2.9-pre, which should really be 2.12-pre.

Signature · 1 line
Anthony
Quoted 120 lines · Anthony Wong

This patch has not been fully applied to the github project, the
src/display.cpp part has been left out, making the program now fail to
compile.
Please see https://github.com/fenrus75/powertop/commit/152a39949691d34e1c6d67272f3b63cbbe61bf81

--
Anthony

Quoted 110 lines · Joe Konno

From: Joe Konno <joe.konno(a)intel.com>

This doesn't work as well as I thought it would. So, let's remove it. As a result of the revert, remove a reference to a now-dead preprocessor define (PACKAGE_SHORT_VERSION).

This reverts commit 2daaaf54d07340610af759cc7f4c41742abb3277.

Signed-off-by Joe Konno <joe.konno(a)intel.com>
---
 .gitignore      |  1 -
 Makefile.am     |  2 --
 autogen.sh      |  1 -
 configure.ac    |  5 +----
 scripts/version | 13 -------------
 src/display.cpp |  2 +-
 6 files changed, 2 insertions(+), 22 deletions(-)
 delete mode 100644 scripts/version
.gitignore +0 -1
index 8358ca4c6c0f..c1fc2be37afe 100644
@@ -89,5 +89,4 @@ Makefile.in
 /src/powertop
 /stamp-h1
 /stamp-po
-/version*
 tags
Makefile.am +0 -2
index ffb5e91b2834..22429e0ce562 100644
@@ -15,6 +15,4 @@ EXTRA_DIST = \
        TODO \
        Android.mk \
        COPYING \
-       version-long \
-       version-short \
        autogen.sh
autogen.sh +0 -1
index 444f9998f806..e210037d70e0 100755
@@ -1,4 +1,3 @@
 #!/bin/sh
 
-sh scripts/version
 autoreconf --install --verbose
configure.ac +1 -4
index ca7f1d5cefea..b3a6b2ca2639 100644
@@ -2,8 +2,7 @@
 # Process this file with autoconf to produce a configure script.
 
 AC_PREREQ([2.68])
-AC_INIT([powertop], m4_esyscmd_s([cat version-long]),
-       [powertop(a)lists.01.org], [], [https://01.org/powertop])
+AC_INIT([powertop], [2.12-pre], [powertop(a)lists.01.org], [], [https://01.org/powertop])
 AM_INIT_AUTOMAKE([
        -Wall
        1.12.2
@@ -152,8 +151,6 @@ AC_SEARCH_LIBS([inet_aton], [resolv], [], [
        AC_MSG_ERROR([libresolv is required but was not found])
 ], [])
 
-AC_DEFINE([PACKAGE_SHORT_VERSION], m4_esyscmd_s([cat version-short]),
-       [Short package version])
 
 AS_IF([`pkg-config --exists bash-completion`], [
        bashcompletiondir=`pkg-config --variable=completionsdir --define-variable=prefix=${prefix} bash-completion`
scripts/version deleted +0 -13
deleted file mode 100644
index 348b13d9f785..000000000000
@@ -1,13 +0,0 @@
-#!/bin/sh
-
-git branch > /dev/null 2>&1
-if [ "$?" = "0" ]; then
-       LONG=$(git describe --abbrev=7 --tags --always --dirty 2> /dev/null)
-       SHORT=\"$(git describe --tags --abbrev=0 2> /dev/null)\"
-else
-       LONG="RUN-VERSION-SCRIPT-IN-GIT-REPOSITORY-ONLY"
-       SHORT=\"$LONG\"
-fi
-
-echo $LONG  > version-long
-echo $SHORT > version-short
src/display.cpp +1 -2
index 7b3a7a2f2073..71311446728d 100644
@@ -117,7 +117,7 @@ void show_tab(unsigned int tab)
 
        wattrset(tab_bar, A_REVERSE);
        mvwprintw(tab_bar, 0,0, "%120s", "");
-       mvwprintw(tab_bar, 0,0, "PowerTOP %s", PACKAGE_SHORT_VERSION);
+       mvwprintw(tab_bar, 0,0, "PowerTOP %s", PACKAGE_VERSION);
 
        bottom_line = newwin(1, 0, LINES-1, 0);
        wattrset(bottom_line, A_REVERSE);
--

2.25.0
_______________________________________________
PowerTop mailing list -- powertop(a)lists.01.org
To unsubscribe send an email to powertop-leave(a)lists.01.org

#4 lore raw

[Powertop] Re: [PATCH 1/3 v1] Revert "configure.ac: version strings from git describe"

Quoted 8 lines

-----Original Message-----
From: Anthony Wong <yp(a)anthonywong.net>
Sent: Thursday, April 2, 2020 12:07 AM
To: powertop(a)lists.01.org; Joe Konno <joe.konno(a)linux.intel.com>
Subject: [Powertop] Re: [PATCH 1/3 v1] Revert "configure.ac: version strings from git describe"

Also, configure.ac in github uses 2.9-pre, which should really be 2.12-pre.

Yeah, I agree

Quoted 136 lines

--
Anthony

Quoted 6 lines · Anthony Wong

This patch has not been fully applied to the github project, the src/display.cpp part has been left out, making the program now fail to compile.
Please see

https://github.com/fenrus75/powertop/commit/152a39949691d34e1c6d672
72f

Quoted 6 lines

3b63cbbe61bf81

--
Anthony

On Wed, 12 Feb 2020 at 06:16, Joe Konno <joe.konno(a)linux.intel.com>

Quoted 69 lines · wrote:
Quoted 69 lines

From: Joe Konno <joe.konno(a)intel.com>

This doesn't work as well as I thought it would. So, let's remove it. As a result of the revert, remove a reference to a now-dead preprocessor define (PACKAGE_SHORT_VERSION).

This reverts commit 2daaaf54d07340610af759cc7f4c41742abb3277.

Signed-off-by Joe Konno <joe.konno(a)intel.com>
---
 .gitignore      |  1 -
 Makefile.am     |  2 --
 autogen.sh      |  1 -
 configure.ac    |  5 +----
 scripts/version | 13 -------------
 src/display.cpp |  2 +-
 6 files changed, 2 insertions(+), 22 deletions(-)  delete mode

100644 scripts/version

.gitignore index renamed from .gitignore +0 -0

8358ca4c6c0f..c1fc2be37afe 100644

.gitignore +0 -1
@@ -89,5 +89,4 @@ Makefile.in
 /src/powertop
 /stamp-h1
 /stamp-po
-/version*
 tags
Makefile.am index renamed from Makefile.am +0 -0

ffb5e91b2834..22429e0ce562 100644

Makefile.am +0 -2
@@ -15,6 +15,4 @@ EXTRA_DIST = \
        TODO \
        Android.mk \
        COPYING \
-       version-long \
-       version-short \
        autogen.sh
autogen.sh index renamed from autogen.sh +0 -0

444f9998f806..e210037d70e0 100755

autogen.sh +0 -1
@@ -1,4 +1,3 @@
 #!/bin/sh
 
-sh scripts/version
 autoreconf --install --verbose
configure.ac index renamed from configure.ac +0 -0

ca7f1d5cefea..b3a6b2ca2639 100644

configure.ac +2 -2
@@ -2,8 +2,7 @@
 # Process this file with autoconf to produce a configure script.
 
 AC_PREREQ([2.68])
-AC_INIT([powertop], m4_esyscmd_s([cat version-long]),
-       [powertop(a)lists.01.org], [], [https://01.org/powertop])
+AC_INIT([powertop], [2.12-pre], [powertop(a)lists.01.org], [],
+[https://01.org/powertop])
 AM_INIT_AUTOMAKE([
        -Wall
        1.12.2
@@ -152,8 +151,6 @@ AC_SEARCH_LIBS([inet_aton], [resolv], [], [
        AC_MSG_ERROR([libresolv is required but was not found])  ],
 [])
 
Quoted 1 line

configure.ac AC_SEARCH_LIBS([inet_aton], [resolv], [], [ · line 155

Quoted 1 line
configure.ac +0 -1
-AC_DEFINE([PACKAGE_SHORT_VERSION], m4_esyscmd_s([cat version-

short]),

Quoted 29 lines
Quoted 29 lines
configure.ac +0 -2
-       [Short package version])
 
 AS_IF([`pkg-config --exists bash-completion`], [
        bashcompletiondir=`pkg-config --variable=completionsdir
--define-variable=prefix=${prefix} bash-completion` diff --git

a/scripts/version b/scripts/version deleted file mode 100644 index 348b13d9f785..000000000000

scripts/version deleted +0 -13
@@ -1,13 +0,0 @@
-#!/bin/sh
-
-git branch > /dev/null 2>&1
-if [ "$?" = "0" ]; then
-       LONG=$(git describe --abbrev=7 --tags --always --dirty 2> /dev/null)
-       SHORT=\"$(git describe --tags --abbrev=0 2> /dev/null)\"
-else
-       LONG="RUN-VERSION-SCRIPT-IN-GIT-REPOSITORY-ONLY"
-       SHORT=\"$LONG\"
-fi
-
-echo $LONG  > version-long
-echo $SHORT > version-short
src/display.cpp index renamed from src/display.cpp +0 -0

7b3a7a2f2073..71311446728d 100644

src/display.cpp +0 -0
@@ -117,7 +117,7 @@ void show_tab(unsigned int tab)
 
Quoted 3 lines

src/display.cpp void show_tab(unsigned int tab)

Quoted 3 lines
src/display.cpp +0 -1
        wattrset(tab_bar, A_REVERSE);
        mvwprintw(tab_bar, 0,0, "%120s", "");
-       mvwprintw(tab_bar, 0,0, "PowerTOP %s",

PACKAGE_SHORT_VERSION);

Quoted 9 lines
Quoted 9 lines
src/display.cpp +1 -1
+       mvwprintw(tab_bar, 0,0, "PowerTOP %s", PACKAGE_VERSION);
 
        bottom_line = newwin(1, 0, LINES-1, 0);
        wattrset(bottom_line, A_REVERSE);
--

2.25.0
_______________________________________________
PowerTop mailing list -- powertop(a)lists.01.org To unsubscribe send an email to powertop-leave(a)lists.01.org

_______________________________________________
PowerTop mailing list -- powertop(a)lists.01.org To unsubscribe send an email to powertop-leave(a)lists.01.org

#5 lore raw

[Powertop] Re: [PATCH 1/3 v1] Revert "configure.ac: version strings from git describe"

In reply to Anthony Wong
Quoted 7 lines

-----Original Message-----
From: Anthony Wong <yp(a)anthonywong.net>
Sent: Wednesday, April 1, 2020 10:55 PM
To: powertop(a)lists.01.org; Joe Konno <joe.konno(a)linux.intel.com>
Subject: [Powertop] Re: [PATCH 1/3 v1] Revert "configure.ac: version strings from git describe"

Quoted 6 lines

This patch has not been fully applied to the github project, the src/display.cpp part has been left out, making the program now fail to compile.
Please see
https://github.com/fenrus75/powertop/commit/152a39949691d34e1c6d672
72f3b63cbbe61bf81

Thanks for reporting this Anthony! Joe can you please fix the issue?

Quoted 122 lines

--
Anthony

Quoted 66 lines · Joe Konno

From: Joe Konno <joe.konno(a)intel.com>

This doesn't work as well as I thought it would. So, let's remove it. As a result of the revert, remove a reference to a now-dead preprocessor define (PACKAGE_SHORT_VERSION).

This reverts commit 2daaaf54d07340610af759cc7f4c41742abb3277.

Signed-off-by Joe Konno <joe.konno(a)intel.com>
---
 .gitignore      |  1 -
 Makefile.am     |  2 --
 autogen.sh      |  1 -
 configure.ac    |  5 +----
 scripts/version | 13 -------------
 src/display.cpp |  2 +-
 6 files changed, 2 insertions(+), 22 deletions(-)  delete mode 100644

scripts/version

.gitignore +0 -1
index 8358ca4c6c0f..c1fc2be37afe 100644
@@ -89,5 +89,4 @@ Makefile.in
 /src/powertop
 /stamp-h1
 /stamp-po
-/version*
 tags
Makefile.am index renamed from Makefile.am +0 -0

ffb5e91b2834..22429e0ce562 100644

Makefile.am +0 -2
@@ -15,6 +15,4 @@ EXTRA_DIST = \
        TODO \
        Android.mk \
        COPYING \
-       version-long \
-       version-short \
        autogen.sh
autogen.sh +0 -1
index 444f9998f806..e210037d70e0 100755
@@ -1,4 +1,3 @@
 #!/bin/sh
 
-sh scripts/version
 autoreconf --install --verbose
configure.ac index renamed from configure.ac +0 -0

ca7f1d5cefea..b3a6b2ca2639 100644

configure.ac +2 -2
@@ -2,8 +2,7 @@
 # Process this file with autoconf to produce a configure script.
 
 AC_PREREQ([2.68])
-AC_INIT([powertop], m4_esyscmd_s([cat version-long]),
-       [powertop(a)lists.01.org], [], [https://01.org/powertop])
+AC_INIT([powertop], [2.12-pre], [powertop(a)lists.01.org], [],
+[https://01.org/powertop])
 AM_INIT_AUTOMAKE([
        -Wall
        1.12.2

configure.ac AC_SEARCH_LIBS([inet_aton], [resolv], [], [ · line 155

Quoted 4 lines
configure.ac +0 -1
@@ -152,8 +151,6 @@ AC_SEARCH_LIBS([inet_aton], [resolv], [], [
        AC_MSG_ERROR([libresolv is required but was not found])  ],
 [])
 
-AC_DEFINE([PACKAGE_SHORT_VERSION], m4_esyscmd_s([cat version-

short]),

Quoted 28 lines
configure.ac +0 -2
-       [Short package version])
 
 AS_IF([`pkg-config --exists bash-completion`], [
        bashcompletiondir=`pkg-config --variable=completionsdir
--define-variable=prefix=${prefix} bash-completion` diff --git

a/scripts/version b/scripts/version deleted file mode 100644 index 348b13d9f785..000000000000

scripts/version deleted +0 -13
@@ -1,13 +0,0 @@
-#!/bin/sh
-
-git branch > /dev/null 2>&1
-if [ "$?" = "0" ]; then
-       LONG=$(git describe --abbrev=7 --tags --always --dirty 2> /dev/null)
-       SHORT=\"$(git describe --tags --abbrev=0 2> /dev/null)\"
-else
-       LONG="RUN-VERSION-SCRIPT-IN-GIT-REPOSITORY-ONLY"
-       SHORT=\"$LONG\"
-fi
-
-echo $LONG  > version-long
-echo $SHORT > version-short
src/display.cpp index renamed from src/display.cpp +0 -0

7b3a7a2f2073..71311446728d 100644

src/display.cpp void show_tab(unsigned int tab) · line 120

Quoted 4 lines
src/display.cpp +0 -1
@@ -117,7 +117,7 @@ void show_tab(unsigned int tab)
 
        wattrset(tab_bar, A_REVERSE);
        mvwprintw(tab_bar, 0,0, "%120s", "");
-       mvwprintw(tab_bar, 0,0, "PowerTOP %s",

PACKAGE_SHORT_VERSION);

Quoted 9 lines
src/display.cpp +1 -1
+       mvwprintw(tab_bar, 0,0, "PowerTOP %s", PACKAGE_VERSION);
 
        bottom_line = newwin(1, 0, LINES-1, 0);
        wattrset(bottom_line, A_REVERSE);
--

2.25.0
_______________________________________________
PowerTop mailing list -- powertop(a)lists.01.org To unsubscribe send an email to powertop-leave(a)lists.01.org

_______________________________________________
PowerTop mailing list -- powertop(a)lists.01.org To unsubscribe send an email to powertop-leave(a)lists.01.org

#6 lore raw

[Powertop] Re: [PATCH 1/3 v1] Revert "configure.ac: version strings from git describe"

Quoted 20 lines

-----Original Message-----
From: Kammela, Gayatri <gayatri.kammela(a)intel.com>
Sent: Thursday, April 2, 2020 9:27 AM
To: Anthony Wong <yp(a)anthonywong.net>; powertop(a)lists.01.org; Joe Konno <joe.konno(a)linux.intel.com>
Subject: [Powertop] Re: [PATCH 1/3 v1] Revert "configure.ac: version strings from git describe"

Quoted 7 lines

-----Original Message-----
From: Anthony Wong <yp(a)anthonywong.net>
Sent: Wednesday, April 1, 2020 10:55 PM
To: powertop(a)lists.01.org; Joe Konno <joe.konno(a)linux.intel.com>
Subject: [Powertop] Re: [PATCH 1/3 v1] Revert "configure.ac: version strings from git describe"

Quoted 5 lines

This patch has not been fully applied to the github project, the src/display.cpp part has been left out, making the program now fail to compile.
Please see

Quoted 4 lines

https://github.com/fenrus75/powertop/commit/152a39949691d34e1c6d672

Quoted 1 line

72f3b63cbbe61bf81

Thanks for reporting this Anthony! Joe can you please fix the issue?

Sorry for the noise, the patch that Joe sent was not applied cleanly but his patch does take care of the src/display.cpp [1] part

[1]https://lists.01.org/hyperkitty/list/powertop(a)lists.01.org/thread/S5YD6QROVDHJSSWDO5A2UMZRESE777GJ/

Quoted 126 lines
Quoted 120 lines

--
Anthony

Quoted 66 lines · Joe Konno

From: Joe Konno <joe.konno(a)intel.com>

This doesn't work as well as I thought it would. So, let's remove it. As a result of the revert, remove a reference to a now-dead preprocessor define (PACKAGE_SHORT_VERSION).

This reverts commit 2daaaf54d07340610af759cc7f4c41742abb3277.

Signed-off-by Joe Konno <joe.konno(a)intel.com>
---
 .gitignore      |  1 -
 Makefile.am     |  2 --
 autogen.sh      |  1 -
 configure.ac    |  5 +----
 scripts/version | 13 -------------
 src/display.cpp |  2 +-
 6 files changed, 2 insertions(+), 22 deletions(-)  delete mode

100644 scripts/version

.gitignore index renamed from .gitignore +0 -0

8358ca4c6c0f..c1fc2be37afe 100644

.gitignore +0 -1
@@ -89,5 +89,4 @@ Makefile.in
 /src/powertop
 /stamp-h1
 /stamp-po
-/version*
 tags
Makefile.am index renamed from Makefile.am +0 -0

ffb5e91b2834..22429e0ce562 100644

Makefile.am +0 -2
@@ -15,6 +15,4 @@ EXTRA_DIST = \
        TODO \
        Android.mk \
        COPYING \
-       version-long \
-       version-short \
        autogen.sh
autogen.sh index renamed from autogen.sh +0 -0

444f9998f806..e210037d70e0 100755

autogen.sh +0 -1
@@ -1,4 +1,3 @@
 #!/bin/sh
 
-sh scripts/version
 autoreconf --install --verbose
configure.ac index renamed from configure.ac +0 -0

ca7f1d5cefea..b3a6b2ca2639 100644

configure.ac +2 -2
@@ -2,8 +2,7 @@
 # Process this file with autoconf to produce a configure script.
 
 AC_PREREQ([2.68])
-AC_INIT([powertop], m4_esyscmd_s([cat version-long]),
-       [powertop(a)lists.01.org], [], [https://01.org/powertop])
+AC_INIT([powertop], [2.12-pre], [powertop(a)lists.01.org], [],
+[https://01.org/powertop])
 AM_INIT_AUTOMAKE([
        -Wall
        1.12.2

configure.ac AC_SEARCH_LIBS([inet_aton], [resolv], [], [ · line 155

Quoted 4 lines
configure.ac +0 -1
@@ -152,8 +151,6 @@ AC_SEARCH_LIBS([inet_aton], [resolv], [], [
        AC_MSG_ERROR([libresolv is required but was not found])  ],
 [])
 
-AC_DEFINE([PACKAGE_SHORT_VERSION], m4_esyscmd_s([cat version-

short]),

Quoted 28 lines
configure.ac +0 -2
-       [Short package version])
 
 AS_IF([`pkg-config --exists bash-completion`], [
        bashcompletiondir=`pkg-config --variable=completionsdir
--define-variable=prefix=${prefix} bash-completion` diff --git

a/scripts/version b/scripts/version deleted file mode 100644 index 348b13d9f785..000000000000

scripts/version deleted +0 -13
@@ -1,13 +0,0 @@
-#!/bin/sh
-
-git branch > /dev/null 2>&1
-if [ "$?" = "0" ]; then
-       LONG=$(git describe --abbrev=7 --tags --always --dirty 2> /dev/null)
-       SHORT=\"$(git describe --tags --abbrev=0 2> /dev/null)\"
-else
-       LONG="RUN-VERSION-SCRIPT-IN-GIT-REPOSITORY-ONLY"
-       SHORT=\"$LONG\"
-fi
-
-echo $LONG  > version-long
-echo $SHORT > version-short
src/display.cpp index renamed from src/display.cpp +0 -0

7b3a7a2f2073..71311446728d 100644

src/display.cpp void show_tab(unsigned int tab) · line 120

Quoted 4 lines
src/display.cpp +0 -1
@@ -117,7 +117,7 @@ void show_tab(unsigned int tab)
 
        wattrset(tab_bar, A_REVERSE);
        mvwprintw(tab_bar, 0,0, "%120s", "");
-       mvwprintw(tab_bar, 0,0, "PowerTOP %s",

PACKAGE_SHORT_VERSION);

Quoted 9 lines
src/display.cpp +1 -1
+       mvwprintw(tab_bar, 0,0, "PowerTOP %s", PACKAGE_VERSION);
 
        bottom_line = newwin(1, 0, LINES-1, 0);
        wattrset(bottom_line, A_REVERSE);
--

2.25.0
_______________________________________________
PowerTop mailing list -- powertop(a)lists.01.org To unsubscribe send an email to powertop-leave(a)lists.01.org

Quoted 3 lines

_______________________________________________
PowerTop mailing list -- powertop(a)lists.01.org To unsubscribe send an email to powertop-leave(a)lists.01.org

_______________________________________________
PowerTop mailing list -- powertop(a)lists.01.org To unsubscribe send an email to powertop-leave(a)lists.01.org

#7 lore raw

[Powertop] Re: [PATCH 1/3 v1] Revert "configure.ac: version strings from git describe"

In reply to Anthony Wong

Thanks for reporting that. Not sure what happened, but we'll fix it.

author
#8 lore raw

PATCH 2/3 configure.ac: required version to 2.69

In reply to Joe Konno

From: Joe Konno <joe.konno(a)intel.com>

Autoconf released 2.69 almost 8 years ago, so let's move the required version up. And since we're moving up to 2.69, we can now assume a sufficiently fresh autoconf-archive package on the host, containing ax_cxx_compile_stdcxx and ax_pthread.

Signed-off-by Joe Konno <joe.konno(a)intel.com>
---
 configure.ac                   |   2 +-
 m4/ax_cxx_compile_stdcxx_11.m4 | 142 --------------
 m4/ax_pthread.m4               | 332 ---------------------------------
 3 files changed, 1 insertion(+), 475 deletions(-)
 delete mode 100644 m4/ax_cxx_compile_stdcxx_11.m4
 delete mode 100644 m4/ax_pthread.m4
configure.ac +1 -1
index b3a6b2ca2639..0f9cbd2e8625 100644
@@ -1,7 +1,7 @@
 #                                               -*- Autoconf -*-
 # Process this file with autoconf to produce a configure script.
 
-AC_PREREQ([2.68])
+AC_PREREQ([2.69])
 AC_INIT([powertop], [2.12-pre], [powertop(a)lists.01.org], [], [https://01.org/powertop])
 AM_INIT_AUTOMAKE([
 	-Wall
m4/ax_cxx_compile_stdcxx_11.m4 deleted +0 -142

142 lines not on this page · raw message

m4/ax_pthread.m4 deleted +0 -332

332 lines not on this page · raw message

Signature · 1 line
2.25.0
author
#9 lore raw

PATCH 3/3 configure.ac: ax_add_fortify_source

In reply to Joe Konno

From: Joe Konno <joe.konno(a)intel.com>

Use a maintained autoconf-archive macro to determine whether we need to add -D_FORTIFY_SOURCE=2, or if the underlying OS (or toolchain) has it baked in.

Signed-off-by Joe Konno <joe.konno(a)intel.com>
---
 configure.ac                |  2 +-
 m4/gcc_fortify_source_cc.m4 | 29 -----------------------------
 2 files changed, 1 insertion(+), 30 deletions(-)
 delete mode 100644 m4/gcc_fortify_source_cc.m4
configure.ac +1 -1
index 0f9cbd2e8625..d5d33762a136 100644
@@ -36,7 +36,7 @@ AC_PROG_LIBTOOL
 AC_PROG_CC
 AC_PROG_INSTALL
 AM_PROG_CC_C_O
-GCC_FORTIFY_SOURCE_CC
+AX_ADD_FORTIFY_SOURCE
 AX_CXX_COMPILE_STDCXX_11([noext], [mandatory])
 
 # Checks for libraries.
m4/gcc_fortify_source_cc.m4 deleted +0 -29
deleted file mode 100644
index 1206672c955d..000000000000
@@ -1,29 +0,0 @@
-dnl GCC_FORTIFY_SOURCE_CC
-dnl checks -D_FORTIFY_SOURCE with the C++ compiler, if it exists then
-dnl updates CXXCPP
-AC_DEFUN([GCC_FORTIFY_SOURCE_CC],[
-  AC_LANG_ASSERT([C++])
-  AS_IF([test "X$CXX" != "X"], [
-    AC_MSG_CHECKING([for FORTIFY_SOURCE support])
-    fs_old_cxxcpp="$CXXCPP"
-    fs_old_cxxflags="$CXXFLAGS"
-    CXXCPP="$CXXCPP -D_FORTIFY_SOURCE=2"
-    CXXFLAGS="$CXXFLAGS -Werror"
-    AC_COMPILE_IFELSE([
-      AC_LANG_PROGRAM([[]], [[
-        int main(void) {
-        #if !(__GNUC_PREREQ (4, 1) )
-        #error No FORTIFY_SOURCE support
-        #endif
-          return 0;
-        }
-      ]], [
-        AC_MSG_RESULT([yes])
-      ], [
-        AC_MSG_RESULT([no])
-        CXXCPP="$fs_old_cxxcpp"
-      ])
-    ])
-    CXXFLAGS="$fs_old_cxxflags"
-  ])
-])
Signature · 1 line
2.25.0