samba: add option for built-in debug messages
authorGustavo Zacarias <gustavo@zacarias.com.ar>
Sat, 4 May 2013 02:06:45 +0000 (02:06 +0000)
committerPeter Korsgaard <jacmet@sunsite.dk>
Sat, 4 May 2013 12:58:48 +0000 (14:58 +0200)
This option allows users to specify the maximum level for compiled-in
debug messages with -1 being none.
In a typical scenario of nmbd+smbd+smbpasswd this can save a full
megabyte of target space.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
package/samba/Config.in
package/samba/samba.mk

index fedbccdd635e49f8e3666e60f97fd48fe61c04dd..0ab67edbbb1326cfc54a79602a520a1388a67fd3 100644 (file)
@@ -13,6 +13,14 @@ config BR2_PACKAGE_SAMBA
 
 if BR2_PACKAGE_SAMBA
 
+config BR2_PACKAGE_SAMBA_MAX_DEBUGLEVEL
+       int "Maximum level of compiled-in debug messages"
+       range -1 10000
+       default -1
+       help
+         Define the level of compiled-in debug messages.
+         This allows for big space savings, -1 being the lowest (none).
+
 config BR2_PACKAGE_SAMBA_LIBICONV
        bool "extended encodings (libiconv)"
        depends on !BR2_ENABLE_LOCALE
index 3a004e1d5298232026b8c168283ab2d11d886f0d..683c7b2e0fedb81d80fe7115fcfd28e6ff22dd99 100644 (file)
@@ -158,6 +158,9 @@ else
 SAMBA_CONF_OPT += --with-libiconv=""
 endif
 
+# Compiled debug messages by level
+SAMBA_CONF_OPT += CFLAGS="$(TARGET_CFLAGS) -DMAX_DEBUG_LEVEL=$(BR2_PACKAGE_SAMBA_MAX_DEBUGLEVEL)"
+
 ifeq ($(BR2_PACKAGE_SAMBA_SWAT),y)
 ifneq ($(BR2_HAVE_DOCUMENTATION),y)
 SAMBA_POST_INSTALL_TARGET_HOOKS += SAMBA_REMOVE_SWAT_DOCUMENTATION