Skip to contentSkip to conversation

Fix: debug-info feature enable/disable

PATCH Philippe Proulx 3 participants 3 messages May 6, 2016 2 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 6 lines · Mathieu Desnoyers

Explicitly enabling the debug-info feature should not disable the feature.

---
 configure.ac | 19 ++++++++++++++-----

I guess this is for Babeltrace, but it's hard to tell without the usual [PATCH babeltrace] subject prefix!

Quoted 11 lines
 1 file changed, 14 insertions(+), 5 deletions(-)
configure.ac +0 -1
index db0adb6..bc34272 100644
@@ -278,11 +278,20 @@ if test "x${enable_python_bindings_doc:-yes}" = xyes; then
     )
 fi
 
-# Optional debuginfo feature (enabled by default)

configure.ac if test "x${enable_python_bindings_doc:-yes}" = xyes; then · line 286

Quoted 10 lines
configure.ac +6 -4
-AS_IF([test "x$DEFAULT_ENABLE_DEBUGINFO" = xyes],
-    [AC_ARG_ENABLE([debug-info], [AC_HELP_STRING([--disable-debug-info], [disable the debug-info feature (default on OS X and Solaris)])], [], [enable_debuginfo=yes])],
-    [AC_ARG_ENABLE([debug-info], [AC_HELP_STRING([--enable-debug-info], [enable the debug-info feature (default on Linux)])], [], [enable_debuginfo=no])]
-)
+# Set default enable state for debug info
+if test "x$DEFAULT_ENABLE_DEBUGINFO" = xyes; then
+       enable_debuginfo=yes
+else
+       enable_debuginfo=no
+fi

You should use AS_IF().

Otherwise you can use this form:

    test "x$DEFAULT_ENABLE_DEBUGINFO" = xyes && enable_debuginfo=yes

|| enable_debuginfo=no

configure.ac if test "x${enable_python_bindings_doc:-yes}" = xyes; then · line 293

Quoted 7 lines
configure.ac +7 -0
+
+# Optional debuginfo feature
+# Do _not_ indent the help string below (appears in the configure --help
+# output).
+AC_ARG_ENABLE([debug-info],
+[AC_HELP_STRING([--enable-debug-info], [enable the debug-info feature (default on Linux)])]
+[AC_HELP_STRING([--disable-debug-info], [disable the debug-info feature (default on OS X and Solaris)])],

I know this is unrelated to this patch, but what about a better description than "debug-info", like "enable printing debugging information"?

configure.ac if test "x${enable_python_bindings_doc:-yes}" = xyes; then · line 294

Quoted 1 line
configure.ac +1 -0
+       [ if test "x$enableval" = xyes; then enable_debuginfo=yes; else enable_debuginfo=no; fi ], [] )

You should use AS_IF(), or the aforementioned alternative form.

Phil

