Author Topic: rev.1894, Modification and compile trouble  (Read 7887 times)

Offline kisoft

  • Almost regular
  • **
  • Posts: 194
rev.1894, Modification and compile trouble
« on: January 30, 2006, 11:24:30 am »
Version 1.0 revision 1894 (gcc 3.4.2 Windows/unicode, build: Jan 30 2006 08:42:11)

1. I open my project
2. Edit source file (file.cpp, project content this file)
3. Press Ctrl-F9
Oops, file not saved and no compiled now!
Press Ctrl-S. Now compiled Ok.
On end of prev week I have no this trouble.

I compile my project with external makefile, IBM VisualAge C++ compiler.
OS: WinXPSP3
wxWidgets: 2.8.12
CodeBlocks: Master github cbMakefileGen plugin:
https://github.com/kisoft/cbmakefilegen

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5529
Re: rev.1894, Modification and compile trouble
« Reply #1 on: January 30, 2006, 12:21:10 pm »
ok, I am not sure about this, but I think external makefiles had been disabled for a while ?? And turned back on last week, maybe no saving happens before the make file is called, so your make does not notice yet the files has changed (well it hasn't if not saved)

Offline kisoft

  • Almost regular
  • **
  • Posts: 194
Re: rev.1894, Modification and compile trouble
« Reply #2 on: January 30, 2006, 01:07:11 pm »
ok, I am not sure about this, but I think external makefiles had been disabled for a while ?? And turned back on last week, maybe no saving happens before the make file is called, so your make does not notice yet the files has changed (well it hasn't if not saved)
1. External makefile I use in C::B since october 2005. No problems was before now.
2. You right. File not saved before the makefile is called.

I don't found options disabled/enabled this mode.
I think then this trouble don't link with external makefile.

I see that this trouble have myself only.

Thank you for suggestions. I will be searched a bit more.
OS: WinXPSP3
wxWidgets: 2.8.12
CodeBlocks: Master github cbMakefileGen plugin:
https://github.com/kisoft/cbmakefilegen

Offline kisoft

  • Almost regular
  • **
  • Posts: 194
Re: rev.1894, Modification and compile trouble
« Reply #3 on: January 30, 2006, 01:34:56 pm »
I do this:

1. Open the ContribPlugins.workspace
2. Activate (if yet not) the CodeStat project
3. Open the codestat.cpp file
4. Insert an empty line into a file beginning
5. Press Ctrl-F9
6. Ok, "*" is gone (saved, and compiled now)

So, I try this:

1. Open the codestat project properties
2. Check "This is a custom Makefile"
3. Activate (if yet not) the CodeStat project
4. Open the codestat.cpp file
5. Insert an empty line into a file beginning
6. Press Ctrl-F9
7. :( "*" no gone. Changes no saved.

== Build log start
mingw32-make.exe: Makefile: No such file or directory
mingw32-make.exe: *** No rule to make target `Makefile'.  Stop.
Process terminated with status 2 (0 minutes, 0 seconds)
0 errors, 0 warnings
== Build log end

It's right, codestat have no makefile.

Resume: on an external makefile, a modified file(s) don't saved before the makefile is called
OS: WinXPSP3
wxWidgets: 2.8.12
CodeBlocks: Master github cbMakefileGen plugin:
https://github.com/kisoft/cbmakefilegen

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5529
Re: rev.1894, Modification and compile trouble
« Reply #4 on: January 30, 2006, 02:44:07 pm »
Quote
Resume: on an external makefile, a modified file(s) don't saved before the makefile is called
Could you file a bugreport for this on SF ?

Offline kisoft

  • Almost regular
  • **
  • Posts: 194
Re: rev.1894, Modification and compile trouble
« Reply #5 on: January 30, 2006, 03:07:40 pm »
Quote
Resume: on an external makefile, a modified file(s) don't saved before the makefile is called
Could you file a bugreport for this on SF ?

Yes, I would send this bugreport on SF tomorrow.
May be somebody look this trouble too and confirm it.

PS I delete the default.conf file and reconfigure C::B again. No changes.
OS: WinXPSP3
wxWidgets: 2.8.12
CodeBlocks: Master github cbMakefileGen plugin:
https://github.com/kisoft/cbmakefilegen

Offline kisoft

  • Almost regular
  • **
  • Posts: 194
Re: rev.1894, Modification and compile trouble
« Reply #6 on: January 30, 2006, 04:36:14 pm »
Quote
Resume: on an external makefile, a modified file(s) don't saved before the makefile is called

I found one solve, but it unlike me. C::B now normally save all modified files before start custom Makefile.

Method CompilerGCC::Build, on the custom Makefile branch, method saveAllFiles is not called.

Code
Index: C:/Devel/codeblocks/src/plugins/compilergcc/compilergcc.cpp
===================================================================
--- C:/Devel/codeblocks/src/plugins/compilergcc/compilergcc.cpp (revision 1902)
+++ C:/Devel/codeblocks/src/plugins/compilergcc/compilergcc.cpp (working copy)
@@ -1936,6 +1936,9 @@
     {
         wxString cmd = GetMakeCommandFor(mcBuild, bt);
         m_CommandQueue.Add(new CompilerCommand(cmd, wxEmptyString, m_Project, bt));
+        // make sure all project files are saved
+        if (m_Project && !m_Project->SaveAllFiles())
+            Manager::Get()->GetMessageManager()->Log(_("Could not save all files..."));
     }
     else
     {
OS: WinXPSP3
wxWidgets: 2.8.12
CodeBlocks: Master github cbMakefileGen plugin:
https://github.com/kisoft/cbmakefilegen

Offline kisoft

  • Almost regular
  • **
  • Posts: 194
Re: rev.1894, Modification and compile trouble (patch sumbitted to SF)
« Reply #7 on: January 31, 2006, 07:41:49 am »
I sumbit patch to SF:
https://sourceforge.net/tracker/index.php?func=detail&aid=1419940&group_id=126998&atid=707418

It work on my:
Version 1.0 revision 1907 (gcc 3.4.2 Windows/unicode, build: Jan 31 2006 09:27:10)
OS: WinXPSP3
wxWidgets: 2.8.12
CodeBlocks: Master github cbMakefileGen plugin:
https://github.com/kisoft/cbmakefilegen