[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kdevelop-devel
Subject:    branches/kdevelop/3.4/buildtools/custommakefiles
From:       Alexander Neundorf <neundorf () kde ! org>
Date:       2005-11-23 21:11:49
Message-ID: 1132780309.008708.12514.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 482709 by neundorf:

For the "Build"->"Compile file" feature, check whether there's a makefile
in the directory of the source file. If this is the case, execute "make foo.o" there
(as it was until now).
If there is no makefile located there, execute "make foo.o" in the  main build
directory.
Although make can generate a default rule if there is no makefile present, this
usually doesn't work (in a complex enough build process) and at least it probably
doesn't do what you'd expect.

What do you think about it ?

Alex

CCMAIL: kdevelop-devel@kdevelop.org



 M  +11 -0     customprojectpart.cpp  


--- branches/kdevelop/3.4/buildtools/custommakefiles/customprojectpart.cpp #482708:482709
@@ -641,6 +641,17 @@
 
     QString buildDir = sourceDir;
     QString target = baseName + ".o";
+
+    //if there is no Makefile in the directory of the source file
+    //try to build it from the main build dir
+    //this works e.g. for non-recursive cmake Makefiles, Alex
+    if ((QFile::exists(sourceDir+"/Makefile") == false)
+        && (QFile::exists(sourceDir+"/makefile") == false))
+    {
+       buildDir=buildDirectory();
+    }
+
+
     kdDebug(9020) << "builddir " << buildDir << ", target " << target << endl;
 
     startMakeCommand(buildDir, target);

_______________________________________________
KDevelop-devel mailing list
KDevelop-devel@barney.cs.uni-potsdam.de
http://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic