Skip to contentSkip to conversation

build: wrap Makefile.am to a more reasonable line length

RFC In review Vinicius Costa Gomes 3 participants 5 messages May 16, 2012 – May 21, 2012

lore
Share & tools
lore

Vinicius Costa Gomes

author
#0 lore raw

RFC 1/2 build: wrap Makefile.am to a more reasonable line length

This was causing git send-email to fail because a line had a length superior to 998 characters.
---

Just for information, I had to use an undocumented feature of git send-email (--no-validate) to send this patch.

 src/Makefile.am |   28 ++++++++++++++++++++++++++--
 1 file changed, 26 insertions(+), 2 deletions(-)
src/Makefile.am +26 -2
index 0f9e172..935bdab 100644
@@ -7,8 +7,32 @@ csstoh_SOURCES = csstoh.c
 sbin_PROGRAMS = powertop
 nodist_powertop_SOURCES = css.h
 
-powertop_SOURCES = parameters/persistent.cpp parameters/learn.cpp parameters/parameters.cpp parameters/parameters.h display.cpp cpu/cpu_core.cpp cpu/cpudevice.cpp cpu/cpu.cpp cpu/cpu.h cpu/cpu_linux.cpp cpu/abstract_cpu.cpp cpu/intel_cpus.h cpu/cpu_package.cpp cpu/cpudevice.h cpu/intel_cpus.cpp devlist.h devlist.cpp lib.cpp report.cpp process/process.cpp process/interrupt.h process/timer.h process/processdevice.cpp process/powerconsumer.cpp process/work.h  process/timer.cpp process/process.h process/work.cpp process/do_process.cpp process/processdevice.h process/interrupt.cpp process/powerconsumer.h report.h perf/perf.cpp perf/perf_event.h perf/perf.h perf/perf_bundle.h perf/perf_bundle.cpp display.h devices/rfkill.h devices/i915-gpu.cpp devices/device.cpp devices/alsa.cpp devices/runtime_pm.cpp devices/thinkpad-fan.cpp devices/usb.cpp devices/ahci.cpp devices/thinkpad-light.cpp devices/ahci.h devices/i915-gpu.h devices/network.h devices/rfkill.cpp devices/alsa.h devices/thinkpad-fan.h devices/device.h devices/usb.h devices/backlight.h devices/backlight.cpp devices/runtime_pm.h devices/thinkpad-light.h devices/network.cpp lib.h tuning tuning/cpufreq.h tuning/bluetooth.cpp tuning/cpufreq.cpp tuning/tuning.cpp tuning/tuningusb.cpp tuning/ethernet.cpp tuning/bluetooth.h tuning/tuning.h tuning/ethernet.h tuning/tunable.cpp tuning/nl80211.h tuning/iw.c tuning/wifi.cpp tuning/tuningsysfs.h tuning/tuningsysfs.cpp tuning/wifi.h tuning/runtime.cpp tuning/tunable.h tuning/runtime.h tuning/tuningusb.h tuning/iw.h calibrate/calibrate.cpp calibrate/calibrate.h measurement/measurement.cpp measurement/power_supply.cpp measurement/measurement.h measurement/acpi.cpp measurement/sysfs.h measurement/sysfs.cpp measurement/acpi.h measurement/extech.cpp measurement/power_supply.h measurement/extech.h main.cpp css.h powertop.css
-
+powertop_SOURCES = parameters/persistent.cpp parameters/learn.cpp parameters/parameters.cpp \
+		parameters/parameters.h display.cpp cpu/cpu_core.cpp cpu/cpudevice.cpp \
+		cpu/cpu.cpp cpu/cpu.h cpu/cpu_linux.cpp cpu/abstract_cpu.cpp cpu/intel_cpus.h \
+		cpu/cpu_package.cpp cpu/cpudevice.h cpu/intel_cpus.cpp devlist.h devlist.cpp \
+		lib.cpp report.cpp process/process.cpp process/interrupt.h process/timer.h \
+		process/processdevice.cpp process/powerconsumer.cpp process/work.h  \
+		process/timer.cpp process/process.h process/work.cpp process/do_process.cpp \
+		process/processdevice.h process/interrupt.cpp process/powerconsumer.h report.h \
+		perf/perf.cpp perf/perf_event.h perf/perf.h perf/perf_bundle.h \
+		perf/perf_bundle.cpp display.h devices/rfkill.h devices/i915-gpu.cpp \
+		devices/device.cpp devices/alsa.cpp devices/runtime_pm.cpp \
+		devices/thinkpad-fan.cpp devices/usb.cpp devices/ahci.cpp \
+		devices/thinkpad-light.cpp devices/ahci.h devices/i915-gpu.h \
+		devices/network.h devices/rfkill.cpp devices/alsa.h devices/thinkpad-fan.h \
+		devices/device.h devices/usb.h devices/backlight.h devices/backlight.cpp \
+		devices/runtime_pm.h devices/thinkpad-light.h devices/network.cpp lib.h \
+		tuning tuning/cpufreq.h tuning/bluetooth.cpp tuning/cpufreq.cpp \
+		tuning/tuning.cpp tuning/tuningusb.cpp tuning/ethernet.cpp tuning/bluetooth.h \
+		tuning/tuning.h tuning/ethernet.h tuning/tunable.cpp tuning/nl80211.h \
+		tuning/iw.c tuning/wifi.cpp tuning/tuningsysfs.h tuning/tuningsysfs.cpp \
+		tuning/wifi.h tuning/runtime.cpp tuning/tunable.h tuning/runtime.h \
+		tuning/tuningusb.h tuning/iw.h calibrate/calibrate.cpp \
+		calibrate/calibrate.h measurement/measurement.cpp measurement/power_supply.cpp \
+		measurement/measurement.h measurement/acpi.cpp measurement/sysfs.h \
+		measurement/sysfs.cpp measurement/acpi.h measurement/extech.cpp \
+		measurement/power_supply.h measurement/extech.h main.cpp css.h powertop.css
 
 powertop_CXXFLAGS = -O2 -g -fno-omit-frame-pointer -fstack-protector -Wall -Wshadow -Wformat -I/usr/include/ $(NCURSES_CFLAGS) $(PCIUTILS_CFLAGS) $(LIBNL_CFLAGS) $(GLIB2_CFLAGS)
 

