Bug 74570

Summary: Custom makefiles project doesn't support "GNUmakefile" file name
Product: [Applications] kdevelop Reporter: Lukasz Wojtylak <rufio>
Component: generalAssignee: KDevelop Developers <kdevelop-devel>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 3.0.0   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Enables "GNUmakefile" file name in custom makefiles project

Description Lukasz Wojtylak 2004-02-08 14:43:30 UTC
Version:           3.0.0 (using KDE KDE 3.2.0)
Installed from:    Compiled From Sources
Compiler:          gcc-3.3.1 
OS:          Linux

Custom makefiles project should allow also "GNUmakefile" as the make file name. Here's a simple patch to the file buildtools/custommakefiles/customprojectpart.cpp:

--- customprojectpart.cpp.orig	2004-01-17 13:57:20.000000000 +0100
+++ customprojectpart.cpp	2004-02-08 14:23:01.000000000 +0100
@@ -503,9 +503,9 @@
     bool ant = DomUtil::readEntry(dom, "/kdevcustomproject/build/buildtool") == "ant";
 
     if (!ant) {
-        QFileInfo fi(dir + "/Makefile");
-	QFileInfo fi2(dir + "/makefile");
-        if (!fi.exists() && !fi2.exists()) {
+        if (!QFile::exists(dir + "/Makefile") && !QFile::exists(dir + "/makefile") &&
+	      !QFile::exists(dir + "/GNUmakefile"))
+	{
             KMessageBox::information(mainWindow()->main(),
                                      i18n("There is no Makefile in this directory."));
             return;
Comment 1 Lukasz Wojtylak 2004-02-08 14:46:57 UTC
Created attachment 4574 [details]
Enables "GNUmakefile" file name in custom makefiles project

Sorry for posting the patch twice (in the bug report and in this attachment);
it is my first KDE bug reported.
Comment 2 John Firebaugh 2004-03-14 19:30:39 UTC
CVS commit by firebaugh: 

Don't try to outguess make, it will produce a fine error message if no makefile is found.

CCMAIL: 74570-done@bugs.kde.org


  M +0 -10     customprojectpart.cpp   1.71


--- kdevelop/buildtools/custommakefiles/customprojectpart.cpp  #1.70:1.71
@@ -503,14 +503,4 @@ void CustomProjectPart::startMakeCommand
     bool ant = DomUtil::readEntry(dom, "/kdevcustomproject/build/buildtool") == "ant";
 
-    if (!ant) {
-        QFileInfo fi(dir + "/Makefile");
-        QFileInfo fi2(dir + "/makefile");
-        if (!fi.exists() && !fi2.exists()) {
-            KMessageBox::information(mainWindow()->main(),
-                                     i18n("There is no Makefile in this directory."));
-            return;
-        }
-    }
-
     QString cmdline;
     if (ant) {


Comment 3 Jens Dagerbo 2004-03-29 20:20:08 UTC
CVS commit by dagerbo: 

Don't try to outguess make, it will produce a fine error message if no makefile is found.

CCMAIL: 74570@bugs.kde.org


  M +0 -10     customprojectpart.cpp   1.68.2.2


--- kdevelop/buildtools/custommakefiles/customprojectpart.cpp  #1.68.2.1:1.68.2.2
@@ -503,14 +503,4 @@ void CustomProjectPart::startMakeCommand
     bool ant = DomUtil::readEntry(dom, "/kdevcustomproject/build/buildtool") == "ant";
 
-    if (!ant) {
-        QFileInfo fi(dir + "/Makefile");
-        QFileInfo fi2(dir + "/makefile");
-        if (!fi.exists() && !fi2.exists()) {
-            KMessageBox::information(mainWindow()->main(),
-                                     i18n("There is no Makefile in this directory."));
-            return;
-        }
-    }
-
     QString cmdline;
     if (ant) {