Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3205 in orxonox.OLD for orxonox


Ignore:
Timestamp:
Dec 17, 2004, 7:27:59 PM (20 years ago)
Author:
bensch
Message:

orxonox/trunk: DEBUG implemented in the configure-files

Location:
orxonox/trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/Makefile.in

    r3198 r3205  
    619619\
    620620        $(DX_CONF_DIR)/progress                                         >> $(DX_CONFIG_FILE); \
    621         if test $(DEBUG) = yes ; then \
     621        if test $(DEBUG) -ge 2 ; then \
    622622         echo "QUIET                    = \"NO\""                       >> $(DX_CONFIG_FILE); \
    623623        else \
  • orxonox/trunk/config.h.in

    r3178 r3205  
    11/* config.h.in.  Generated from configure.ac by autoheader.  */
    22
    3 /* if we ar in Debug Mode */
     3/* in which debug mode we are */
    44#undef DEBUG
    55
  • orxonox/trunk/configure

    r3197 r3205  
    865865  --disable-dependency-tracking  speeds up one-time build
    866866  --enable-dependency-tracking   do not reject slow dependency extractors
    867   --enable-debug          compiles GTK in debug mode. Lots of Debug info about
    868                           the game
     867  --enable-debug          compiles in debug mode. Lots of debug info about the
     868                          game.
    869869
    870870Optional Packages:
     
    38463846if test "${enable_debug+set}" = set; then
    38473847  enableval="$enable_debug"
    3848   DEBUG=yes
     3848  DEBUG=$enableval
    38493849fi;
    3850 echo "$DEBUG"
    3851 if test "$DEBUG" = yes; then
     3850
     3851if test "$DEBUG" = "no"; then
     3852        echo "no"
     3853        echo " -> Setting debuglevel to 1. Like this you can still see errors."
     3854        DEBUG=1
     3855elif test "$DEBUG" = yes; then
     3856        echo "yes"
     3857        echo " -> Setting debuglevel to 3. HARD DEBUG MODE!!."
     3858        DEBUG=3
     3859else
     3860        echo "yes set to $DEBUG"
     3861fi
    38523862
    38533863cat >>confdefs.h <<_ACEOF
    3854 #define DEBUG 1
    3855 _ACEOF
    3856 
    3857 fi
     3864#define DEBUG $DEBUG
     3865_ACEOF
     3866
     3867
    38583868
    38593869
    38603870
    38613871## GTK-disabled
    3862 def_gtk=yes
    38633872echo "$as_me:$LINENO: checking if gtk should be enabled" >&5
    38643873echo $ECHO_N "checking if gtk should be enabled... $ECHO_C" >&6
     
    38683877  withval="$with_gtk"
    38693878  def_gtk=no
     3879else
     3880  def_gtk=yes
    38703881fi;
    38713882if test "$def_gtk" = yes; then
  • orxonox/trunk/configure.ac

    r3197 r3205  
    2626AC_MSG_CHECKING([if DEBUG-mode should be enabled])
    2727AC_ARG_ENABLE([debug],
    28         AC_HELP_STRING( [--enable-debug], [compiles GTK in debug mode. Lots of Debug info about the game]),
    29          [DEBUG=yes])
    30 echo "$DEBUG"
    31 if test "$DEBUG" = yes; then
    32         AC_DEFINE_UNQUOTED(DEBUG, 1, [if we ar in Debug Mode])
    33 fi
     28        AC_HELP_STRING( [--enable-debug], [compiles in debug mode. Lots of debug info about the game.]),
     29         DEBUG=$enableval)
     30
     31if test "$DEBUG" = "no"; then
     32        echo "no"
     33        echo " -> Setting debuglevel to 1. Like this you can still see errors."
     34        DEBUG=1
     35elif test "$DEBUG" = yes; then
     36        echo "yes"
     37        echo " -> Setting debuglevel to 3. HARD DEBUG MODE!!."
     38        DEBUG=3
     39else       
     40        echo "yes set to $DEBUG"
     41fi
     42        AC_DEFINE_UNQUOTED(DEBUG, $DEBUG, [in which debug mode we are])
     43
    3444AC_SUBST(DEBUG)
    3545
    3646
    3747## GTK-disabled
    38 def_gtk=yes
    3948AC_MSG_CHECKING([if gtk should be enabled])
    4049AC_ARG_WITH([gtk],
    4150        AC_HELP_STRING( [--without-gtk],
    42         [Prevents GTK from being loaded]), [def_gtk=no])
     51        [Prevents GTK from being loaded]), [def_gtk=no], [def_gtk=yes])
    4352if test "$def_gtk" = yes; then
    4453  echo "yes"
  • orxonox/trunk/doc/documentation.am

    r3173 r3205  
    2525\
    2626        $(DX_CONF_DIR)/progress                                         >> $(DX_CONFIG_FILE); \
    27         if test $(DEBUG) = yes ; then \
     27        if test $(DEBUG) -ge 2 ; then \
    2828         echo "QUIET                    = \"NO\""                       >> $(DX_CONFIG_FILE); \
    2929        else \
  • orxonox/trunk/src/debug.h

    r3204 r3205  
    33
    44#ifdef  DEBUG
    5  #define PRINTF(x) \
    6         if (verbose >= x ) \
    7            printf ("%s:%d:", __FILE__, __LINE__); \
    8         if (verbose >= x) printf
     5#define PRINTF(x) \
     6           PRINTF ## x
     7
     8#if DEBUG >= 1
     9#define PRINTF1 \
     10    if (verbose >= 1 ) \
     11     printf ("%s:%d:", __FILE__, __LINE__); \
     12     if (verbose >= 1) printf
     13#else
     14#define PRINTF1
     15#endif
     16     
     17#if DEBUG >= 2
     18#define PRINTF2 \
     19     if (verbose >= 2 ) \
     20     printf ("%s:%d:", __FILE__, __LINE__); \
     21     if (verbose >= 2) printf
     22#else
     23#define PRINTF2
     24#endif
     25     
     26#if DEBUG >= 3
     27#define PRINTF3 \
     28     if (verbose >= 3 ) \
     29     printf ("%s:%d:", __FILE__, __LINE__); \
     30     if (verbose >= 3) printf
     31#else
     32#define PRINTF3
     33#endif
     34     
     35#if DEBUG >= 4
     36#define PRINTF4 \
     37     if (verbose >= 4 ) \
     38     printf ("%s:%d:", __FILE__, __LINE__); \
     39     if (verbose >= 4) printf
     40#else
     41#define PRINTF4
     42#endif
     43     
     44     
    945#else 
    10  #define PRINTF(x)
     46#define PRINTF(x)
    1147#endif
    1248
  • orxonox/trunk/src/importer/framework.cc

    r3204 r3205  
    5151int main(int argc, char *argv[])
    5252{
    53   int verbose = 2;
    54 
    55   PRINTF(1)("This is The big verbose-Test %i, %s\n", 1, "cool");
     53  int verbose = 3;
     54
     55  PRINTF(2)("This is The big verbose-Test %i, %s\n", 1, "cool");
    5656
    5757  Uint8* keys; // This variable will be used in the keyboard routine
Note: See TracChangeset for help on using the changeset viewer.