Bug 61994 - Compile File fails to compile some filenames
Summary: Compile File fails to compile some filenames
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: Build tools: Custom Makefiles (show other bugs)
Version: 3.0.0a4
Platform: Slackware Linux
: NOR normal
Target Milestone: ---
Assignee: KDevelop Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-08-02 03:39 UTC by Chris
Modified: 2003-08-19 10:52 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
use complete filenamebase to determine target file name (2.38 KB, patch)
2003-08-16 04:01 UTC, Andreas Koepfle
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chris 2003-08-02 03:39:49 UTC
Version:           3.0.0a4 (using KDE KDE 3.1.2)
Installed from:    Slackware Packages
Compiler:          gcc 3.2.2 
OS:          Linux

When trying to compile a file with a period (.) in the name using the "Compile File" option in the Build menu, KDevelop ignores the rest of the filename.  Note that there must be two periods (.) in the name to reproduce this bug - one in the filename and one separating the filename from the extension.

Steps to repro:

- Create a new source file with a period in the filename (eg: blah.foo.cpp)
- Select the "Compile File" option
- Compiler fails to compile. ("No rule to make blah.o")
Comment 1 Chris 2003-08-02 03:41:53 UTC
I should also have mentioned that the project I was working in was imported 
from custom makefiles, and the offending file was "discovered" by the project 
import script.
Comment 2 Andreas Koepfle 2003-08-16 04:01:13 UTC
Created attachment 2249 [details]
use complete filenamebase to determine target file name

Take the complete filename base up to the last dot to determine the file name
of the target. The patch also fixes similar bugs in autoproject and
trollproject.
Comment 3 Amilcar do Carmo Lucas 2003-08-19 10:52:38 UTC
Subject: kdevelop/parts

CVS commit by aclu: 

Take the complete filename base up to the last dot to determine the file name
of the target. Fix BR 61994 for auto custom and troll project managers 

Thank Andreas Koepfle (koepfle in ti.uni-mannheim.de) for the patch
CCMAIL: 61994-done@bugs.kde.org


  M +1 -1      autoproject/autoprojectpart.cpp   1.108
  M +1 -1      customproject/customprojectpart.cpp   1.59
  M +1 -1      trollproject/trollprojectwidget.cpp   1.116


--- kdevelop/parts/autoproject/autoprojectpart.cpp  #1.107:1.108
@@ -722,5 +722,5 @@ void AutoProjectPart::slotCompileFile()
     QFileInfo fi(fileName);
     QString sourceDir = fi.dirPath();
-    QString baseName = fi.baseName();
+    QString baseName = fi.baseName(true);
     kdDebug(9020) << "Compiling " << fileName
                   << " in dir " << sourceDir

--- kdevelop/parts/customproject/customprojectpart.cpp  #1.58:1.59
@@ -500,5 +500,5 @@ void CustomProjectPart::slotCompileFile(
     QFileInfo fi(fileName);
     QString sourceDir = fi.dirPath();
-    QString baseName = fi.baseName();
+    QString baseName = fi.baseName(true);
     kdDebug(9020) << "Compiling " << fileName
                   << "in dir " << sourceDir

--- kdevelop/parts/trollproject/trollprojectwidget.cpp  #1.115:1.116
@@ -2604,5 +2604,5 @@ void TrollProjectWidget::slotBuildFile()
     QFileInfo fi(fileName);
     QString sourceDir = fi.dirPath();
-    QString baseName = fi.baseName();
+    QString baseName = fi.baseName(true);
     kdDebug(9020) << "Compiling " << fileName
                   << "in dir " << sourceDir