--
1.7.10.2

author
#1 lore raw

RFC 2/2 build: use pkg-config for looking for netlink libraries

Also, adds support for using libnl-3.0.
---

I guess that it looks nicer, but it is more intrusive.

BTW, I wasn't able to test in the case with just libnl-2.0.

 configure.ac    |   29 +++++++++++++++++------------
 src/Makefile.am |    6 +++---
 src/tuning/iw.c |    2 +-
 src/tuning/iw.h |    2 +-
 4 files changed, 22 insertions(+), 17 deletions(-)
configure.ac +17 -12
index 2d56684..7b10c65 100644
@@ -54,19 +54,24 @@ PKG_CHECK_MODULES([LIBZ], [zlib],[],[
 	AC_SEARCH_LIBS([deflate], [z], [], AC_MSG_ERROR([zlib is required but was not found]), [])
 ])
 
-has_libnl_ver=0
-PKG_CHECK_MODULES([LIBNL], [libnl-1], [has_libnl_ver=1], [
-	AC_SEARCH_LIBS([nl_socket_alloc], [nl], [has_libnl_ver=2], [
-		     PKG_CHECK_MODULES([LIBNL], [libnl-3.0 libnl-genl-3.0], [has_libnl_ver=3],
-				       [AC_SEARCH_LIBS([nl_socket_alloc], [nl-3 nl-genl-3], [has_libnl_ver=3], [], [])])
-	], [])
+PKG_CHECK_MODULES(LIBNL3, libnl-3.0 libnl-genl-3.0, [
+	NETLINK_CFLAGS=${LIBNL3_CFLAGS}
+	NETLINK_LIBS=${LIBNL3_LIBS}
+], [
+	PKG_CHECK_MODULES(LIBNL2, libnl-2.0, [
+		NETLINK_CFLAGS=${LIBNL2_CFLAGS}
+		NETLINK_LIBS=${LIBNL2_LIBS}
+	], [
+		PKG_CHECK_MODULES(LIBNL1, libnl-1, dummy=yes,
+			AC_MSG_ERROR(Netlink library is required))
+		AC_DEFINE(NEED_LIBNL_COMPAT, 1,
+			[Define to 1 if you need libnl-1 compat functions.])
+		NETLINK_CFLAGS=${LIBNL1_CFLAGS}
+		NETLINK_LIBS=${LIBNL1_LIBS}
+	])
 ])
-if (test "$has_libnl_ver" -eq 0); then
-	AC_MSG_ERROR(libnl is required but not found)
-fi
-if (test "$has_libnl_ver" -gt 1); then
-	AC_DEFINE([HAVE_LIBNL20], [1], [Define if you have libnl-2.0 or higher])
-fi
+AC_SUBST(NETLINK_CFLAGS)
+AC_SUBST(NETLINK_LIBS)
 
 AC_SEARCH_LIBS([pthread_create], [pthread], [], AC_MSG_ERROR([libpthread is required but was not found]), [])
 AC_SEARCH_LIBS([inet_aton], [resolv], [], AC_MSG_ERROR([libresolv is required but was not found]), [])
src/Makefile.am +3 -3
index 935bdab..f2adc41 100644
@@ -34,14 +34,14 @@ powertop_SOURCES = parameters/persistent.cpp parameters/learn.cpp parameters/par
 		measurement/sysfs.cpp measurement/acpi.h measurement/extech.cpp \
 		measurement/power_supply.h measurement/extech.h main.cpp css.h powertop.css
 
-powertop_CXXFLAGS = -O2 -g -fno-omit-frame-pointer -fstack-protector -Wall -Wshadow -Wformat -I/usr/include/ $(NCURSES_CFLAGS) $(PCIUTILS_CFLAGS) $(LIBNL_CFLAGS) $(GLIB2_CFLAGS)
+powertop_CXXFLAGS = -O2 -g -fno-omit-frame-pointer -fstack-protector -Wall -Wshadow -Wformat -I/usr/include/ $(NCURSES_CFLAGS) $(PCIUTILS_CFLAGS) $(NETLINK_CFLAGS) $(GLIB2_CFLAGS)
 
 
-powertop_CPPFLAGS = -D_FORTIFY_SOURCE=2 $(NCURSES_CFLAGS) $(PCIUTILS_CFLAGS) $(LIBNL_CFLAGS) $(GLIB2_CFLAGS) $(LIBZ_CFLAGS)
+powertop_CPPFLAGS = -D_FORTIFY_SOURCE=2 $(NCURSES_CFLAGS) $(PCIUTILS_CFLAGS) $(NETLINK_CFLAGS) $(GLIB2_CFLAGS) $(LIBZ_CFLAGS)
 
 powertop_LDADD = ../pevent/libparseevent.la
 
-AM_LDFLAGS = $(LIBS) $(NCURSES_LIBS) $(PCIUTILS_LIBS) $(LIBNL_LIBS) $(LIBZ_LIBS) $(NCURES_LIBS) $(PTHREAD_LIBS)  $(RESOLV_LIBS)
+AM_LDFLAGS = $(LIBS) $(NCURSES_LIBS) $(PCIUTILS_LIBS) $(NETLINK_LIBS) $(LIBZ_LIBS) $(NCURES_LIBS) $(PTHREAD_LIBS)  $(RESOLV_LIBS)
 
 BUILT_SOURCES = css.h
 CLEANFILES = css.h
src/tuning/iw.c +1 -1
index aeba3fd..ba40d22 100644
@@ -50,7 +50,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 #include "iw.h"
 
 
-#ifndef HAVE_LIBNL20
+#ifdef NEED_LIBNL_COMPAT
 /* libnl 2.0 compatibility code */
 
 static inline struct nl_handle *nl_socket_alloc(void)
src/tuning/iw.h +1 -1
index acf132d..3b82aec 100644
@@ -46,7 +46,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 #include "config.h"
 #endif
 
-#ifndef HAVE_LIBNL20
+#ifdef NEED_LIBNL_COMPAT
 #define nl_sock nl_handle
 #endif
 

--
1.7.10.2

#2 lore raw

Re: [Powertop] [RFC 2/2] build: use pkg-config for looking for netlink libraries

Quoted 31 lines · Vinicius Costa Gomes

Also, adds support for using libnl-3.0.
---

I guess that it looks nicer, but it is more intrusive.

BTW, I wasn't able to test in the case with just libnl-2.0.

  configure.ac    |   29 +++++++++++++++++------------
  src/Makefile.am |    6 +++---
  src/tuning/iw.c |    2 +-
  src/tuning/iw.h |    2 +-
  4 files changed, 22 insertions(+), 17 deletions(-)
configure.ac +4 -6
index 2d56684..7b10c65 100644
@@ -54,19 +54,24 @@ PKG_CHECK_MODULES([LIBZ], [zlib],[],[
  	AC_SEARCH_LIBS([deflate], [z], [], AC_MSG_ERROR([zlib is required but was not found]), [])
  ])
 
-has_libnl_ver=0
-PKG_CHECK_MODULES([LIBNL], [libnl-1], [has_libnl_ver=1], [
-	AC_SEARCH_LIBS([nl_socket_alloc], [nl], [has_libnl_ver=2], [
-		     PKG_CHECK_MODULES([LIBNL], [libnl-3.0 libnl-genl-3.0], [has_libnl_ver=3],
-				       [AC_SEARCH_LIBS([nl_socket_alloc], [nl-3 nl-genl-3], [has_libnl_ver=3], [], [])])
-	], [])
+PKG_CHECK_MODULES(LIBNL3, libnl-3.0 libnl-genl-3.0, [
+	NETLINK_CFLAGS=${LIBNL3_CFLAGS}
+	NETLINK_LIBS=${LIBNL3_LIBS}
+], [

configure.ac PKG_CHECK_MODULES([LIBZ], [zlib],[],[ · line 70

Quoted 10 lines
configure.ac +10 -0
+	PKG_CHECK_MODULES(LIBNL2, libnl-2.0, [
+		NETLINK_CFLAGS=${LIBNL2_CFLAGS}
+		NETLINK_LIBS=${LIBNL2_LIBS}
+	], [
+		PKG_CHECK_MODULES(LIBNL1, libnl-1, dummy=yes,
+			AC_MSG_ERROR(Netlink library is required))
+		AC_DEFINE(NEED_LIBNL_COMPAT, 1,
+			[Define to 1 if you need libnl-1 compat functions.])
+		NETLINK_CFLAGS=${LIBNL1_CFLAGS}
+		NETLINK_LIBS=${LIBNL1_LIBS}

Problem exists where PKG_CHECK_MODULES will only work if the distribution using it uses pkg configs. This is why we must also use search libs is pkg_check_modules fails.

Quoted 40 lines
configure.ac +3 -6
+	])
  ])
-if (test "$has_libnl_ver" -eq 0); then
-	AC_MSG_ERROR(libnl is required but not found)
-fi
-if (test "$has_libnl_ver" -gt 1); then
-	AC_DEFINE([HAVE_LIBNL20], [1], [Define if you have libnl-2.0 or higher])
-fi
+AC_SUBST(NETLINK_CFLAGS)
+AC_SUBST(NETLINK_LIBS)
 
  AC_SEARCH_LIBS([pthread_create], [pthread], [], AC_MSG_ERROR([libpthread is required but was not found]), [])
  AC_SEARCH_LIBS([inet_aton], [resolv], [], AC_MSG_ERROR([libresolv is required but was not found]), [])
src/Makefile.am +3 -3
index 935bdab..f2adc41 100644
@@ -34,14 +34,14 @@ powertop_SOURCES = parameters/persistent.cpp parameters/learn.cpp parameters/par
  		measurement/sysfs.cpp measurement/acpi.h measurement/extech.cpp \
  		measurement/power_supply.h measurement/extech.h main.cpp css.h powertop.css
 
-powertop_CXXFLAGS = -O2 -g -fno-omit-frame-pointer -fstack-protector -Wall -Wshadow -Wformat -I/usr/include/ $(NCURSES_CFLAGS) $(PCIUTILS_CFLAGS) $(LIBNL_CFLAGS) $(GLIB2_CFLAGS)
+powertop_CXXFLAGS = -O2 -g -fno-omit-frame-pointer -fstack-protector -Wall -Wshadow -Wformat -I/usr/include/ $(NCURSES_CFLAGS) $(PCIUTILS_CFLAGS) $(NETLINK_CFLAGS) $(GLIB2_CFLAGS)
 
 
-powertop_CPPFLAGS = -D_FORTIFY_SOURCE=2 $(NCURSES_CFLAGS) $(PCIUTILS_CFLAGS) $(LIBNL_CFLAGS) $(GLIB2_CFLAGS) $(LIBZ_CFLAGS)
+powertop_CPPFLAGS = -D_FORTIFY_SOURCE=2 $(NCURSES_CFLAGS) $(PCIUTILS_CFLAGS) $(NETLINK_CFLAGS) $(GLIB2_CFLAGS) $(LIBZ_CFLAGS)
 
  powertop_LDADD = ../pevent/libparseevent.la
 
-AM_LDFLAGS = $(LIBS) $(NCURSES_LIBS) $(PCIUTILS_LIBS) $(LIBNL_LIBS) $(LIBZ_LIBS) $(NCURES_LIBS) $(PTHREAD_LIBS)  $(RESOLV_LIBS)
+AM_LDFLAGS = $(LIBS) $(NCURSES_LIBS) $(PCIUTILS_LIBS) $(NETLINK_LIBS) $(LIBZ_LIBS) $(NCURES_LIBS) $(PTHREAD_LIBS)  $(RESOLV_LIBS)
 
  BUILT_SOURCES = css.h
  CLEANFILES = css.h
src/tuning/iw.c +0 -0
index aeba3fd..ba40d22 100644

src/tuning/iw.c OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. · line 53

Quoted 5 lines
src/tuning/iw.c +1 -1
@@ -50,7 +50,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  #include "iw.h"
 
 
-#ifndef HAVE_LIBNL20
+#ifdef NEED_LIBNL_COMPAT

its not just LIBNL compat but LIBNL compat > version 1

Quoted 8 lines
src/tuning/iw.c +0 -0
  /* libnl 2.0 compatibility code */
 
  static inline struct nl_handle *nl_socket_alloc(void)
src/tuning/iw.h +0 -0
index acf132d..3b82aec 100644

src/tuning/iw.h OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. · line 51

Quoted 7 lines
src/tuning/iw.h +1 -1
@@ -46,7 +46,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  #include "config.h"
  #endif
 
-#ifndef HAVE_LIBNL20
+#ifdef NEED_LIBNL_COMPAT
  #define nl_sock nl_handle
  #endif

so obviously libnl3 is not working? What distro and version are you running?
-Chris

Quoted 7 lines
src/tuning/iw.h +0 -1
--

1.7.10.2

_______________________________________________
PowerTop mailing list
PowerTop(a)lists.01.org
https://lists.01.org/mailman/listinfo/powertop

#3 lore raw

Re: [Powertop] [RFC 2/2] build: use pkg-config for looking for netlink libraries

Hello,

Quoted 45 lines · Chris Ferron
Quoted 31 lines · Vinicius Costa Gomes

Also, adds support for using libnl-3.0.
---

I guess that it looks nicer, but it is more intrusive.

BTW, I wasn't able to test in the case with just libnl-2.0.

 configure.ac    |   29 +++++++++++++++++------------
 src/Makefile.am |    6 +++---
 src/tuning/iw.c |    2 +-
 src/tuning/iw.h |    2 +-
 4 files changed, 22 insertions(+), 17 deletions(-)
configure.ac +4 -6
index 2d56684..7b10c65 100644
@@ -54,19 +54,24 @@ PKG_CHECK_MODULES([LIBZ], [zlib],[],[
 	AC_SEARCH_LIBS([deflate], [z], [], AC_MSG_ERROR([zlib is required but was not found]), [])
 ])
 
-has_libnl_ver=0
-PKG_CHECK_MODULES([LIBNL], [libnl-1], [has_libnl_ver=1], [
-	AC_SEARCH_LIBS([nl_socket_alloc], [nl], [has_libnl_ver=2], [
-		     PKG_CHECK_MODULES([LIBNL], [libnl-3.0 libnl-genl-3.0], [has_libnl_ver=3],
-				       [AC_SEARCH_LIBS([nl_socket_alloc], [nl-3 nl-genl-3], [has_libnl_ver=3], [], [])])
-	], [])
+PKG_CHECK_MODULES(LIBNL3, libnl-3.0 libnl-genl-3.0, [
+	NETLINK_CFLAGS=${LIBNL3_CFLAGS}
+	NETLINK_LIBS=${LIBNL3_LIBS}
+], [

configure.ac PKG_CHECK_MODULES([LIBZ], [zlib],[],[ · line 70

Quoted 10 lines
configure.ac +10 -0
+	PKG_CHECK_MODULES(LIBNL2, libnl-2.0, [
+		NETLINK_CFLAGS=${LIBNL2_CFLAGS}
+		NETLINK_LIBS=${LIBNL2_LIBS}
+	], [
+		PKG_CHECK_MODULES(LIBNL1, libnl-1, dummy=yes,
+			AC_MSG_ERROR(Netlink library is required))
+		AC_DEFINE(NEED_LIBNL_COMPAT, 1,
+			[Define to 1 if you need libnl-1 compat functions.])
+		NETLINK_CFLAGS=${LIBNL1_CFLAGS}
+		NETLINK_LIBS=${LIBNL1_LIBS}

Problem exists where PKG_CHECK_MODULES will only work if the distribution using it uses pkg configs. This is why we must also use search libs is pkg_check_modules fails.

Quoted 11 lines

configure.ac PKG_CHECK_MODULES([LIBZ], [zlib],[],[ · line 75

Quoted 11 lines
configure.ac +3 -6
+	])
 ])
-if (test "$has_libnl_ver" -eq 0); then
-	AC_MSG_ERROR(libnl is required but not found)
-fi
-if (test "$has_libnl_ver" -gt 1); then
-	AC_DEFINE([HAVE_LIBNL20], [1], [Define if you have libnl-2.0 or higher])
-fi
+AC_SUBST(NETLINK_CFLAGS)
+AC_SUBST(NETLINK_LIBS)
 

Hello,

Sorry, I don't see -- why this is better than current code?

	-ss
Quoted 67 lines
Quoted 29 lines
configure.ac +0 -0
 AC_SEARCH_LIBS([pthread_create], [pthread], [], AC_MSG_ERROR([libpthread is required but was not found]), [])
 AC_SEARCH_LIBS([inet_aton], [resolv], [], AC_MSG_ERROR([libresolv is required but was not found]), [])
src/Makefile.am +3 -3
index 935bdab..f2adc41 100644
@@ -34,14 +34,14 @@ powertop_SOURCES = parameters/persistent.cpp parameters/learn.cpp parameters/par
 		measurement/sysfs.cpp measurement/acpi.h measurement/extech.cpp \
 		measurement/power_supply.h measurement/extech.h main.cpp css.h powertop.css
 
-powertop_CXXFLAGS = -O2 -g -fno-omit-frame-pointer -fstack-protector -Wall -Wshadow -Wformat -I/usr/include/ $(NCURSES_CFLAGS) $(PCIUTILS_CFLAGS) $(LIBNL_CFLAGS) $(GLIB2_CFLAGS)
+powertop_CXXFLAGS = -O2 -g -fno-omit-frame-pointer -fstack-protector -Wall -Wshadow -Wformat -I/usr/include/ $(NCURSES_CFLAGS) $(PCIUTILS_CFLAGS) $(NETLINK_CFLAGS) $(GLIB2_CFLAGS)
 
 
-powertop_CPPFLAGS = -D_FORTIFY_SOURCE=2 $(NCURSES_CFLAGS) $(PCIUTILS_CFLAGS) $(LIBNL_CFLAGS) $(GLIB2_CFLAGS) $(LIBZ_CFLAGS)
+powertop_CPPFLAGS = -D_FORTIFY_SOURCE=2 $(NCURSES_CFLAGS) $(PCIUTILS_CFLAGS) $(NETLINK_CFLAGS) $(GLIB2_CFLAGS) $(LIBZ_CFLAGS)
 
 powertop_LDADD = ../pevent/libparseevent.la
 
-AM_LDFLAGS = $(LIBS) $(NCURSES_LIBS) $(PCIUTILS_LIBS) $(LIBNL_LIBS) $(LIBZ_LIBS) $(NCURES_LIBS) $(PTHREAD_LIBS)  $(RESOLV_LIBS)
+AM_LDFLAGS = $(LIBS) $(NCURSES_LIBS) $(PCIUTILS_LIBS) $(NETLINK_LIBS) $(LIBZ_LIBS) $(NCURES_LIBS) $(PTHREAD_LIBS)  $(RESOLV_LIBS)
 
 BUILT_SOURCES = css.h
 CLEANFILES = css.h
src/tuning/iw.c +0 -0
index aeba3fd..ba40d22 100644

src/tuning/iw.c OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. · line 53

Quoted 5 lines
src/tuning/iw.c +1 -1
@@ -50,7 +50,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 #include "iw.h"
 
 
-#ifndef HAVE_LIBNL20
+#ifdef NEED_LIBNL_COMPAT

its not just LIBNL compat but LIBNL compat > version 1

Quoted 8 lines
src/tuning/iw.c +0 -0
 /* libnl 2.0 compatibility code */
 
 static inline struct nl_handle *nl_socket_alloc(void)
src/tuning/iw.h +0 -0
index acf132d..3b82aec 100644

src/tuning/iw.h OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. · line 51

Quoted 7 lines
src/tuning/iw.h +1 -1
@@ -46,7 +46,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 #include "config.h"
 #endif
 
-#ifndef HAVE_LIBNL20
+#ifdef NEED_LIBNL_COMPAT
 #define nl_sock nl_handle
 #endif

so obviously libnl3 is not working? What distro and version are you running?
-Chris

Quoted 7 lines
src/tuning/iw.h +0 -1
--

1.7.10.2

_______________________________________________
PowerTop mailing list
PowerTop(a)lists.01.org
https://lists.01.org/mailman/listinfo/powertop

_______________________________________________
PowerTop mailing list
PowerTop(a)lists.01.org
https://lists.01.org/mailman/listinfo/powertop

#4 lore raw
In reply to Vinicius Costa Gomes

Thanks for this clean up. Sorry for the git failure. Patch 1/2 is accepted. -Chris

Quoted 59 lines · Vinicius Costa Gomes

This was causing git send-email to fail because a line had a length superior to 998 characters.
---

Just for information, I had to use an undocumented feature of git send-email (--no-validate) to send this patch.

  src/Makefile.am |   28 ++++++++++++++++++++++++++--
  1 file changed, 26 insertions(+), 2 deletions(-)
src/Makefile.am +26 -3
index 0f9e172..935bdab 100644
@@ -7,8 +7,32 @@ csstoh_SOURCES = csstoh.c
  sbin_PROGRAMS = powertop
  nodist_powertop_SOURCES = css.h
 
-powertop_SOURCES = parameters/persistent.cpp parameters/learn.cpp parameters/parameters.cpp parameters/parameters.h display.cpp cpu/cpu_core.cpp cpu/cpudevice.cpp cpu/cpu.cpp cpu/cpu.h cpu/cpu_linux.cpp cpu/abstract_cpu.cpp cpu/intel_cpus.h cpu/cpu_package.cpp cpu/cpudevice.h cpu/intel_cpus.cpp devlist.h devlist.cpp lib.cpp report.cpp process/process.cpp process/interrupt.h process/timer.h process/processdevice.cpp process/powerconsumer.cpp process/work.h  process/timer.cpp process/process.h process/work.cpp process/do_process.cpp process/processdevice.h process/interrupt.cpp process/powerconsumer.h report.h perf/perf.cpp perf/perf_event.h perf/perf.h perf/perf_bundle.h perf/perf_bundle.cpp display.h devices/rfkill.h devices/i915-gpu.cpp devices/device.cpp devices/alsa.cpp devices/runtime_pm.cpp devices/thinkpad-fan.cpp devices/usb.cpp devices/ahci.cpp devices/thinkpad-light.cpp devices/ahci.h devices/i915-gpu.h devices/network.h devices/rfkill.cpp devices/alsa.h devices/thi
  nkpad-fan.h devices/device.h devices/usb.h devices/backlight.h devices/backlight.cpp devices/runtime_pm.h devices/thinkpad-light.h devices/network.cpp lib.h tuning tuning/cpufreq.h tuning/bluetooth.cpp tuning/cpufreq.cpp tuning/tuning.cpp tuning/tuningusb.cpp tuning/ethernet.cpp tuning/bluetooth.h tuning/tuning.h tuning/ethernet.h tuning/tunable.cpp tuning/nl80211.h tuning/iw.c tuning/wifi.cpp tuning/tuningsysfs.h tuning/tuningsysfs.cpp tuning/wifi.h tuning/runtime.cpp tuning/tunable.h tuning/runtime.h tuning/tuningusb.h tuning/iw.h calibrate/calibrate.cpp calibrate/calibrate.h measurement/measurement.cpp measurement/power_supply.cpp measurement/measurement.h measurement/acpi.cpp measurement/sysfs.h measurement/sysfs.cpp measurement/acpi.h measurement/extech.cpp measurement/power_supply.h measurement/extech.h main.cpp css.h powertop.css
-
+powertop_SOURCES = parameters/persistent.cpp parameters/learn.cpp parameters/parameters.cpp \
+		parameters/parameters.h display.cpp cpu/cpu_core.cpp cpu/cpudevice.cpp \
+		cpu/cpu.cpp cpu/cpu.h cpu/cpu_linux.cpp cpu/abstract_cpu.cpp cpu/intel_cpus.h \
+		cpu/cpu_package.cpp cpu/cpudevice.h cpu/intel_cpus.cpp devlist.h devlist.cpp \
+		lib.cpp report.cpp process/process.cpp process/interrupt.h process/timer.h \
+		process/processdevice.cpp process/powerconsumer.cpp process/work.h  \
+		process/timer.cpp process/process.h process/work.cpp process/do_process.cpp \
+		process/processdevice.h process/interrupt.cpp process/powerconsumer.h report.h \
+		perf/perf.cpp perf/perf_event.h perf/perf.h perf/perf_bundle.h \
+		perf/perf_bundle.cpp display.h devices/rfkill.h devices/i915-gpu.cpp \
+		devices/device.cpp devices/alsa.cpp devices/runtime_pm.cpp \
+		devices/thinkpad-fan.cpp devices/usb.cpp devices/ahci.cpp \
+		devices/thinkpad-light.cpp devices/ahci.h devices/i915-gpu.h \
+		devices/network.h devices/rfkill.cpp devices/alsa.h devices/thinkpad-fan.h \
+		devices/device.h devices/usb.h devices/backlight.h devices/backlight.cpp \
+		devices/runtime_pm.h devices/thinkpad-light.h devices/network.cpp lib.h \
+		tuning tuning/cpufreq.h tuning/bluetooth.cpp tuning/cpufreq.cpp \
+		tuning/tuning.cpp tuning/tuningusb.cpp tuning/ethernet.cpp tuning/bluetooth.h \
+		tuning/tuning.h tuning/ethernet.h tuning/tunable.cpp tuning/nl80211.h \
+		tuning/iw.c tuning/wifi.cpp tuning/tuningsysfs.h tuning/tuningsysfs.cpp \
+		tuning/wifi.h tuning/runtime.cpp tuning/tunable.h tuning/runtime.h \
+		tuning/tuningusb.h tuning/iw.h calibrate/calibrate.cpp \
+		calibrate/calibrate.h measurement/measurement.cpp measurement/power_supply.cpp \
+		measurement/measurement.h measurement/acpi.cpp measurement/sysfs.h \
+		measurement/sysfs.cpp measurement/acpi.h measurement/extech.cpp \
+		measurement/power_supply.h measurement/extech.h main.cpp css.h powertop.css
 
  powertop_CXXFLAGS = -O2 -g -fno-omit-frame-pointer -fstack-protector -Wall -Wshadow -Wformat -I/usr/include/ $(NCURSES_CFLAGS) $(PCIUTILS_CFLAGS) $(LIBNL_CFLAGS) $(GLIB2_CFLAGS)
 
--

1.7.10.2

_______________________________________________
PowerTop mailing list
PowerTop(a)lists.01.org
https://lists.01.org/mailman/listinfo/powertop