diff --git a/ddd/Ddd.in.m4 b/ddd/Ddd.in.m4
index 779acf3..26e05a9 100644
--- a/ddd/Ddd.in.m4
+++ b/ddd/Ddd.in.m4
@@ -80,7 +80,7 @@ Ddd*appDefaultsVersion: @VERSION@
 ! User-settable resources
 !-----------------------------------------------------------------------------
 
-! The inferior debugger type. One of: bash, dbx, gdb, jdb, mdb, perl, pydb, 
+! The inferior debugger type. One of: bash, dbx, gdb, jdb, remake, perl, pydb, 
 !	                              or xdb.
 Ddd*debugger: gdb
 
diff --git a/ddd/GDBAgent.C b/ddd/GDBAgent.C
index 7fc1379..3f28e2f 100644
--- a/ddd/GDBAgent.C
+++ b/ddd/GDBAgent.C
@@ -827,19 +827,19 @@ bool GDBAgent::ends_with_prompt (const string& ans)
     }
     case MAKE:
     {
-	// Any line ending in `mdb<...> ' is a prompt.
+	// Any line ending in `remake<...> ' is a prompt.
 	// Since N does not make sense in DDD, we use `DB<> ' instead.
 
 #if RUNTIME_REGEX
-	static regex rxmakeprompt("mdb<+[(]*[0-9][)]*>+");
+	static regex rxmakeprompt("remake<+[(]*[.0-9][)]*>+[.]*");
 #endif
 
 	int i = answer.length() - 1;
-	if (i < 1 || answer[i] != ' ' || answer[i - 1] != '>')
+	if (i < 1 || answer[i] != ' ' || (answer[i - 1] != '>' && answer[i - 1] != '.'))
 	    return false;
 
 	while (i >= 0 && answer[i] != '\n' ) {
-	  if (answer.contains("mdb<", i)) {
+	  if (answer.contains("remake<", i)) {
 	    string possible_prompt = answer.from(i);
 	    if (possible_prompt.matches(rxmakeprompt)) {
 	      last_prompt = possible_prompt;
@@ -2673,7 +2673,7 @@ string GDBAgent::debug_command(const char *program, string args) const
 	return string("debug ") + program + args;
 
 	// restart/run is not the same a debug. But this is the closes
-	// mdb has for now.
+	// remake has for now.
     case MAKE:
 	return string("run ") + program + args;
     }
diff --git a/ddd/GDBAgent.h b/ddd/GDBAgent.h
index e065fd1..d52a19d 100644
--- a/ddd/GDBAgent.h
+++ b/ddd/GDBAgent.h
@@ -70,7 +70,7 @@ enum ProgramLanguage {
     LANGUAGE_CHILL,		// Chill, as supported by GDB.
     LANGUAGE_FORTRAN,		// FORTRAN, as supported by GDB.
     LANGUAGE_JAVA,		// Java, as supported by GDB.
-    LANGUAGE_MAKE,		// Make, as supported by mdb.
+    LANGUAGE_MAKE,		// Make, as supported by remake.
     LANGUAGE_PASCAL,		// Pascal-like: Pascal, Modula...
     LANGUAGE_PERL,		// Perl, as supported by Perl.
     LANGUAGE_PHP,		// PHP, as supported by DBG.
diff --git a/ddd/PosBuffer.C b/ddd/PosBuffer.C
index 3e96b9d..4c32a7d 100644
--- a/ddd/PosBuffer.C
+++ b/ddd/PosBuffer.C
@@ -1258,7 +1258,7 @@ void PosBuffer::filter_make(string& answer)
 	    strip_trailing_space(line);
 		    
 #if RUNTIME_REGEX
-	    static regex rxmakepos("[(][^:]*:[0-9][0-9]*[)]:");
+	    static regex rxmakepos(".*[(][^:]*:[0-9][0-9]*[)]");
 #endif
 	    if (line.matches(rxmakepos))
 	    {
diff --git a/ddd/SourceView.C b/ddd/SourceView.C
index b9ac35d..e11cb9b 100644
--- a/ddd/SourceView.C
+++ b/ddd/SourceView.C
@@ -1572,7 +1572,7 @@ bool SourceView::file_matches(const string& file1, const string& file2)
     if (gdb->type() == JDB)
 	return file1 == file2;
 
-    if (gdb->type() == GDB || app_data.use_source_path)
+    if (gdb->type() == GDB || gdb->type() == MAKE || app_data.use_source_path)
 	return file1 == file2 || full_path(file1) == full_path(file2);
 
     return base_matches(file1, file2);
diff --git a/ddd/rxscan.L b/ddd/rxscan.L
index 35abafb..1c6d1b1 100644
--- a/ddd/rxscan.L
+++ b/ddd/rxscan.L
@@ -363,8 +363,8 @@ C9bashdb<+[(]*[0-9]*[)]*>+{w}		RETURN(&rxbashprompt);
 D0[(][^:]*:{P}[)]:.*	                RETURN(&rxbashpos);
 D1[^ \t]*:{_}{P}{_}<.*>       		RETURN(&rxdbgpos);
 D2#{D}{_}<.*>{_}at{_}[^ \t]*:{_}{P}	RETURN(&rxdbgframepos);
-D3mdb<+[(]*[0-9]*[)]*>+{w}		RETURN(&rxmakeprompt);
-D4[(][^:]+:{P}[)](:.*)?	                RETURN(&rxmakepos);
+D3remake<+[(]*[.0-9]*[)]*>+[.]*{w}	RETURN(&rxmakeprompt);
+D4.*[(][^:]*:{P}[)].*			RETURN(&rxmakepos);
 D5[(]+Pydb[)]+{w}		        RETURN(&rxpyprompt);
 D6[(][^:]*:{P}[)]:.*	                RETURN(&rxpypos);
 D7{D}(\.{D})?	                        RETURN(&rxfixednum);
diff --git a/ddd/strclass.C b/ddd/strclass.C
index 8f584c8..83ff587 100644
--- a/ddd/strclass.C
+++ b/ddd/strclass.C
@@ -39,6 +39,7 @@ extern "C" int malloc_verify();
 #include <limits.h>
 #include <new>
 #include <stdlib.h>
+#include <cstdio>
 
 void string::error(const char* msg) const
 {
