bugfix: Replace build config name with DLOG_DEBUG_ENABLE 33/42833/2 submit/tizen/20150703.060558 submit/tizen/20150703.131716
authorJae-young Hwang <j-zero.hwang@samsung.com>
Fri, 3 Jul 2015 02:52:21 +0000 (11:52 +0900)
committerJae-young Hwang <j-zero.hwang@samsung.com>
Fri, 3 Jul 2015 05:51:55 +0000 (14:51 +0900)
build conflict is occured when some packages redefine "TIZEN_DEBUG_ENABLE" config.
in order to solve that, change config name to DLOG_DEBUG_ENABLE.

Change-Id: Ia160504ce02fcfe79b7454922eeb9d2028aeb26b
Signed-off-by: Jae-young Hwang <j-zero.hwang@samsung.com>
configure.ac
include/dlog.h.m4
packaging/dlog.spec
src/libdlog/log.c

index 2de5159..d5c2539 100755 (executable)
@@ -53,9 +53,6 @@ AC_ARG_ENABLE([debug_enable],
        AS_HELP_STRING([--enable-debug_enable Turn on debug_enable]),
                [debug_enable=yes],
            debug_enable=no)
-if test "x$debug_enable" = "xyes" ; then
-       DEBUG_CFLAGS+=" -DTIZEN_DEBUG_ENABLE"
-fi
 # check for fatal_on
 AC_ARG_ENABLE([fatal_on],
        AS_HELP_STRING([--enable-fatal_on Turn on fatal assertion]),
index 671da05..6407537 100755 (executable)
@@ -46,9 +46,7 @@ extern "C" {
 #endif
 
 m4_ifdef(`TIZEN_ENGINEER_MODE',
-#ifndef TIZEN_ENGINEER_MODE
-#define TIZEN_ENGINEER_MODE
-#endif
+#define DLOG_DEBUG_ENABLE
 
 )m4_dnl
 /**
@@ -114,7 +112,7 @@ static inline int __dlog_no_print(const char *fmt __attribute__((unused)), ...)
 
 // Macro inner work---------------------------------------------------------------
 #undef LOG_
-#ifdef TIZEN_DEBUG_ENABLE
+#ifdef DLOG_DEBUG_ENABLE
 #define LOG_(id, prio, tag, fmt, arg...) \
        ({ do { \
                __dlog_print(id, prio, tag, "%s: %s(%d) > " fmt, __MODULE__, __func__, __LINE__, ##arg); \
@@ -129,7 +127,7 @@ static inline int __dlog_no_print(const char *fmt __attribute__((unused)), ...)
 #endif
 
 #undef SECURE_LOG_
-#ifdef TIZEN_DEBUG_ENABLE
+#ifdef DLOG_DEBUG_ENABLE
 #define SECURE_LOG_(id, prio, tag, fmt, arg...) \
        ({ do { \
                __dlog_print(id, prio, tag, "%s: %s(%d) > [SECURE_LOG] " fmt, __MODULE__, __func__, __LINE__, ##arg); \
@@ -211,7 +209,7 @@ static inline int __dlog_no_print(const char *fmt __attribute__((unused)), ...)
  *  LOGD("app debug %d", num);
  *  LOGE("app error %d", num);
  */
-#ifdef TIZEN_DEBUG_ENABLE
+#ifdef DLOG_DEBUG_ENABLE
 #define LOGD(format, arg...) LOG_(LOG_ID_MAIN, DLOG_DEBUG, LOG_TAG, format, ##arg)
 #else
 #define LOGD(format, arg...) NOP(format, ##arg)
@@ -228,7 +226,7 @@ static inline int __dlog_no_print(const char *fmt __attribute__((unused)), ...)
  *  SLOGD("system debug %d", num);
  *  SLOGE("system error %d", num);
  */
-#ifdef TIZEN_DEBUG_ENABLE
+#ifdef DLOG_DEBUG_ENABLE
 #define SLOGD(format, arg...) LOG_(LOG_ID_SYSTEM, DLOG_DEBUG, LOG_TAG, format, ##arg)
 #else
 #define SLOGD(format, arg...) NOP(format, ##arg)
@@ -245,7 +243,7 @@ static inline int __dlog_no_print(const char *fmt __attribute__((unused)), ...)
  *  RLOGD("radio debug %d", num);
  *  RLOGE("radio error %d", num);
  */
-#ifdef TIZEN_DEBUG_ENABLE
+#ifdef DLOG_DEBUG_ENABLE
 #define RLOGD(format, arg...) LOG_(LOG_ID_RADIO, DLOG_DEBUG, LOG_TAG, format, ##arg)
 #else
 #define RLOGD(format, arg...) NOP(format, ##arg)
@@ -258,7 +256,7 @@ static inline int __dlog_no_print(const char *fmt __attribute__((unused)), ...)
  * @internal
  * @brief For Tizen OSP Application macro.
  */
-#ifdef TIZEN_DEBUG_ENABLE
+#ifdef DLOG_DEBUG_ENABLE
 #define ALOGD(format, arg...) LOG_(LOG_ID_APPS, DLOG_DEBUG, LOG_TAG, format, ##arg)
 #else
 #define ALOGD(format, arg...) NOP(format, ##arg)
index b9ade41..6c4fae3 100755 (executable)
@@ -60,7 +60,6 @@ cp %{SOURCE102} .
 %configure --disable-static \
                        --enable-fatal_on \
                        --enable-engineer_mode \
-                       --enable-debug_enable \
                        --with-systemd-journal
 make %{?jobs:-j%jobs}
 
index 46fa2d1..5a146b7 100755 (executable)
@@ -198,7 +198,7 @@ static int dlog_should_log(log_id_t log_id, const char* tag, int prio)
 {
        int should_log;
 
-#ifndef TIZEN_DEBUG_ENABLE
+#ifndef DLOG_DEBUG_ENABLE
        if (prio <= DLOG_DEBUG)
                return DLOG_ERROR_INVALID_PARAMETER;
 #endif