Index: trunk/MagicSoft/Mars/mbase/MLog.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MLog.cc	(revision 3921)
+++ trunk/MagicSoft/Mars/mbase/MLog.cc	(revision 3927)
@@ -359,5 +359,5 @@
 
     // lock mutex
-    Lock();
+    Lock("UpdateGui");
 
     TGText &txt=*fGui->GetText();
@@ -387,18 +387,20 @@
 
     // release mutex
-    UnLock();
-}
-
-void MLog::Lock()
+    UnLock("UpdateGui");
+}
+
+void MLog::Lock(const char *msg)
 {
 #ifdef _REENTRANT
-    fMuxGui->Lock();
+    if (fMuxGui->Lock()==13)
+        Error("Lock", "%s - mutex is already locked by this thread\n", msg);
 #endif
 }
 
-void MLog::UnLock()
+void MLog::UnLock(const char *msg)
 {
 #ifdef _REENTRANT
-    fMuxGui->UnLock();
+    if (fMuxGui->UnLock()==13)
+        Error("UnLock", "%s - tried to unlock mutex locked by other thread\n", msg);
 #endif
 }
@@ -410,7 +412,7 @@
 int MLog::sync()
 {
-    Lock();
+    Lock("sync");
     WriteBuffer();
-    UnLock();
+    UnLock("sync");
 
     if (fDevice&eStdout)
@@ -446,5 +448,5 @@
     if (fOutputLevel <= fDebugLevel)
     {
-        Lock();
+        Lock("overflow");
 
         *fPPtr++ = (char)i;
@@ -453,5 +455,5 @@
             WriteBuffer();
 
-        UnLock();
+        UnLock("overflow");
     }
 
Index: trunk/MagicSoft/Mars/mbase/MLog.h
===================================================================
--- trunk/MagicSoft/Mars/mbase/MLog.h	(revision 3921)
+++ trunk/MagicSoft/Mars/mbase/MLog.h	(revision 3927)
@@ -102,6 +102,6 @@
     ~MLog();
 
-    void Lock();
-    void UnLock();
+    void Lock(const char *msg);
+    void UnLock(const char *msg);
 
     void EnableDirectGui()  { fIsDirectGui = kTRUE; }
Index: trunk/MagicSoft/Mars/mbase/Makefile
===================================================================
--- trunk/MagicSoft/Mars/mbase/Makefile	(revision 3921)
+++ trunk/MagicSoft/Mars/mbase/Makefile	(revision 3927)
@@ -1,22 +1,13 @@
 ##################################################################
 #
-#   makefile
+#   subdirectory makefile
 # 
 #   for the MARS software
 #
 ##################################################################
-# @maintitle
-
-# @code
-
-#
-#  please change all system depend values in the 
-#  config.mk.${OSTYPE} file 
-#
-#
 include ../Makefile.conf.$(OSTYPE)
 include ../Makefile.conf.general
 
-# @endcode 
+#------------------------------------------------------------------------------
 
 INCLUDES = -I. -I../mfileio -I../mfbase -I../mastro
@@ -25,12 +16,5 @@
 # mastro:   MAstro (MTime)
 
-# @code 
-
-CINT     = Base
-LIB      = mbase.a
-
-#------------------------------------------------------------------------------
-
-.SUFFIXES: .c .cc .cxx .h .hxx .o 
+CINT = Base
 
 SRCFILES = MLogo.cc \
@@ -49,5 +33,4 @@
            MFilter.cc \
            MEvtLoop.cc \
-           MStatusDisplay.cc \
            MProgressBar.cc \
            MSearch.cc \
@@ -70,17 +53,9 @@
            MPrint.cc
 
-SRCS    = $(SRCFILES)
-HEADERS = $(SRCFILES:.cc=.h)
-OBJS    = $(SRCFILES:.cc=.o) 
-
 ############################################################
 
-all: $(LIB)
+all: $(OBJS)
 
 include ../Makefile.rules
 
-#clean:	rmcint rmobjs rmcore rmlib
-
 mrproper:	clean rmbak
-
-# @endcode