Quoted 10 lines
configure.ac +0 -1
 AM_CONDITIONAL([ENABLE_DEBUGINFO], [test "x$enable_debuginfo" = xyes])
 AS_IF([test "x$enable_debuginfo" = xyes], [
--

2.1.4

_______________________________________________
lttng-dev mailing list
[email protected]
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

_______________________________________________
lttng-dev mailing list
[email protected]
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

A message that is not in the archive (sent off-list or not yet received): CAB4xu_2ACGJFtMGgSGo32x6qhDdQwxqPPZ3ZkTRiD6KZft736g@mail.gmail.com

#3 lore raw

will update, thanks!

Mathieu

Quoted 75 lines · ----- On May 6, 2016, at 12:04 PM, Philippe Proulx [email protected]…
Quoted 6 lines · Mathieu Desnoyers

Explicitly enabling the debug-info feature should not disable the feature.

---
 configure.ac | 19 ++++++++++++++-----

I guess this is for Babeltrace, but it's hard to tell without the usual [PATCH babeltrace] subject prefix!

Quoted 17 lines
 1 file changed, 14 insertions(+), 5 deletions(-)
configure.ac +0 -4
index db0adb6..bc34272 100644
@@ -278,11 +278,20 @@ if test "x${enable_python_bindings_doc:-yes}" = xyes; then
     )
 fi
 
-# Optional debuginfo feature (enabled by default)
-AS_IF([test "x$DEFAULT_ENABLE_DEBUGINFO" = xyes],
-    [AC_ARG_ENABLE([debug-info], [AC_HELP_STRING([--disable-debug-info],
 [disable the debug-info feature (default on OS X and Solaris)])], [],
 [enable_debuginfo=yes])],
-    [AC_ARG_ENABLE([debug-info], [AC_HELP_STRING([--enable-debug-info], [enable

the debug-info feature (default on Linux)])], [], [enable_debuginfo=no])]

configure.ac

Quoted 7 lines
configure.ac +6 -1
-)
+# Set default enable state for debug info
+if test "x$DEFAULT_ENABLE_DEBUGINFO" = xyes; then
+       enable_debuginfo=yes
+else
+       enable_debuginfo=no
+fi

You should use AS_IF().

Otherwise you can use this form:

   test "x$DEFAULT_ENABLE_DEBUGINFO" = xyes && enable_debuginfo=yes

|| enable_debuginfo=no

Quoted 9 lines
configure.ac +6 -0
+
+# Optional debuginfo feature
+# Do _not_ indent the help string below (appears in the configure --help
+# output).
+AC_ARG_ENABLE([debug-info],
+[AC_HELP_STRING([--enable-debug-info], [enable the debug-info feature (default

on Linux)])]
+[AC_HELP_STRING([--disable-debug-info], [disable the debug-info feature (default on OS X and Solaris)])],

I know this is unrelated to this patch, but what about a better description than "debug-info", like "enable printing debugging information"?

Quoted 2 lines

+ [ if test "x$enableval" = xyes; then enable_debuginfo=yes; else
enable_debuginfo=no; fi ], [] )

You should use AS_IF(), or the aforementioned alternative form.

Phil

Quoted 10 lines

AM_CONDITIONAL([ENABLE_DEBUGINFO], [test "x$enable_debuginfo" = xyes]) AS_IF([test "x$enable_debuginfo" = xyes], [
--
2.1.4

_______________________________________________
lttng-dev mailing list
[email protected]
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

Signature · 7 lines
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
_______________________________________________
lttng-dev mailing list
[email protected]
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
#4 lore raw
In reply to a message not in the archive
Quoted 41 lines · Philippe Proulx
Quoted 6 lines · Mathieu Desnoyers

Explicitly enabling the debug-info feature should not disable the feature.

---
 configure.ac | 19 ++++++++++++++-----

I guess this is for Babeltrace, but it's hard to tell without the usual [PATCH babeltrace] subject prefix!

Quoted 11 lines
 1 file changed, 14 insertions(+), 5 deletions(-)
configure.ac +0 -1
index db0adb6..bc34272 100644
@@ -278,11 +278,20 @@ if test "x${enable_python_bindings_doc:-yes}" = xyes; then
     )
 fi
 
-# Optional debuginfo feature (enabled by default)

configure.ac if test "x${enable_python_bindings_doc:-yes}" = xyes; then · line 286

Quoted 10 lines
configure.ac +6 -4
-AS_IF([test "x$DEFAULT_ENABLE_DEBUGINFO" = xyes],
-    [AC_ARG_ENABLE([debug-info], [AC_HELP_STRING([--disable-debug-info], [disable the debug-info feature (default on OS X and Solaris)])], [], [enable_debuginfo=yes])],
-    [AC_ARG_ENABLE([debug-info], [AC_HELP_STRING([--enable-debug-info], [enable the debug-info feature (default on Linux)])], [], [enable_debuginfo=no])]
-)
+# Set default enable state for debug info
+if test "x$DEFAULT_ENABLE_DEBUGINFO" = xyes; then
+       enable_debuginfo=yes
+else
+       enable_debuginfo=no
+fi

You should use AS_IF().

Otherwise you can use this form:

    test "x$DEFAULT_ENABLE_DEBUGINFO" = xyes && enable_debuginfo=yes

|| enable_debuginfo=no

Quoted 11 lines

configure.ac if test "x${enable_python_bindings_doc:-yes}" = xyes; then · line 293

Quoted 7 lines
configure.ac +7 -0
+
+# Optional debuginfo feature
+# Do _not_ indent the help string below (appears in the configure --help
+# output).
+AC_ARG_ENABLE([debug-info],
+[AC_HELP_STRING([--enable-debug-info], [enable the debug-info feature (default on Linux)])]
+[AC_HELP_STRING([--disable-debug-info], [disable the debug-info feature (default on OS X and Solaris)])],

I know this is unrelated to this patch, but what about a better description than "debug-info", like "enable printing debugging information"?

Agreed. I'll make the change in a separate commit.

Thanks!
Jérémie

Quoted 17 lines

configure.ac if test "x${enable_python_bindings_doc:-yes}" = xyes; then · line 294

Quoted 2 lines
configure.ac +1 -0
+       [ if test "x$enableval" = xyes; then enable_debuginfo=yes; else enable_debuginfo=no; fi ], [] )

You should use AS_IF(), or the aforementioned alternative form.

Phil

Quoted 10 lines
configure.ac +0 -1
 AM_CONDITIONAL([ENABLE_DEBUGINFO], [test "x$enable_debuginfo" = xyes])
 AS_IF([test "x$enable_debuginfo" = xyes], [
--

2.1.4

_______________________________________________
lttng-dev mailing list
[email protected]
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

Signature · 7 lines
Jérémie Galarneau
EfficiOS Inc.
http://www.efficios.com
_______________________________________________
lttng-dev mailing list
[email protected]
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev