Code::Blocks

Developer forums (C::B DEVELOPMENT STRICTLY!) => Plugins development => Topic started by: kisoft on June 22, 2007, 10:17:13 am

Title: cbMakefileGen plugin
Post by: kisoft on June 22, 2007, 10:17:13 am
cbMakefileGen plugin - is a very simple makefile generator.
Features:
 - Generate a simple makefile for current project and an active target
 - Configuration options:
   - Filename of Makefile
   - Overwrite if exists (checkbox) (Use it with care!)
   - Add '@' prefix for commands (checkbox)

ToDo list:
 - Add dependents for each source
 - Add dependents for project
 - Add all targets to Makefile

Sources and Makefile.am, cbmakegen.cbp, cbmakegen-unix.cbp, manifest.xml included.
I build this plugin in $(#cb)/plugins/contrib/cbmakegen directory.
I build and check this plugin for WinXP SP2 and Ubuntu 6.10 only.

cbMakefileGen plugin - is my first plugin for CodeBlocks then you must being used a generated Makefile with care.
When this plugin is new then may content a few bugs.
If you need this plugin and can test it, a lot thanks for you bug reports and suggestions.

Generated file example:

# A simple makefile generator by KiSoft, 2007. mailto: kisoft@rambler.ru

# Project Variables start
CPP=mingw32-g++.exe
CC=mingw32-gcc.exe
LD=mingw32-g++.exe
LIB=ar.exe
WINDRES=windres.exe
OBJS=..\..\..\.objs\plugins\contrib\cbmakegen\Rule.o ..\..\..\.objs\plugins\contrib\cbmakegen\Makefile.o ..\..\..\.objs\plugins\contrib\cbmakegen\cbMakefileGen.o ..\..\..\.objs\plugins\contrib\cbmakegen\cbmakefilecfg.o ..\..\..\.objs\plugins\contrib\cbmakegen\Variable.o
# Project Variables end

all: ..\..\..\devel\share\CodeBlocks\plugins\cbMakefileGen.dll commandsafterbuild

.PHONY: commandsafterbuild

commandsafterbuild:
   @zip -j9 ..\..\..\devel\share\CodeBlocks\cbMakefileGen.zip manifest.xml

..\..\..\devel\share\CodeBlocks\plugins\cbMakefileGen.dll: $(OBJS)
   @echo Building dynamic library ..\..\..\devel\share\CodeBlocks\plugins\cbMakefileGen.dll
   @mingw32-g++.exe -shared   -Wl,--dll -LC:\Devel\codeblocks\src\devel -LC:\Devel\wxWidgets-2.8.4\lib\gcc_dll -LC:\MinGW\lib  $(OBJS)  -o ..\..\..\devel\share\CodeBlocks\plugins\cbMakefileGen.dll -s  -lcodeblocks -lwxmsw28u

..\..\..\.objs\plugins\contrib\cbmakegen\Rule.o: C:\Devel\codeblocks\src\plugins\contrib\cbmakegen\Rule.cpp
   @echo Compiling: C:\Devel\codeblocks\src\plugins\contrib\cbmakegen\Rule.cpp
   @mingw32-g++.exe -pipe -mthreads -fmessage-length=0 -fexceptions -Winvalid-pch -DBUILDING_PLUGIN -DHAVE_W32API_H -D__WXMSW__ -DWXUSINGDLL -DTIXML_USE_STL -DCB_PRECOMP -DWX_PRECOMP -DwxUSE_UNICODE -DcbDEBUG  -IC:\Devel\codeblocks\src\include -IC:\Devel\codeblocks\src\include\wxscintilla\include -IC:\Devel\wxWidgets-2.8.4\include -IC:\Devel\wxWidgets-2.8.4\lib\gcc_dll\mswu -IC:\MinGW\include  -c C:\Devel\codeblocks\src\plugins\contrib\cbmakegen\Rule.cpp -o ..\..\..\.objs\plugins\contrib\cbmakegen\Rule.o

..\..\..\.objs\plugins\contrib\cbmakegen\Makefile.o: C:\Devel\codeblocks\src\plugins\contrib\cbmakegen\Makefile.cpp
   @echo Compiling: C:\Devel\codeblocks\src\plugins\contrib\cbmakegen\Makefile.cpp
   @mingw32-g++.exe -pipe -mthreads -fmessage-length=0 -fexceptions -Winvalid-pch -DBUILDING_PLUGIN -DHAVE_W32API_H -D__WXMSW__ -DWXUSINGDLL -DTIXML_USE_STL -DCB_PRECOMP -DWX_PRECOMP -DwxUSE_UNICODE -DcbDEBUG  -IC:\Devel\codeblocks\src\include -IC:\Devel\codeblocks\src\include\wxscintilla\include -IC:\Devel\wxWidgets-2.8.4\include -IC:\Devel\wxWidgets-2.8.4\lib\gcc_dll\mswu -IC:\MinGW\include  -c C:\Devel\codeblocks\src\plugins\contrib\cbmakegen\Makefile.cpp -o ..\..\..\.objs\plugins\contrib\cbmakegen\Makefile.o

..\..\..\.objs\plugins\contrib\cbmakegen\cbMakefileGen.o: C:\Devel\codeblocks\src\plugins\contrib\cbmakegen\cbMakefileGen.cpp
   @echo Compiling: C:\Devel\codeblocks\src\plugins\contrib\cbmakegen\cbMakefileGen.cpp
   @mingw32-g++.exe -pipe -mthreads -fmessage-length=0 -fexceptions -Winvalid-pch -DBUILDING_PLUGIN -DHAVE_W32API_H -D__WXMSW__ -DWXUSINGDLL -DTIXML_USE_STL -DCB_PRECOMP -DWX_PRECOMP -DwxUSE_UNICODE -DcbDEBUG  -IC:\Devel\codeblocks\src\include -IC:\Devel\codeblocks\src\include\wxscintilla\include -IC:\Devel\wxWidgets-2.8.4\include -IC:\Devel\wxWidgets-2.8.4\lib\gcc_dll\mswu -IC:\MinGW\include  -c C:\Devel\codeblocks\src\plugins\contrib\cbmakegen\cbMakefileGen.cpp -o ..\..\..\.objs\plugins\contrib\cbmakegen\cbMakefileGen.o

..\..\..\.objs\plugins\contrib\cbmakegen\cbmakefilecfg.o: C:\Devel\codeblocks\src\plugins\contrib\cbmakegen\cbmakefilecfg.cpp
   @echo Compiling: C:\Devel\codeblocks\src\plugins\contrib\cbmakegen\cbmakefilecfg.cpp
   @mingw32-g++.exe -pipe -mthreads -fmessage-length=0 -fexceptions -Winvalid-pch -DBUILDING_PLUGIN -DHAVE_W32API_H -D__WXMSW__ -DWXUSINGDLL -DTIXML_USE_STL -DCB_PRECOMP -DWX_PRECOMP -DwxUSE_UNICODE -DcbDEBUG  -IC:\Devel\codeblocks\src\include -IC:\Devel\codeblocks\src\include\wxscintilla\include -IC:\Devel\wxWidgets-2.8.4\include -IC:\Devel\wxWidgets-2.8.4\lib\gcc_dll\mswu -IC:\MinGW\include  -c C:\Devel\codeblocks\src\plugins\contrib\cbmakegen\cbmakefilecfg.cpp -o ..\..\..\.objs\plugins\contrib\cbmakegen\cbmakefilecfg.o

..\..\..\.objs\plugins\contrib\cbmakegen\Variable.o: C:\Devel\codeblocks\src\plugins\contrib\cbmakegen\Variable.cpp
   @echo Compiling: C:\Devel\codeblocks\src\plugins\contrib\cbmakegen\Variable.cpp
   @mingw32-g++.exe -pipe -mthreads -fmessage-length=0 -fexceptions -Winvalid-pch -DBUILDING_PLUGIN -DHAVE_W32API_H -D__WXMSW__ -DWXUSINGDLL -DTIXML_USE_STL -DCB_PRECOMP -DWX_PRECOMP -DwxUSE_UNICODE -DcbDEBUG  -IC:\Devel\codeblocks\src\include -IC:\Devel\codeblocks\src\include\wxscintilla\include -IC:\Devel\wxWidgets-2.8.4\include -IC:\Devel\wxWidgets-2.8.4\lib\gcc_dll\mswu -IC:\MinGW\include  -c C:\Devel\codeblocks\src\plugins\contrib\cbmakegen\Variable.cpp -o ..\..\..\.objs\plugins\contrib\cbmakegen\Variable.o

.PHONY: clean

clean:
   @echo Delete $(OBJS) ..\..\..\devel\share\CodeBlocks\plugins\cbMakefileGen.dll
   @del /f $(OBJS) ..\..\..\devel\share\CodeBlocks\plugins\cbMakefileGen.dll


Good luck for All!


[attachment deleted by admin]
Title: Re: cbMakefileGen plugin
Post by: mandrav on June 22, 2007, 11:02:39 am
I haven't looked at this yet but thanks kisoft. I guess some people will be very happy with this ;).

(I was planning for something like this (for later though) but I would write a script, not a binary plugin.)
Title: Re: cbMakefileGen plugin
Post by: kisoft on June 22, 2007, 11:21:00 am
I haven't looked at this yet but thanks kisoft. I guess some people will be very happy with this ;).

(I was planning for something like this (for later though) but I would write a script, not a binary plugin.)
Some about script. When plugin is claim then it would do progress. Then this work (discussion) can help later for a script realization.
There is time for everything.
Good luck!
Title: Re: cbMakefileGen plugin
Post by: patlecat on July 11, 2007, 01:50:57 pm
hi kisoft

I think such a plugin is really wanted here. I would love to use it. But you didnt provide an executable and I can't compile your project  :(
But I really need a written Makefile!!

Please help us...
Title: Re: cbMakefileGen plugin
Post by: kisoft on July 11, 2007, 02:24:59 pm
I think such a plugin is really wanted here. I would love to use it. But you didnt provide an executable and I can't compile your project  :(
I can create cbMakefileGen.plugin for Win (WinXP SP2 for me, see attached file), but I don't know how create this plugin for *nix (I have installed Ubuntu 6.10 now, but I being compiled this plugin with contrib plugins).


[attachment deleted by admin]
Title: Re: cbMakefileGen plugin
Post by: patlecat on July 11, 2007, 03:03:10 pm
A Windows exe would be great, my target productive system is Solaris10 via tty. But Windows is my dev platform, so writing a portable Makefile will be much easier with your plugin. I'm thinking of using boost.jam or Premake to streamline Makefile construction.

Do you know if CB (under Windows) does optimize the order of the link libraries itself? This would be very helpfull indeed.

Just tried to add the binary from you into CB Ver.4256 and it fails saying that: your plugin was built for a different version of the CB::SDK  :(
Title: Re: cbMakefileGen plugin
Post by: kisoft on July 11, 2007, 04:01:04 pm
I'm thinking of using boost.jam or Premake to streamline Makefile construction.

I taste Premake only. But it was a many times ago. For start is very nice.

Do you know if CB (under Windows) does optimize the order of the link libraries itself? This would be very helpfull indeed.

Sorry, I have no info for this. My be I don't understand your mind. "optimize order of link" - I can't understand for what.

Just tried to add the binary from you into CB Ver.4256 and it fails saying that: your plugin was built for a different version of the CB::SDK  :(
My C::B rev.4257, wxWidgets 2.8.4. Was compiled today 9 hours ago.
Hmm, I found for all plugins in manifest.xml file:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_plugin_manifest_file>
    <SdkVersion major="1" minor="10" release="0" />

but my mainfest.xml file content this:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_plugin_manifest_file>
    <SdkVersion major="1" minor="11"  release="11" />

Try new attached file, please.
I being investigate this trouble tomorrow.


[attachment deleted by admin]
Title: Re: cbMakefileGen plugin
Post by: patlecat on July 11, 2007, 04:12:45 pm
The order/sequence in which the needed libraries are linked to your program is important under *nix. And Premake can optimize that oder in case it isn't optimal. But does CB do that on Windows too?

Ok I tried ur new binary but it got me the exact same results  :? I attach the resulting DLL here, maybe this can help you find the problem.

Thanks again for your kind help  :P

[attachment deleted by admin]
Title: Re: cbMakefileGen plugin
Post by: kisoft on July 13, 2007, 08:26:47 am
Sorry for a long pause.
I do compiled my plugin again. I do clean all .objs directories and devel/devel too. Recompiled C::B and all contrib plugins with my plugin too. I attach new file now. Try it or wait for my experiments. I want download a lastest night build C::B and try install my plugin.
I try it and get a good result on Nightbuild rev 4261.


[attachment deleted by admin]
Title: Re: cbMakefileGen plugin
Post by: patlecat on July 17, 2007, 10:12:06 am
No problem man, but your plugin still produces the exact same error :( And I've tried it both in the office and home.
Title: Re: cbMakefileGen plugin
Post by: kisoft on July 17, 2007, 11:04:22 am
No problem man, but your plugin still produces the exact same error :( And I've tried it both in the office and home.
I was found a reason. I being used wxmsw28u_gcc_custom.dll instead of wxmsw28u_gcc_cb.dll.
Anyway, I being recompile my project now and send this here after test on nightbuild C::B rev.4261.
Yeah, see this topic http://forums.codeblocks.org/index.php/topic,6450.0.html (http://forums.codeblocks.org/index.php/topic,6450.0.html), may be "cmake" more usable for you

New .cbplugin attached now. Being normally installed on Nightbuilds C::B rev.4261.


[attachment deleted by admin]
Title: Re: cbMakefileGen plugin
Post by: patlecat on July 18, 2007, 10:15:56 am
Finally you made it man. You're the man man! :D
It works and looks fine, thank you. I'm using Premake now but for certain details I'm happy to see now how CB does it internally.
Title: Re: cbMakefileGen plugin
Post by: kisoft on July 18, 2007, 11:38:34 am
Finally you made it man. You're the man man! :D
It works and looks fine, thank you. I'm using Premake now but for certain details I'm happy to see now how CB does it internally.
Thank you! Your feedback being help me. :!:
Good luck!
Title: Re: cbMakefileGen plugin
Post by: kingfox on July 22, 2007, 04:51:05 pm
Thank you Kisoft ! It's a very nice plugin. :D
Title: Re: cbMakefileGen plugin
Post by: kisoft on July 27, 2007, 08:46:01 am
Thank you Kisoft ! It's a very nice plugin. :D
Thank you.
I have no time now for update my plugin. But work is not stopped and to be continued later.
Title: Re: cbMakefileGen plugin
Post by: stahta01 on July 27, 2007, 08:26:08 pm
Thank you.
I have no time now for update my plugin. But work is not stopped and to be continued later.


Would you welcome patches to your plugin?
What license is it under?

Tim S
Title: Re: cbMakefileGen plugin
Post by: kisoft on July 30, 2007, 07:27:11 am
Would you welcome patches to your plugin?
What license is it under?

Tim S

Patches welcomed of course. But I have a local repository only. I am ready create global repository if required.
License: GPL. Open source.
Title: Re: cbMakefileGen plugin
Post by: Vorl on August 01, 2007, 07:12:18 pm
Hello

I think that this plugin will be really usefull.
Do you plan to improve it ? I have noticed that it does not handle dependences (?) and that it use absolute paths. Would be very great to have these two points fixed :roll:
Title: Re: cbMakefileGen plugin
Post by: stahta01 on August 02, 2007, 03:07:11 am
Patches welcomed of course. But I have a local repository only. I am ready create global repository if required.
License: GPL. Open source.


I think it would help if you uploaded the zip file to a site to download from instead using a attachment in this thread.
Or, it would be better if you did an SVN or CVS repository, but I think for now just a file download would be enough.

I myself use http://www.savefile.com to share files, but they is many other free sites.

Tim S

Simple patch to add Virtual "All" Target

Code: [Select]
diff --unified=3 --recursive --ignore-file-name-case --ignore-space-change --ignore-blank-lines --exclude='*.bak' cbmakegen.orig/cbmakegen.cbp cbmakegen/cbmakegen.cbp
--- cbmakegen.orig/cbmakegen.cbp 2007-06-22 11:11:48.000000000 -0400
+++ cbmakegen/cbmakegen.cbp 2007-08-01 20:50:44.890625000 -0400
@@ -46,6 +46,9 @@
  </ExtraCommands>
  </Target>
  </Build>
+ <VirtualTargets>
+ <Add alias="All" targets="default;" />
+ </VirtualTargets>
  <Unit filename="Makefile.cpp">
  <Option weight="30" />
  </Unit>
Title: Re: cbMakefileGen plugin
Post by: kisoft on August 02, 2007, 07:15:46 am
Hello

I think that this plugin will be really usefull.
Do you plan to improve it ? I have noticed that it does not handle dependences (?) and that it use absolute paths. Would be very great to have these two points fixed :roll:

I do registered on BerliOS and create project cbMakefileGen for support this project. Now I wait for update BerliOS configs.

About absolute paths:
I don't use a project options for resolve absolute or relative pathname now. I would check this project options for resolve pathnames.
About dependences:
My investigations is empty, I can't found possibility for get dependences for files now. If you knows, get me information.
Title: Re: cbMakefileGen plugin
Post by: kisoft on August 02, 2007, 07:35:59 am
I think it would help if you uploaded the zip file to a site to download from instead using a attachment in this thread.
Or, it would be better if you did an SVN or CVS repository, but I think for now just a file download would be enough.

Wait a minute, please, I do registered on BerliOS and would create repository and zip versions this plugin.

Simple patch to add Virtual "All" Target
...
Thank you for patch. I made a some changes too. I would upload sources and distributives to BerliOS after refresh configs.

I have problems for creating distibutive for linux now. Anybody help me? Ubuntu 6.10 installed on my work machine. Thanks.
Title: Re: cbMakefileGen plugin
Post by: stahta01 on August 02, 2007, 08:01:16 am
I have problems for creating distibutive for linux now. Anybody help me? Ubuntu 6.10 installed on my work machine. Thanks.

I can do minor help getting it to compile and run under Ubuntu, but I have no idea on how to do an deb package.

Is it an runtime issue? Or an packaging issue?

Tim S

I use andLinux under Windows XP and can do minor testing and debugging of the code in it.
Title: Re: cbMakefileGen plugin
Post by: kisoft on August 02, 2007, 08:22:11 am
I have problems for creating distibutive for linux now. Anybody help me? Ubuntu 6.10 installed on my work machine. Thanks.

I can do minor help getting it to compile and run under Ubuntu, but I have no idea on how to do an deb package.

Thank you, for help. I have no problem with compile and run.

Is it an runtime issue? Or an packaging issue?

Both. On first time required create package for install plugin. May be anybody want use this plugin and can't compile it.

I use andLinux under Windows XP and can do minor testing and debugging of the code in it.

Thank you for your help. Tests can help me for improve plugin.

I do upload sources to BerliOS to my project named cbMakefileGen. Anybody can checkout repository now:

svn checkout svn://svn.berlios.de/cbmakegen/trunk
or
svn checkout http://svn.berlios.de/svnroot/repos/cbmakegen/trunk


Anybody can send a feature requests, bug reports and patches now.
Title: Re: cbMakefileGen plugin
Post by: stahta01 on August 02, 2007, 08:57:43 am
FYI:

I had to remove the path C:\utility\7-Zip\

Tim S

Code: [Select]
Index: cbmakegen.cbp
===================================================================
--- cbmakegen.cbp (revision 1)
+++ cbmakegen.cbp (working copy)
@@ -83,7 +83,7 @@
  <ExtraCommands>
  <Add after="zip -j9 ..\..\..\devel\share\CodeBlocks\cbMakefileGen.zip manifest.xml" />
  <Add after="zip -j9 cbMakefileGen.cbplugin ..\..\..\devel\share\CodeBlocks\cbMakefileGen.zip ..\..\..\devel\share\CodeBlocks\plugins\cbMakefileGen.dll" />
- <Add after="C:\utility\7-Zip\7z.exe a cbMakefileGen.7z cbMakefileGen.cbplugin" />
+ <Add after="7z.exe a cbMakefileGen.7z cbMakefileGen.cbplugin" />
  <Mode after="always" />
  </ExtraCommands>
  </Target>
Title: Re: cbMakefileGen plugin
Post by: kisoft on August 02, 2007, 10:32:02 am
FYI:
I had to remove the path C:\utility\7-Zip\
Fixed into repository now. Thanks!
Title: Re: cbMakefileGen plugin
Post by: Vorl on August 02, 2007, 06:06:15 pm
About dependences:
My investigations is empty, I can't found possibility for get dependences for files now. If you knows, get me information.

I don't know CB very well but I would be surprise that you cannot access to the dependences. I will try to have a look at the source code tomorrow. As a last resort, I think that the depences are in the file <projectname>.depend and it would be possible to parse this file (?).
Title: Re: cbMakefileGen plugin
Post by: kisoft on August 03, 2007, 08:25:44 am
About dependences:
My investigations is empty, I can't found possibility for get dependences for files now. If you knows, get me information.

I don't know CB very well but I would be surprise that you cannot access to the dependences. I will try to have a look at the source code tomorrow. As a last resort, I think that the depences are in the file <projectname>.depend and it would be possible to parse this file (?).

No, I can't found this possibility. I think C::B has this feature.
<projectname>.depend: I want investigate sources for search using this file. I want search using it like internal object (like tree for each file).
depslib (plugins/compilergcc/depslib) contant a lot functions for check dependencies, I investigate this library now.
Title: Re: cbMakefileGen plugin
Post by: Vorl on August 03, 2007, 07:06:26 pm
After a quick look in the source code today, it seems effectively that it won't be easy : everything seems done by depslib but it does not propose a method to get the list of dependences for a file.
the .depend file is actually the dump of the cache of depslib. Parsing it could be the simplest way.
Another way would be to use the -M... options of gcc but it will be more complex I think.

Title: Re: cbMakefileGen plugin
Post by: eranif on August 03, 2007, 09:29:19 pm
The easiest way to find dependencies is to let g++ to tell you what are they by using -MT, -MD & -MM flags.

For example, lets say you have a project with 2 files, test.cpp and main.cpp, and they both link into an executable, so the makefile
that can handle dependencies is something like this:

Code: [Select]
Objects=Debug\test.o Debug\main.o
IncludePath=-I.

TestExec: $(Objects)
g++ -o TestExec $(Objects)

Debug\test.o: test.cpp Debug\test.o.d
g++ -c test.cpp -g  -o Debug\test.o $(IncludePath)

Debug\test.o.d:
@g++ -g $(IncludePath) -MTDebug\test.o -MFDebug\test.o.d -MM test.cpp

Debug\main.o: main.cpp Debug\main.o.d
g++ -c main.cpp -g   -o Debug\main.o $(IncludePath)

Debug\main.o.d:
@g++ -g $(IncludePath) -MTDebug\main.o -MFDebug\main.o.d -MM main.cpp

clean:
-if exist Debug\test.o del Debug\test.o
-if exist Debug\test.o.d del Debug\test.o.d
-if exist Debug\main.o del Debug\main.o
-if exist Debug\main.o.d del Debug\main.o.d
-if exist $(OutputFile) del $(OutputFile)
-if exist $(OutputFile).exe del $(OutputFile).exe

-include Debug/*.d


Note that for every object, I am adding another dependencie: <object_name>.d, for example:
Code: [Select]
Debug\test.o: test.cpp Debug\test.o.d
Now, the rule for 'Debug\test.o.d', is:
Code: [Select]
Debug\test.o.d:
@g++ -g $(IncludePath) -MTDebug\test.o -MFDebug\test.o.d -MM test.cpp
which invokes g++ preprocessor to create it. Open the .d file (it is a text file), and you will see there a single makefile rule generated by g++ for Debug\test.o, which includes all the dependencies required for test.o (I used here MM to omit system dependencies, such as stdio.h etc)

By chagning any of the file that test.cpp is including, the makefile will recompile it.

HTH,
Eran
Title: Re: cbMakefileGen plugin
Post by: kisoft on August 06, 2007, 08:06:53 am
After a quick look in the source code today, it seems effectively that it won't be easy : everything seems done by depslib but it does not propose a method to get the list of dependences for a file.
the .depend file is actually the dump of the cache of depslib. Parsing it could be the simplest way.
Another way would be to use the -M... options of gcc but it will be more complex I think.

If .depend is C::B feature (I think it's true) then I being use this file for parsing for search dependencies.

The easiest way to find dependencies is to let g++ to tell you what are they by using -MT, -MD & -MM flags.

For example, lets say you have a project with 2 files, test.cpp and main.cpp, and they both link into an executable, so the makefile
that can handle dependencies is something like this:

...

Thank you very much, eranif. Example is excellent and very completely!

This method is good for gcc compiler only. Another compilers has other or don't has this feature.
But this method - one more way and may be used optionally.

So, parsing is win now :)

.d method will be realizated later if anybody wish it.
Title: Re: cbMakefileGen plugin
Post by: kisoft on August 08, 2007, 01:18:16 pm
*
* I does realized alpha version for Win32 with dependencies.
*

Sources saved into cbmakegen/branches/dependencies svn repository on BerliOS (trunk has old release 0.1 now).
You can found binary for Win32 only on my project page on BerliOS (project URL see below).
No configs changed now.

Russian cbmakegen.mo included too.

For example, piece of makefile.gen:
Code: [Select]
..\..\..\.objs\plugins\contrib\cbmakegen\Variable.o: C:\Devel\codeblocks\src\plugins\contrib\cbmakegen\Variable.cpp
echo Compiling: C:\Devel\codeblocks\src\plugins\contrib\cbmakegen\Variable.cpp
mingw32-g++.exe -pipe -mthreads -fmessage-length=0 -fexceptions -Winvalid-pch -DBUILDING_PLUGIN -DHAVE_W32API_H -D__WXMSW__ -DWXUSINGDLL -DTIXML_USE_STL -DCB_PRECOMP -DWX_PRECOMP -DwxUSE_UNICODE -DcbDEBUG  -IC:\Devel\codeblocks\src\include -IC:\Devel\codeblocks\src\include\wxscintilla\include -IC:\Devel\wxWidgets-2.8.4\include -IC:\Devel\wxWidgets-2.8.4\lib\gcc_dll\mswu -IC:\MinGW\include  -c C:\Devel\codeblocks\src\plugins\contrib\cbmakegen\Variable.cpp -o ..\..\..\.objs\plugins\contrib\cbmakegen\Variable.o

C:\Devel\codeblocks\src\plugins\contrib\cbmakegen\Rule.cpp: Rule.hpp

C:\Devel\codeblocks\src\plugins\contrib\cbmakegen\Makefile.cpp: Makefile.hpp

C:\Devel\codeblocks\src\plugins\contrib\cbmakegen\Makefile.hpp: Rule.hpp Variable.hpp

C:\Devel\codeblocks\src\plugins\contrib\cbmakegen\cbmakefilecfg.cpp: cbmakefilecfg.h

C:\Devel\codeblocks\src\plugins\contrib\cbmakegen\Variable.cpp: Variable.hpp
Title: Re: cbMakefileGen plugin
Post by: Vorl on August 08, 2007, 07:36:05 pm
It's great !
I'm going to test as soon as possible
Title: Re: cbMakefileGen plugin
Post by: kisoft on August 09, 2007, 07:58:37 am
Hmm, on Linux, I have no <projectname>.depend file and my plugin don't work.
And absolutely filenames , no good.
I would must think about it.
Title: Re: cbMakefileGen plugin
Post by: Vorl on August 10, 2007, 10:33:44 pm
At work I have linux and I think I have the .depend file (I will check monday). Are you sure your arent in custom makefile ?
I have still not test your plugin as importation is complicated at work and I'm not sure how to compile and install it.
Title: Re: cbMakefileGen plugin
Post by: kisoft on August 17, 2007, 08:47:25 am
Win32 plugin for new SDK version attached. No changes, recompiled only.


[attachment deleted by admin]
Title: Re: cbMakefileGen plugin
Post by: kisoft on August 23, 2007, 01:50:04 pm
New version released. Features:
 - Dependencies added to makefile if exists <projectname>.depend file.
 - cbmakegen.mo updated (for Russians only)

On BerliOS.de updated a source repository (SVN).
Added bin_Win32.zip with cbMakefileGen.cbplugin file and cbmakegen.mo.
See URL below.
Good luck!
Title: Re: cbMakefileGen plugin
Post by: kisoft on September 21, 2007, 12:59:32 pm
New version released (0.3). Features:
 - Can saves makefile for all project targets, or active target only. Configurable.
 - cbmakegen.mo updated (for Russians only)

Alpha testing now. I do wait suggestions and bugreports.

On BerliOS.de updated a source repository (SVN) (branches/alltargets only).
Added "cbMakefileGenVer0_3_Win32.zip" with cbMakefileGen.cbplugin file. Added cbmakegen.mo for Russians only.
For downloads see URL below.
Good luck!
Title: Re: cbMakefileGen plugin
Post by: poutsoklis on September 28, 2007, 11:12:36 am
hi kisoft,

i installed v0.3 w/ CB nightly build 4472 on winxpsp2. my workspace includes projects that build static libraries and a project containing the app that uses these static libs (along with opengl) and builds the executable. i use the gcc compiler (v3.4.2 - mingw) and these projects are in c/c++. the app project has dependancies with the libs. when i choose to generate a makefile for a project, i get an error message ("C::B MakefileGen found errors, saves aborted"). did i forget to configure something in the plug-in?

thx in advance,
poutsoklis

[there are 10 kinds of people - those who understand binary and those who don't]
Title: Re: cbMakefileGen plugin
Post by: kisoft on September 28, 2007, 12:27:01 pm
i installed v0.3 w/ CB nightly build 4472 on winxpsp2. my workspace includes projects that build static libraries and a project containing the app that uses these static libs (along with opengl) and builds the executable. i use the gcc compiler (v3.4.2 - mingw) and these projects are in c/c++. the app project has dependancies with the libs. when i choose to generate a makefile for a project, i get an error message ("C::B MakefileGen found errors, saves aborted"). did i forget to configure something in the plug-in?
As usually plugin can't required to configure. Mainly you must to open project and choose required target.
You must see additional error message before ("C::B MakefileGen found errors, saves aborted").
If additional message is absent then you found bug.

Thank you for bugreport. I will investigate this problem.
Please, submit bugreport on BerliOS http://developer.berlios.de/bugs/?func=addbug&group_id=8744 (http://developer.berlios.de/bugs/?func=addbug&group_id=8744)
Good Luck!
Title: Re: cbMakefileGen plugin
Post by: Denis on September 28, 2007, 04:14:12 pm
Can't build plugin from SVN. Build process stops with message:
Code: [Select]
D:\GCC\CodeBlocksPlugins\MakefileGen\Makefile.cpp: In member function 'bool cbMGMakefile::SaveMakefile()':
D:\GCC\CodeBlocksPlugins\MakefileGen\Makefile.cpp:181: error: 'ctInvalid' was not declared in this scope
Title: Re: cbMakefileGen plugin
Post by: kisoft on September 28, 2007, 04:44:33 pm
Can't build plugin from SVN. Build process stops with message:
Code: [Select]
D:\GCC\CodeBlocksPlugins\MakefileGen\Makefile.cpp: In member function 'bool cbMGMakefile::SaveMakefile()':
D:\GCC\CodeBlocksPlugins\MakefileGen\Makefile.cpp:181: error: 'ctInvalid' was not declared in this scope
I update repository today. Fixed Makefile.cpp. This is temporary solution.
checkout repository: /branches/alltargets
trunk repository being content old version 0.2 now.
After will do release 0.3 version (I think it will ver. 0.4), trunk will update.
Thanks for bugreport!
Good Luck!
Title: Re: cbMakefileGen plugin
Post by: Denis on September 28, 2007, 05:01:29 pm
Thanks. It compiles now
Title: Re: cbMakefileGen plugin
Post by: MortenMacFly on October 01, 2007, 02:25:50 pm
It really seems to work - I tried today another time with another project and it worked from scratch. Well done. Hence one thing I am missing: The plugin does overwrite existing Makefile's without any warning. This is no good. I lost an old Makefile that way. :-( Any chance for an improvement accordingly?! ;-(
Title: Re: cbMakefileGen plugin
Post by: kisoft on October 01, 2007, 03:06:40 pm
It really seems to work - I tried today another time with another project and it worked from scratch. Well done. Hence one thing I am missing: The plugin does overwrite existing Makefile's without any warning. This is no good. I lost an old Makefile that way. :-( Any chance for an improvement accordingly?! ;-(

You should do configure the Overwrite option into Settings/Environment/cbMakefileGen dialog.
Overwrite is true by default, hmm. :(

Now I being changed default values to:
Code: [Select]
FileName: "Makefile.gen"
Overwrite: "false"

I will tests and do commit this changes to repository and binary distributive later.

I have idea for add an execution dialog for show options, error messages and other logs.
This dialog would content all options and filename of Makefile and an file existance flag.

Big sorry.
Title: Re: cbMakefileGen plugin
Post by: MortenMacFly on October 02, 2007, 09:32:14 am
You should do configure the Overwrite option into Settings/Environment/cbMakefileGen dialog.
Overwrite is true by default, hmm. :(
Oh - a config! Sorry - I missed that completely. Well if it's an option than it fine! Thanks! :-)
Title: Re: cbMakefileGen plugin
Post by: gd_on on October 18, 2007, 11:14:29 am
I tried your plugin (cbMakefileGenVer0_3_Win32.zip) with nightly 4540 (Windows 2000, SP4)
But when I "Generate Makefile", CB crashes. An empty Makefile is generated.
Here is the beginning of codeblocks.rpt :

Error occured on Thursday, October 18, 2007 at 10:57:00.

C:\Program Files\CodeBlocks\codeblocks.exe caused an Access Violation at location 780109b3 in module C:\WINNT\system32\msvcrt.dll Reading from location 00231000.

Registers:
eax=0ad2110c ebx=0022f278 ecx=02abc043 edx=00000000 esi=00231000 edi=10011da8
eip=780109b3 esp=0022e968 ebp=0022e970 iopl=0         nv up ei pl nz ac po nc
cs=001b  ss=0023  ds=0023  es=0023  fs=0038  gs=0000             efl=00010216

Call stack:
780109B3  C:\WINNT\system32\msvcrt.dll:780109B3  memcpy
6CCB2559  C:\Program Files\CodeBlocks\wxmsw28u_gcc_cb.dll:6CCB2559  _ZN12wxStringBase15CopyBeforeWriteEv
619B30DF  C:\Program Files\CodeBlocks\codeblocks.dll:619B30DF  _ZN12wxStringBase2atEj
61A0B025  C:\Program Files\CodeBlocks\codeblocks.dll:61A0B025  _ZN8wxString4LastEv
618060DC  C:\Program Files\CodeBlocks\codeblocks.dll:618060DC  _ZN24CompilerCommandGenerator4InitEP9cbProject
617FAC94  C:\Program Files\CodeBlocks\codeblocks.dll:617FAC94  _ZN8Compiler4InitEP9cbProject
02755798  C:\Program Files\CodeBlocks\share\codeblocks\plugins\cbMakefileGen.dll:02755798
02757874  C:\Program Files\CodeBlocks\share\codeblocks\plugins\cbMakefileGen.dll:02757874
027593C9  C:\Program Files\CodeBlocks\share\codeblocks\plugins\cbMakefileGen.dll:027593C9
6CD07305  C:\Program Files\CodeBlocks\wxmsw28u_gcc_cb.dll:6CD07305  _ZN12wxEvtHandler21ProcessEventIfMatchesERK21wxEventTableEntryBasePS_R7wxEvent
6CD0765C  C:\Program Files\CodeBlocks\wxmsw28u_gcc_cb.dll:6CD0765C  _ZN16wxEventHashTable11HandleEventER7wxEventP12wxEvtHandler
6CD08629  C:\Program Files\CodeBlocks\wxmsw28u_gcc_cb.dll:6CD08629  _ZN12wxEvtHandler12ProcessEventER7wxEvent
.....

I hope you'll find the problem, because it's useful.

This first happened on a fortran project. I thought it could be because the plugin is only for C and C++, so I tried it on a C project, where it worked a month ago. But it's the same problem.

gd_on

PS : you have published a cbmakegen.mo for russian language. Could you publish also a .po file so it will be possible to build our own language translation. Thanks.
Title: Re: cbMakefileGen plugin
Post by: kisoft on October 22, 2007, 05:14:56 pm
Sorry for a long silence. I have no time now.
If you can send me your <project>.cbp file (ONLY PROJECT.CBP, no more files) then I will can solve this problem more quickly.

Thanks for your report.
Title: Re: cbMakefileGen plugin
Post by: gd_on on October 22, 2007, 06:49:15 pm
I have sent you directly by mail three examples of cbp files. Two for C projects, and one for a Fortran project.

Thanks

gd_on
Title: Re: cbMakefileGen plugin
Post by: kisoft on October 23, 2007, 11:04:36 am
I have sent you directly by mail three examples of cbp files. Two for C projects, and one for a Fortran project.
Ok, I get your files. Wait.. aa.. some time (may be 1-2 days, I have a hot work now).

So, cbmakegen.po file exists into repository. You can browse this file in repository:
http://developer.berlios.de/svn/?group_id=8744 (http://developer.berlios.de/svn/?group_id=8744)
choose "Browse with HTTP" link (near right up corner).
Click on "branches" and on next screen - "alltargets". Search "cbmakegen.po" and download it.
If you want support for your language, for first time send me translated cbmakegen.mo file and say me a language name. I include your file to repository and distributive.

Thank you.
Good luck!
Title: Re: cbMakefileGen plugin
Post by: kisoft on October 23, 2007, 01:36:06 pm
I have sent you directly by mail three examples of cbp files. Two for C projects, and one for a Fortran project.
I send you direct email. But I think then somebody want know too.

I does start your project.cbp and start my plugin.
After start I saw an error message. Error point to sdk/compiler.cpp, line 255. This file - part of C::B sdk.
However, this error may be initiated by my code. Be patient, I being continued investigation.

Good luck!
Title: Re: cbMakefileGen plugin
Post by: Grom on October 23, 2007, 06:42:17 pm
Would be grate to have that plugin working. That is not fun to write in black UNIX terminal a make file a project which contains hundreds of files :shock:.
Title: Re: cbMakefileGen plugin
Post by: kisoft on October 24, 2007, 09:59:38 am
Would be grate to have that plugin working. That is not fun to write in black UNIX terminal a make file a project which contains hundreds of files :shock:.
Sorry, I don't understand you. (If you have questions then you can send me email in russian).
Plugin is work on C/C++ projects.

Good luck!
Title: Re: cbMakefileGen plugin
Post by: Grom on October 24, 2007, 04:07:18 pm
Does this plugin work under the Linux?
Title: Re: cbMakefileGen plugin
Post by: kisoft on October 24, 2007, 04:40:56 pm
Does this plugin work under the Linux?

Yes of course. I does test this plugin on Ubuntu 6.10.

Now you can build this plugin from sources only. Last branch is /branches/alltargets (v0.3).
I have no time to support distributives for linux. Can you help me?

Good luck!
Title: Re: cbMakefileGen plugin
Post by: Grom on October 24, 2007, 05:57:46 pm
I can try... I have 64 bit OpenSUSE 10.3, that have been dead and I have to reinstall it :evil:. Just say me how I can help you.

Would be grate also to write a plugin that will download  updates, compile them and install.
Title: Re: cbMakefileGen plugin
Post by: kisoft on October 25, 2007, 09:55:47 am
I can try... I have 64 bit OpenSUSE 10.3, that have been dead and I have to reinstall it :evil:. Just say me how I can help you.

I have no experience to create a linux distributives. Somebody can help me. I have Ubuntu 6.10 only.

Would be grate also to write a plugin that will download  updates, compile them and install.

I can't help you. Time is money.

Good luck!
Title: Re: cbMakefileGen plugin
Post by: kisoft on October 26, 2007, 11:11:02 am
I does released ver 0.3.11.10
Features:
 - Bugfix, added check to existance a compiler settings
 - Added cbmakegenempty.po file for translate to other langs

To gd_on:
 Bug concerned with compiler settings. Now I does add check to existance a compiler settings.
 Also I does add output to "Code::Blocks Debug" window before call Compiler::GenerateCommandLine. It can help to debug a generating process.
 I try my plugin on 3 your projects and found then 1 & 2 projects (c/c++) worked ok, and 3 project (fortran) send me message about absent a compiler settings (it's ok, I don't have this compiler).
You can try, trap must be is absent now. But a makefile generation is impossible before setting a compiler settings for your project.
General mine is: For generate makefile you must compile your project for beginning at once.

Good luck!
Title: Re: cbMakefileGen plugin
Post by: gd_on on October 26, 2007, 12:07:10 pm
Thanks a lot.
Works now with my C and C++ projects.
Works also with my Fortran projects, but, as you said, if I understand well, it's necessary to first generate the project then Generate the Makefile.
If you don't first generate, there are still crashes.
Let me explain :
I open the fortran project and directly click on Generate Makefile. (That's bad, I know  :( )
I obtain a message window "Unhandled exception" and three buttons at the bottom of that window. Until now it's OK.
1) If I click on the right one "Ignore", an empty Makefile is generated, but C::B continues to work.
2) If I click on the middle one "Retry", C::B crashes.
3) If I click on the left one "Quit" (? Abandonner in French), I first obtain an error message, telling me that there is an exception, in compiler.cpp at line 255, that Compiler::Init() is not called or generator is invalid, and that my C::B version is 4554. Until now, it's OK. But if I click on the OK button, C::B crashes.
It should be better if in the last 2 cases, I had a message telling me to first generate my project, at least one time, rather than a C::B crash. A crash is always frustrating, even when the user has made something wrong ! Further on, the codeblocks.rpt file has no new messages. C:BB exits without telling why.

But, nevertheless, it's OK. May be a few enhancements for the next release.

And thanks too for publishing a .po file.
I'll have a look and will send you a french translation, probably this week end.

gd_on
Title: Re: cbMakefileGen plugin
Post by: kisoft on October 26, 2007, 01:17:17 pm
Thanks a lot.
Works now with my C and C++ projects.

Ok.

Works also with my Fortran projects, but, as you said, if I understand well, it's necessary to first generate the project then Generate the Makefile.

For generate a simple makefile you MUST at ONCE only:

1. Create project.
2. Add files and setup project.
3. Build project with successfull result. (On build C::B create project.depend file)

For next time you can close project, open it again. You can edit sources and compile again. Many times.
Now you can generate a simple makefile.

For example, you does execute 3 steps described above. Close project. Open it again and do start "Generate Makefile".

If you don't first generate, there are still crashes.
Let me explain :
I open the fortran project and directly click on Generate Makefile. (That's bad, I know  :( )

If you does execute 3 steps, described above, this action is true.

I obtain a message window "Unhandled exception" and three buttons at the bottom of that window. Until now it's OK.

My plugin don't handled exceptions. External instance send this message.
Motive unknown for me now. I will see to sources again, more carefully.

I first obtain an error message, telling me that there is an exception, in compiler.cpp at line 255, that Compiler::Init() is not called or
generator is invalid, and that my C::B version is 4554. Until now, it's OK. But if I click on the OK button, C::B crashes.

My C::B:
svn 4556 (wxWidgets 2.8.4)
I compile it self, on my computer.

It should be better if in the last 2 cases, I had a message telling me to first generate my project, at least one time, rather than a C::B crash. A crash is always frustrating, even when the user has made something wrong ! Further on, the codeblocks.rpt file has no new messages. C:BB exits without telling why.

But, nevertheless, it's OK. May be a few enhancements for the next release.

No message windows! :) I like programs without errors.

And thanks too for publishing a .po file.
I'll have a look and will send you a french translation, probably this week end.

Ok. I will add your file to my repository and release.
Send me .po and .mo files, I will append new messages to your .po file in next releases.

Thanks a lot for bugreports and your projects for testing.
Title: Re: cbMakefileGen plugin
Post by: gd_on on October 26, 2007, 02:09:01 pm
I think I have found a key for the problem.
I have 3 different fortran compilers on my PC : g77, g95 and gfortran.
After loading a fortran project, I open Project/Build Options.
Here I can see at the higher lever the "Selected compiler" and at a lower level, in my case "Release" (but it can be Debug also), I can also see the "Selected compiler". If both are the same, there are no problems. I can Generate Makefile now.
But if they are not the same, for example g95 at the higher level and g77 at the release level, I'll have problems if I Generate Makefile now (though generation of project and Makefile was OK the previous time, before closing C::B). I must first regenerate the project in that case. It's not necessary if both compiler declarations are the same.
You'll find effectively in my Fortran project (Motor2.cbp) I sent you a few days ago, that both "<Option compiler=" lines are not the same. First one contains gnu_g95_compiler, and the second one contains gnu_g77_compiler. Normally it is this second one I wanted to use here. The first one should be probably ignored !

gd_on
Title: Re: cbMakefileGen plugin
Post by: kisoft on October 26, 2007, 02:18:38 pm
I think I have found a key for the problem.
I have 3 different fortran compilers on my PC : g77, g95 and gfortran.
After loading a fortran project, I open Project/Build Options.
...
You'll find effectively in my Fortran project (Motor2.cbp) I sent you a few days ago, that both "<Option compiler=" lines are not the same. First one contains gnu_g95_compiler, and the second one contains gnu_g77_compiler. Normally it is this second one I wanted to use here. The first one should be probably ignored !

I will think about. I saw 2 compilers into Motor2.cbp. I being used this project like a template for testing.

Good luck!
Title: Re: cbMakefileGen plugin
Post by: stahta01 on November 11, 2007, 08:39:12 am
Patch that might help someone using C::B Svn.

Tim S

Code: [Select]
Index: cbMakefileGen.cpp
===================================================================
--- cbMakefileGen.cpp (revision 17)
+++ cbMakefileGen.cpp (working copy)
@@ -6,7 +6,7 @@
 #include "cbmakefilecfg.h"
 #include <cbproject.h>
 #include <projectmanager.h>
-#include <messagemanager.h>
+#include <logmanager.h>
 #include <configmanager.h>
 
 int MakefileGenId = wxNewId();
@@ -120,7 +120,7 @@
         msg = _("You need to open a project\nbefore using the plugin!\n"
                 "C::B MakefileGen could not complete the operation.");
         cbMessageBox(msg, _("Error"), wxICON_ERROR | wxOK, Manager::Get()->GetAppWindow());
-        Manager::Get()->GetMessageManager()->DebugLog(msg);
+        Manager::Get()->GetLogManager()->DebugLog(msg);
         return;
     }
 
Index: Makefile.cpp
===================================================================
--- Makefile.cpp (revision 17)
+++ Makefile.cpp (working copy)
@@ -2,7 +2,7 @@
 #include <wx/textfile.h>
 #include "Makefile.hpp"
 #include <globals.h>
-#include <messagemanager.h>
+#include <logmanager.h>
 #include <compiler.h>
 #include <compilerfactory.h>
 #include <macrosmanager.h>
@@ -104,7 +104,7 @@
         wxString l_Msg = _( "Can't found an active target!\n"
                             "C::B MakefileGen could not complete the operation." );
         cbMessageBox( l_Msg, _( "Error" ), wxICON_ERROR | wxOK, (wxWindow *)Manager::Get()->GetAppWindow() );
-        Manager::Get()->GetMessageManager()->DebugLog( l_Msg );
+        Manager::Get()->GetLogManager()->DebugLog( l_Msg );
         return l_Ret;
     }
 
@@ -178,7 +178,7 @@
     l_Rule.SetPrerequisites( objs );
 
     wxString kind_of_output = _T( "unknown" );
-    CommandType ct = ctInvalid; // get rid of compiler warning
+    CommandType ct = ctCount; // ctInvalid; // get rid of compiler warning
     switch ( l_pTarget->GetTargetType() )
     {
     case ttConsoleOnly:
Title: Re: cbMakefileGen plugin
Post by: kisoft on November 12, 2007, 08:55:39 am
Patch that might help someone using C::B Svn.

Tim S

Thank you for patch. I understand your idea. This piece of code was copied from other plugins.

Code: [Select]
-    CommandType ct = ctInvalid; // get rid of compiler warning
+    CommandType ct = ctCount; // ctInvalid; // get rid of compiler warning

I think about it. This piece of code must be review.

I does migrate to a new computer and I have a lot job now. I am very busy now.

Good luck!
Title: Re: cbMakefileGen plugin
Post by: gd_on on November 15, 2007, 04:07:36 pm
CbMakefileGen does not work (install) with nightly 4630 (Windows 2000). When C::B is started I have a message telling me that the dll was compiled with an old SDK.

Hope you'll find some time to update the windows binary on berlios.

gd_on
Title: Re: cbMakefileGen plugin
Post by: kisoft on November 15, 2007, 04:56:02 pm
CbMakefileGen does not work (install) with nightly 4630 (Windows 2000). When C::B is started I have a message telling me that the dll was compiled with an old SDK.

Hope you'll find some time to update the windows binary on berlios.
I released cbMakefileGen ver 0.3.11.11. Binary and sources updated.
History:
 - changed messagemanager on logmanager (thanks stahta01)
 - linker cmd formed for known types now

Good luck!
Title: Re: cbMakefileGen plugin
Post by: phlox81 on November 23, 2007, 11:43:48 am
I'm using the nightly build from 26. Oct. and the plugin isn't running.
C::B isn't loading it at startup, and installation also fails.

Does this plugin run with this nightly?
Title: Re: cbMakefileGen plugin
Post by: kisoft on November 23, 2007, 12:27:37 pm
I'm using the nightly build from 26. Oct. and the plugin isn't running.
C::B isn't loading it at startup, and installation also fails.

Does this plugin run with this nightly?
C::B 26 Oct. == rev. 4564. You can't used my plugin 0.3.11.11 (0.3.11.11 can used with C::B rev. 4630+ only).
You can try my plugin ver.0.3.11.10 or more early versions only.

Good luck!
Title: Re: cbMakefileGen plugin
Post by: phlox81 on November 23, 2007, 01:48:48 pm
I'm using the nightly build from 26. Oct. and the plugin isn't running.
C::B isn't loading it at startup, and installation also fails.

Does this plugin run with this nightly?
C::B 26 Oct. == rev. 4564. You can't used my plugin 0.3.11.11 (0.3.11.11 can used with C::B rev. 4630+ only).
You can try my plugin ver.0.3.11.10 or more early versions only.

Good luck!

cbMakefileGenVer_0_3_11_10_Win32.rar
This file is not anymore at berlios, I getting a file not found error, when I'm trying to download it.
Title: Re: cbMakefileGen plugin
Post by: kisoft on November 23, 2007, 02:05:36 pm
Ok. I does delete this file, I think.
I does update binary file, try again, please.
bMakefileGenVer_0_3_11_10_Win32.rar

Good luck!
Title: Re: cbMakefileGen plugin
Post by: phlox81 on November 23, 2007, 02:40:29 pm
Ok, just some feedback:

I'm planing to use your plugin to export makefiles in Windows for Linux.
Good tool :)
Some feedback:
So, would be nice if I could choose the platform somewhere, or make some config dialog, that would be nice.
Also I tend to use / instead of \ in programming (but C::B uses \ for includes under Windows -.-), but thats an easy replace call.

And its I do, you do, he does  ;) :lol:

Title: Re: cbMakefileGen plugin
Post by: kisoft on November 23, 2007, 04:39:00 pm
Ok, just some feedback:

I'm planing to use your plugin to export makefiles in Windows for Linux.
Good tool :)

Thanks!

Some feedback:
So, would be nice if I could choose the platform somewhere, or make some config dialog, that would be nice.

CommandLine for saved makefile I load from C::B. Can I get linux commandline from Windows? I will look to C::B sources.

Also I tend to use / instead of \ in programming (but C::B uses \ for includes under Windows -.-), but thats an easy replace call.

I will look.

I have a lot work. I will investigate later.

Good luck!
Title: Re: cbMakefileGen plugin
Post by: phlox81 on November 23, 2007, 08:08:08 pm
Some feedback:
So, would be nice if I could choose the platform somewhere, or make some config dialog, that would be nice.

CommandLine for saved makefile I load from C::B. Can I get linux commandline from Windows? I will look to C::B sources.
Oh, I thought the plugin would generate this.
That also explains why you specifiy CPP but don't use it within the makefile.

Also I tend to use / instead of \ in programming (but C::B uses \ for includes under Windows -.-), but thats an easy replace call.

I will look.
I have a lot work. I will investigate later.

Well, most things I could handle now with search & replace, that could even be automated, if I need it more often.
But a little bit of configuration possiblities would be great. :)

Lot of work? me too :lol:
Title: Re: cbMakefileGen plugin
Post by: kisoft on November 26, 2007, 08:12:03 am
Oh, I thought the plugin would generate this.
That also explains why you specifiy CPP but don't use it within the makefile.

Yes, you right.
My plugin is a simple makefile generator only. You can use other generators for more seriously functions.
You can use generated makefile for the base, and being modified this file as your wish.

Well, most things I could handle now with search & replace, that could even be automated, if I need it more often.
But a little bit of configuration possiblities would be great. :)

I think now. The solve will going to my head with times.
As the saying goes: look before you leap.

Good luck!
Title: Re: cbMakefileGen plugin
Post by: gd_on on December 02, 2007, 12:50:27 pm
Hi,
I wanted to compile cbMakefileGen plugin to introduce it in my whole workspace build of C::B.
But I have an error during compilation : messagemanager.h is missing (and 2 other errors).
Looking though this post, it seems that it has been replaced by logmanager.h and some other differences ....
I have updated the sources through SVN, but it seems that those changes have not been introduced there.
You said that stahta01 patches have been introduced, but i don't see that in the souces.
Are you sure that sources on berlios have been all correctly updated ?

Thanks for your work.

gd_on
Title: Re: cbMakefileGen plugin
Post by: kisoft on December 03, 2007, 06:34:42 am
You must use: /branches/alltargets (/trunk - old version and not actual now)
Ok, I will doing merge alltargets to trunk today.
Title: Re: cbMakefileGen plugin
Post by: prcarp on December 11, 2007, 08:06:07 pm
Anyone else getting a crash with the latest (0.3.11.11_Win32)?

Exception Info: Code 0xc0000005  Address: 0x000000000474463a

AppName: codeblocks.exe    AppVer: 0.0.0.0    ModName: cbmakefilegen.dll
ModVer: 0.0.0.0    Offset: 0001463a

My C::B is build 4719 (Dec 10, 2007).  Windows XP SP2.  All other C::B functions appear to work normally.

Happens when I try to generate the makefile and I am using the GNU ARM GCC Compiler toolchain to make my target.  It does create the Makefile.gen file but it is empty.
Title: Re: cbMakefileGen plugin
Post by: kisoft on December 12, 2007, 07:56:28 am
Anyone else getting a crash with the latest (0.3.11.11_Win32)?

Exception Info: Code 0xc0000005  Address: 0x000000000474463a

AppName: codeblocks.exe    AppVer: 0.0.0.0    ModName: cbmakefilegen.dll
ModVer: 0.0.0.0    Offset: 0001463a

My C::B is build 4719 (Dec 10, 2007).  Windows XP SP2.  All other C::B functions appear to work normally.

Happens when I try to generate the makefile and I am using the GNU ARM GCC Compiler toolchain to make my target.  It does create the Makefile.gen file but it is empty.
Thank you for bug report.
I don't know about GNU ARM GCC Compiler, but I will try investigate this problem.
Can you send me codeblocks.RPT file to email?

Good luck!
Title: Re: cbMakefileGen plugin
Post by: prcarp on December 18, 2007, 07:41:01 pm
Any updates?  I emailed you the .RPT file.  Note that C::B crashes even if no project is loaded and you attempt to create a makefile.

Thanks!
Title: Re: cbMakefileGen plugin
Post by: kisoft on December 19, 2007, 09:17:04 am
Any updates?  I emailed you the .RPT file.  Note that C::B crashes even if no project is loaded and you attempt to create a makefile.

Thanks!
This problem concerned with dll.
I will do upload today current (unchanged) version cbMakefileGen, I will do compile it with current version of CodeBlocks (rev 4739).
I have no time. I have a lot work now.
If all projects is closed, cbMakefileGen show messagebox with error message.
For temporary, you can do doungrade CodeBlocks to early versions, where cbMakefileGen is worked.
Another way, do compile cbMakefeilGen yourself, if you can.

Good luck!
Title: Re: cbMakefileGen plugin
Post by: kisoft on December 19, 2007, 10:53:12 am
ver 0.3.11.11 was linked with wxmsw28u_gcc_cb.dll & codeblocks.dll from Nightbuilds rev 4734

Now updated binary on BerliOS. Added release 0.3.11.12

Check it, please. On my system my plugin worked normally.
I check my plugin working on Nightbuild rev 4734. Plugin worked too.

Good luck!
Title: Re: cbMakefileGen plugin
Post by: Grom on January 18, 2008, 06:54:52 pm
Does it works for Linux?
Title: Re: cbMakefileGen plugin
Post by: kisoft on January 21, 2008, 08:16:55 am
Does it works for Linux?
Nope, this revision for Windows only. Sorry, I have no Linux now.
Title: Re: cbMakefileGen plugin
Post by: MortenMacFly on January 21, 2008, 08:21:54 am
Does it works for Linux?
It shouldn't be too hard to make it Linux compatible btw... Most things are already working under Linux, too.
Title: Re: cbMakefileGen plugin
Post by: kisoft on January 21, 2008, 08:46:02 am
Plugin worked on Linux too. But last revision exists for Windows only. I have no Linux now.
You can build this plugin from sources yourself only.
Title: Re: cbMakefileGen plugin
Post by: AmR EiSa on March 14, 2008, 06:36:03 pm
Any new updates ?

AmR EiSa
Title: Re: cbMakefileGen plugin
Post by: MortenMacFly on March 14, 2008, 07:18:10 pm
Any new updates ?
Why don't you just check the cbMakefile plugin repository?!
Title: Re: cbMakefileGen plugin
Post by: kisoft on March 17, 2008, 07:56:37 am
I have no time now for updates. I have two a big projects now. Sorry.
Want anybody do continue project updates? I can help to volunteers.

Good luck!
Title: Re: cbMakefileGen plugin
Post by: MortenMacFly on March 17, 2008, 08:43:09 am
Want anybody do continue project updates? I can help to volunteers.
I could offer to transfer this to the official repo under "contrib" (after talkingback to the big boss). This would allow tto apply patches / changes more easily. You could close this repo than but still can continue to work on it... How about that?
Title: Re: cbMakefileGen plugin
Post by: kisoft on March 18, 2008, 05:33:37 pm
Want anybody do continue project updates? I can help to volunteers.
I could offer to transfer this to the official repo under "contrib" (after talkingback to the big boss). This would allow tto apply patches / changes more easily. You could close this repo than but still can continue to work on it... How about that?

I agree. After move sources to contrib, I will send message to history on my repository in BerliOS about this news :)
Repository trunk path: http://svn.berlios.de/svnroot/repos/cbmakegen/trunk

Thanks you!
Good luck!
Title: Re: cbMakefileGen plugin
Post by: kisoft on March 19, 2008, 03:03:56 pm
Statistics for plugin (01 Aug 2007-19 Mar 2008) (from BerliOS):
Page Views: 5,663
Downloads : 702

Good luck!
Title: Re: cbMakefileGen plugin
Post by: locky on March 30, 2008, 05:19:24 pm
I'm trying to compile cbMakefileGen under Linux using codeblocks_8.02-0ubuntu1.deb and last cbMakefileGen svn but I get this  error :

Code: [Select]
/tmp/branches/alltargets/Makefile.hpp:60: error: «Compiler" has not been declared
/tmp/branches/alltargets/Makefile.hpp:61: error: «Compiler" has not been declared
/tmp/branches/alltargets/Makefile.cpp:82: error: prototype for «bool cbMGMakefile::reLoadDependecies(const wxString&, ProjectBuildTarget*, Compiler*)" does not match any in class «cbMGMakefile"
/tmp/branches/alltargets/Makefile.hpp:61: error: candidate is: bool cbMGMakefile::reLoadDependecies(const wxString&, ProjectBuildTarget*, int*)
/tmp/branches/alltargets/Makefile.cpp:171: error: prototype for «bool cbMGMakefile::getDependencies(ProjectBuildTarget*, Compiler*)" does not match any in class «cbMGMakefile"
/tmp/branches/alltargets/Makefile.hpp:60: error: candidate is: bool cbMGMakefile::getDependencies(ProjectBuildTarget*, int*)
/tmp/branches/alltargets/version.h:7: warning : «AutoVersion::DATE" defined but not used
/tmp/branches/alltargets/version.h:8: warning : «AutoVersion::MONTH" defined but not used
/tmp/branches/alltargets/version.h:9: warning : «AutoVersion::YEAR" defined but not used
/tmp/branches/alltargets/version.h:10: warning : «AutoVersion::UBUNTU_VERSION_STYLE" defined but not used
/tmp/branches/alltargets/version.h:13: warning : «AutoVersion::STATUS" defined but not used
/tmp/branches/alltargets/version.h:14: warning : «AutoVersion::STATUS_SHORT" defined but not used
/tmp/branches/alltargets/version.h:23: warning : «AutoVersion::BUILDS_COUNT" defined but not used
/tmp/branches/alltargets/version.h:26: warning : «AutoVersion::FULLVERSION_STRING" defined but not used
/tmp/branches/alltargets/version.h:29: warning : «AutoVersion::SVN_REVISION" defined but not used
/tmp/branches/alltargets/version.h:30: warning : «AutoVersion::SVN_DATE" defined but not used


Any tips ?

P.S = I have installed codeblocks-dev_8.02-0ubuntu1_i386.deb and libwxsmithlib0-dev_8.02-0ubuntu1_i386.deb
Title: Re: cbMakefileGen plugin
Post by: stahta01 on March 30, 2008, 07:44:34 pm
Try this patch, I had similar issue under windows on NON PCH build.

Tim S

Code: [Select]
Index: Makefile.hpp
===================================================================
--- Makefile.hpp (revision 20)
+++ Makefile.hpp (working copy)
@@ -7,6 +7,7 @@
 #include "Variable.hpp"
 
 class cbProject;
+class Compiler;
 
 #include <wx/arrimpl.cpp>
 
Title: Re: cbMakefileGen plugin
Post by: kisoft on March 31, 2008, 09:32:11 am
stahta01 Thanks for patch. I apply this patch and commit Makefile.hpp to repository HEAD.
Title: Re: cbMakefileGen plugin
Post by: d-_-b on April 24, 2008, 06:01:42 pm
First off, Thanks for the plugin. After getting it running on ubuntu 7.10 with Code::Blocks 8.02 it created my make file with ease. But I needed to do the following to get it working:

- Create a new "Code::Blocks plugin" project for wxWidgets 2.8
- Fetched the code from the cbMakeGen SVN repository
- Added the cbMakeGen files recursively to my new project
- In "Project build options" I selected "default" and "other options" and changed "`wx-config --cflags`" to "`wx-config --cxxflags`"
- Build and it worked.

I could install the plugin but when I restarted Code::Blocks it gave me a error "could not find cbmakegen.zip" but the "Generate Makefile" menu option is under "Projects" and it works.

I hope this helps someone trying to get cbMakeGen running on linux, like it helped me.

Regards,
Title: Re: cbMakefileGen plugin
Post by: kisoft on April 25, 2008, 08:37:47 am
After check out sources of cbMakefileGen project (I put it to C:\Devel\CodeBlocks\src\plugins\contrib\cbmakegen on Windows), you can see file: cbmakegen-unix.cbp. You can open this file into CodeBlocks and rebuid plugin.
Another way, do add extra commands after compile, into .cbp file you can see this code:
Code: [Select]
    <ExtraCommands>
<Add after="zip -j9 ../../../devel/share/codeblocks/cbMakefileGen.zip manifest.xml" />
    <Mode after="always" />
</ExtraCommands>
Good luck!
Title: Re: cbMakefileGen plugin
Post by: oBFusCATed on May 09, 2008, 12:10:25 am
Hello,

I have made some modifications to this plugin, to make it work on my linux projects.
I have also added some enhancements to it.

I have attached the patch file against rev 21.

Here is the list of changes:
1. This is the main fix:
In the method: cbMGMakefile::formFileForTarget, I have replaced the row starting with "-", with the one starting with "+":
Code: [Select]
             Manager::Get()->GetLogManager()->DebugLog(wxString::Format( _("LinkerCmd: %s"), l_LinkerCmd.c_str()) );
             l_pCompiler->GenerateCommandLine( l_LinkerCmd,
                                               p_BuildTarget,
                                               NULL,
                                               l_OutFileName.GetFullPath(),
-                                              _T("$$(") + l_TargetName + _T(")"),
+                                              _T("$$(") + l_ObjsName + _T(")"),
                                               wxEmptyString,
                                               wxEmptyString );

2. Changed the project file to put the cbMakeGen.zip and libcbMakeGen.so in ~/.codeblocks/share/codeblocks/, not in the previous ../../../devel/ala-bala
3. Added feature to replace the "$proj_name$" substring in the Makefile name in the options with the name of the project (example: project TestProj (option = Makefile.$proj_name$), result makefile: Makefile.TestPRoj)
4. Added mkdir -p command before the compile/link command. (My gcc doesn't create the folders for the object/result files)
*5. Added CFLAGS and LDFLAGS variables to the makefile. The values of this variables contain the non expanded options set by the user (for example: `pkg-config --cflags some_lib`). This way the makefile can be used on different machine with different distro/unix installed.

I know the patch is very raw and not 100% correct but it works. Any testing and opinions is appreciated.

***** Can some C::B dev explain the correct way to get the full compiler/linker options?
For the moment I use the following code:
Code: [Select]
void MakeOptions(wxString& result, wxArrayString const &options)
{
    for(unsigned ii = 0; ii < options.Count(); ++ii)
        result += _(" ") + options[ii];
}
and in the cbMGMakefile::formFileForTarget method:
Code: [Select]
    wxString cflags, ldflags;
    MakeOptions(cflags, p_BuildTarget->GetCompilerOptions());
    MakeOptions(cflags, l_pCompiler->GetCompilerOptions());

    MakeOptions(ldflags, p_BuildTarget->GetLinkerOptions());
    MakeOptions(ldflags, l_pCompiler->GetLinkerOptions());

Best regards,
Teodor Petrov

[attachment deleted by admin]
Title: Re: cbMakefileGen plugin
Post by: kisoft on May 12, 2008, 12:38:37 pm
1. This is the main fix:
In the method: cbMGMakefile::formFileForTarget, I have replaced the row starting with "-", with the one starting with "+":
Code: [Select]
             Manager::Get()->GetLogManager()->DebugLog(wxString::Format( _("LinkerCmd: %s"), l_LinkerCmd.c_str()) );
             l_pCompiler->GenerateCommandLine( l_LinkerCmd,
                                               p_BuildTarget,
                                               NULL,
                                               l_OutFileName.GetFullPath(),
-                                              _T("$$(") + l_TargetName + _T(")"),
+                                              _T("$$(") + l_ObjsName + _T(")"),
                                               wxEmptyString,
                                               wxEmptyString );


Seen like a bug. I fetch this patch.

2. Changed the project file to put the cbMakeGen.zip and libcbMakeGen.so in ~/.codeblocks/share/codeblocks/, not in the previous ../../../devel/ala-bala

Ok.

3. Added feature to replace the "$proj_name$" substring in the Makefile name in the options with the name of the project (example: project TestProj (option = Makefile.$proj_name$), result makefile: Makefile.TestPRoj)

I rename $proj_name$ to $(proj_title). Ok.

4. Added mkdir -p command before the compile/link command. (My gcc doesn't create the folders for the object/result files)

I can't check it now. I will check it later.

*5. Added CFLAGS and LDFLAGS variables to the makefile. The values of this variables contain the non expanded options set by the user (for example: `pkg-config --cflags some_lib`). This way the makefile can be used on different machine with different distro/unix installed.

I can't check it now. I will check it later.

I know the patch is very raw and not 100% correct but it works. Any testing and opinions is appreciated.

Thanks you for patch! Great work!

***** Can some C::B dev explain the correct way to get the full compiler/linker options?

I being used Compiler::GenerateCommandLine for get full command line. I can't found another way.

Patch file I does download. Some fixes I apply, another I will see later.

Source repository I do will update later.

Thanks and good luck!
Title: Re: cbMakefileGen plugin
Post by: kisoft on June 04, 2008, 10:37:52 am
Big Thanks to pasgui for binaries & sdk for codeblocks for Linux x86-64. I install codeblocks on my KUbuntu64 7.10 now.

cbMakefeilGen binaries (cbMakefeilGen-0.3.cbplugin) for Linux x86-64 available now on BerliOS (see URL in my sign).

This binaries is my first binaries on Linux. Sorry if what wrong.

Big thanks for bugreports! I test this plugin on my KUbuntu64 7.10 only.

Info: You can subscribe to mail list "Cbmakegen-news" for get an email news about my plugin.

Good luck!
Title: Re: cbMakefileGen plugin
Post by: kisoft on June 04, 2008, 05:17:13 pm
Source repository updated. v0.3.12.2

# Changes into setup dialog:
  + Added $(prog_title) macro for filename and changes in unix.cbp file (thanks oBFusCATed)
     for example you can set filename for Makefile to: Makefile.$(prog_title)
     it was changed to Makefile.cbMakefileGen (for my plugin project)
# Added AnnoyingDialog for check Dependencies function

This repository was used for build Linux x86-64 binaries.

Later I will update Windows version too.

Good luck!
Title: Re: cbMakefileGen plugin
Post by: JGM on June 04, 2008, 10:23:00 pm
great news !  :D
Title: Re: cbMakefileGen plugin
Post by: libfab on June 22, 2008, 12:31:48 am
Hi kisoft
Your plugin is just great, but here is a simple, nasty bug to it: you mistook prerequisite syntax for standard string syntax.
Prerequisites needn't be quoted, because the method to escape whitespace in them is a backlash, not quotes (either simple or double) as in shell string syntax. So for instance:

foo.o: "/path/to/my sofware sources/bar.c"
    commands

yields a crash, and same thing with simple quotes.
You should patch your app to get this instead:

TARGET: path/to/my\ sofware\ sources/bar.c
   commands

a good way to avoid the headache is just to use advanced make syntax (notably string filter functions).

Another hint/request: it would be great to implement the "dependency" feature in your plugin, so that when I compile a project that depends on a library compiled by another project, this lib gets compiled first. This could be done by translating .workspace CB files into make syntax, I think.

Good luck with your work.

PS: attached is a patched Makefile, for a concrete example


[attachment deleted by admin]
Title: Re: cbMakefileGen plugin
Post by: kisoft on June 23, 2008, 08:19:53 am
Thank you for bugreport. I will see for convert filenames to normal form.

Source repository updated. Binaries was updated too (Win32, Dapper x86_64).

v 3.12.3
+ unix.cbp added cb_sdk variable to project file
+ add function ConvertToMakefileFriendly (copyright by mandrav)
# filenames with spaces converted to makefele friendly form (thanks to libfab)

No fullfunctional testing was executed! Simpy testing only on WinXPSP2 & Ubuntu 6.06 x86_64.

Good luck!
Title: Re: cbMakefileGen plugin
Post by: libfab on June 23, 2008, 11:58:32 pm
Another suggestion/request: your makefile presumes the build tree is there to be found, unlike CB's standard build system, which builds ./obj/Release/src and ./bin/Release if required.
I would suggest that you should tweak your code so that the Makefile output has one more do: TARGET like this:

##====================

do:   
   @if test ! -d ./obj ; \
   then\
       echo "Making directory ./obj";\
       mkdir ./obj;\
   else\
       echo "Nothing to be done for directory ./obj";\
   fi;\
   if test ! -d ./obj/Release ; \
   then\
       echo "Making directory ./obj/Release";\
       mkdir ./obj/Release;\
   else\
       echo "Nothing to be done for directory ./obj/Release";\
   fi;\
   if test ! -d ./obj/Release/src/ ; \
   then\
       echo "Making directory ./obj/Release/src";\
       mkdir ./obj/Release/src/;\
   else\
       echo "Nothing to be done for directory ./obj/Release/src";\
   fi;\
   if test ! -d ./bin ; \
   then\
       echo "Making directory ./bin";\
       mkdir ./bin;\
   else\
       echo "Nothing to be done for directory ./bin";\
   fi;\
   if test ! -d ./bin/Release ; \
   then\
       echo "Making directory ./bin/Release";\
       mkdir ./bin/Release;\
   else\
       echo "Nothing to be done for directory ./bin/Release";\
   fi
## ============================

and you should prepend the prerequisites of the Release target with do like this:

## ============================

Release: do bin/Release/(name of program)

## ============================

This shell patch was tested to work fine. I don't have time to make a c++ patch right now but it should be fairly easy I think.

Best, Fab

PS: You'll find the whole patched Makefile.gen attached
   


[attachment deleted by admin]
Title: Re: cbMakefileGen plugin
Post by: kisoft on June 24, 2008, 08:36:40 am
You right, I can copy this block from makefilegenerator.cpp (author mandrav). hmm..
I can do this later, I have a lot work now.

Can you test a last changes? How work?

Good luck!
Title: Re: cbMakefileGen plugin
Post by: libfab on June 24, 2008, 01:29:48 pm
Your latest svn release to date works fine. I just have two suggestions (see my messages above), one about dependency-tracking and one about building trees.
Best, Fab
Title: Re: cbMakefileGen plugin
Post by: kisoft on June 24, 2008, 01:45:41 pm
ok. I'll be back  :D
Title: Re: cbMakefileGen plugin
Post by: mess-mate on December 09, 2008, 06:32:30 pm
Hi kysoft,
i've compiled the trunk version and it compiled as a charm on my debian/lenny distro.

But i can't no more use the 'Environment' settings of C::B.
C::B crash immediately when i want enter 'Environment'   :(

Any clue about it ?
Title: Re: cbMakefileGen plugin
Post by: MortenMacFly on December 10, 2008, 07:43:02 am
i've compiled the trunk version and it compiled as a charm on my debian/lenny distro.
C::B crash immediately when i want enter 'Environment'   :(
You most likely did not run the update script that updates the resources.
Title: Re: cbMakefileGen plugin
Post by: mess-mate on December 10, 2008, 05:58:58 pm
Quote
You most likely did not run the update script that updates the resources.

What update do you mean ? C::B or the makegen resources ?
I run the last svn C::B version.
And i've downloaded and compiled http://svn.berlios.de/svnroot/repos/cbmakegen/trunk/ (http://svn.berlios.de/svnroot/repos/cbmakegen/trunk/)
Title: Re: cbMakefileGen plugin
Post by: mmkider on February 03, 2009, 04:28:40 am
cbMakefileGen can't generate makefile in rev r5432 of codeblocks ( The 02 February 2009 build (5432) is out.)

 :(




[attachment deleted by admin]
Title: Re: cbMakefileGen plugin
Post by: kisoft on February 03, 2009, 10:19:08 am
Wait, please, I being try this on rev. 5435. I being compiled it now.
Thanks for bugreport.
Good luck!
Title: Re: cbMakefileGen plugin
Post by: kisoft on February 03, 2009, 11:45:48 am
I check this problem on cbMakefileGen version: 0.3.12.3. C::B rev.5435.
I have no problem.

History:
I does loading my cbMakefileGen project (cbmakegen.cbp).
"Build target: default" was selected after loading. (I don't change it).
I does select from menu: Project / Generate Makefile
Ok. Makefile was created normally.

If you have problem, send me (on email) your project WITHOUT source files. (file .cbp only) I will try help you.
Good luck!
Title: Re: cbMakefileGen plugin
Post by: mmkider on February 03, 2009, 12:43:10 pm
I check this problem on cbMakefileGen version: 0.3.12.3. C::B rev.5435.
I have no problem.

History:
I does loading my cbMakefileGen project (cbmakegen.cbp).
"Build target: default" was selected after loading. (I don't change it).
I does select from menu: Project / Generate Makefile
Ok. Makefile was created normally.

If you have problem, send me (on email) your project WITHOUT source files. (file .cbp only) I will try help you.
Good luck!

Sorry,it is no problem after I rebuild cbMakefileGen in the rev5435 of codeblocks.

Other question.
I try to output a makefile of codeblocks.cbp(codeblocks project file).
I get a crash.
Thank you for your reply.
 :D
Code: [Select]
Error occured on Tuesday, February 3, 2009 at 19:43:19.

D:\CB_Pack\codeblocks_debug\codeblocks.exe caused an Access Violation at location 61a1b446 in module D:\CB_Pack\codeblocks_debug\codeblocks.dll Reading from location 0000002c.

Registers:
eax=0000002c ebx=00000001 ecx=11b5b52c edx=0023e940 esi=001e0344 edi=0023fa0c
eip=61a1b446 esp=0023e760 ebp=0023e760 iopl=0         nv up ei pl nz ac po nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00010216

Call stack:
61A1B446  D:\CB_Pack\codeblocks_debug\codeblocks.dll:61A1B446  _ZNK12wxStringBase13GetStringDataEv
619BF636  D:\CB_Pack\codeblocks_debug\codeblocks.dll:619BF636  _ZN12wxStringBaseC2ERKS_
61A144CE  D:\CB_Pack\codeblocks_debug\codeblocks.dll:61A144CE  _ZN8wxStringC1ERKS_
61886E5F  D:\CB_Pack\codeblocks_debug\codeblocks.dll:61886E5F  UnixFilename(wxString const&)  D:/CB_Pack/codeblocks_debug/SDK/CodeBlocks_src/src/sdk/globals.cpp:164
0A2C2CAE  D:\CB_Pack\codeblocks_debug\share\codeblocks\plugins\cbMakefileGen.dll:0A2C2CAE
0A2C353C  D:\CB_Pack\codeblocks_debug\share\codeblocks\plugins\cbMakefileGen.dll:0A2C353C
0A2C5723  D:\CB_Pack\codeblocks_debug\share\codeblocks\plugins\cbMakefileGen.dll:0A2C5723
0A2C8CEF  D:\CB_Pack\codeblocks_debug\share\codeblocks\plugins\cbMakefileGen.dll:0A2C8CEF
0A2C9C25  D:\CB_Pack\codeblocks_debug\share\codeblocks\plugins\cbMakefileGen.dll:0A2C9C25
Title: Re: cbMakefileGen plugin
Post by: MortenMacFly on February 03, 2009, 01:21:14 pm
I try to output a makefile of codeblocks.cbp(codeblocks project file).
I get a crash.
I don't get a crash but an error message "C::B MakefileGen found errors, saves aborted.".
Actually this doesn't help very much as I don't know what the actual error is - but it might be related.
Title: Re: cbMakefileGen plugin
Post by: xiq on March 24, 2009, 01:06:10 pm
Hi there,

People who have found their way to this thread might be interested in a Python script I wrote to generate Makefiles from Code::Blocks project files. I am only testing it with the OpenFrameworks.cc projects but I think I made it in a way that it should be useful for general use.

http://pix.test.at/wiki/cbp2makefile

pix.
Title: Re: cbMakefileGen plugin
Post by: lkraider on May 13, 2009, 05:43:13 pm
The python script idea is awesome. I could never get the plugin to run, since I don't use codeblocks from the svn.

After I hacked the script a bit, it generated a Makefile for my project, but it didn't work for compiling yet. I will try to hack it a bit more to generate a working makefile here :)
Title: Re: cbMakefileGen plugin
Post by: rah2435 on October 28, 2009, 03:21:14 pm

This is JUST the plugin I need.  Is it still available?   If so, how can I get it?

thanks,
rich
Title: Re: cbMakefileGen plugin
Post by: Svenstaro on November 14, 2009, 04:11:46 am
Can we get this merged now? http://svn.berlios.de/svnroot/repos/cbmakegen/trunk/ is still available and it seems like a good plugin. It's been some time too!
Title: Re: cbMakefileGen plugin
Post by: oBFusCATed on November 16, 2009, 01:55:33 pm
It is pretty unreliable, unfortunately....
I've modified it, to make it generate the correct files :(
Title: Re: cbMakefileGen plugin
Post by: MortenMacFly on November 16, 2009, 04:31:00 pm
I've modified it, to make it generate the correct files :(
...patch?! ;-)
Title: Re: cbMakefileGen plugin
Post by: kisoft on November 16, 2009, 05:05:43 pm
No problem. Anybody can join to my project development.
EMail me
Title: Re: cbMakefileGen plugin
Post by: Svenstaro on November 16, 2009, 06:44:46 pm
So no merge? :/
Title: Re: cbMakefileGen plugin
Post by: kisoft on November 16, 2009, 09:08:10 pm
Svenstaro Sorry, I don't understand you. Whats mean "merge"? I have no time for support my project.
Title: Re: cbMakefileGen plugin
Post by: Svenstaro on November 17, 2009, 04:48:58 am
I'd find it easier if the Makefile plugin was included into the main project so that they are not separate anymore. This is called merging.
Title: Re: cbMakefileGen plugin
Post by: stahta01 on November 17, 2009, 04:53:42 am
I'd find it easier if the Makefile plugin was included into the main project so that they are not separate anymore. This is called merging.

Will you maintain the code?

If not, without an maintainer with the time to work on the plug in I see no way for the Makefile plugin to be added to the Code::Blocks contrib.

Tim S.

Title: Re: cbMakefileGen plugin
Post by: dje on November 17, 2009, 08:06:25 am
I'd find it easier if the Makefile plugin was included into the main project so that they are not separate anymore. This is called merging.
I personnaly don't use this plugin even if I see its benefits in many situation.
I prefer a small exe with core functionalities and extra ones implemented in plugins to configure the IDE the way I like.

Dje
Title: Re: cbMakefileGen plugin
Post by: Svenstaro on November 17, 2009, 08:56:49 am
I'll look into maintaining it and get back to this thread when I have examined the situation. I'm working on a plugin (not for makefiles) of my own so it might actually be a help for me.

dje, the idea is to make this a plugin like any other which should not become an integral part of the main application. However, it should be included in the main distribution.
Title: Re: cbMakefileGen plugin
Post by: dje on November 17, 2009, 11:12:16 am
dje, the idea is to make this a plugin like any other which should not become an integral part of the main application. However, it should be included in the main distribution.
= core or contrib plugin ;)
Title: Re: cbMakefileGen plugin
Post by: oBFusCATed on November 17, 2009, 09:30:46 pm
I've modified it, to make it generate the correct files :(
...patch?! ;-)
It is too specific and I don't maintain it any more :(

If someone fixes all the bugs, probable the contrib is good place for it.
Title: Re: cbMakefileGen plugin
Post by: Halan on April 01, 2010, 01:35:11 am
Any Updates on this? Makefile generation is a big feature that i miss in code::blocks...
Title: Re: cbMakefileGen plugin
Post by: kisoft on April 07, 2010, 11:31:43 am
Any Updates on this? Makefile generation is a big feature that i miss in code::blocks...
You can install plugin your self. Download binary and install it.
Any problems?
Title: Re: cbMakefileGen plugin
Post by: meeba on May 10, 2010, 08:39:09 pm
There is a problem. Due to recent updates from CB. The plug in, no longer works. You'll get a incompatible error.
Title: Re: cbMakefileGen plugin
Post by: grischka on May 11, 2010, 02:15:24 am
Any Updates on this? Makefile generation is a big feature that i miss in code::blocks...

There is also the standalone conversion tool cbp2mak:
http://forums.codeblocks.org/index.php/topic,9731.msg69835.html#msg69835

It used to work for the cb project itself (unix & windows), maybe still does.
Title: Re: cbMakefileGen plugin
Post by: Sasquatch_47 on June 10, 2010, 05:50:43 pm
I am currently running Fedora 12 with SVN build of CodeBlock 10.05 and cbMakeFileGen_03.11.10. I ran into a couple of problems generating a Makefile for multiple build configurations.

Problem 1: @g++  -o bin/Debug/SomeProject $(Debug) was returning an error for g++ "no input files"
After looking at the source I found that line 358 in Makefile.cpp was using l_TargetName as a command argument instead of l_ObjsName.

Problem 2:  OBJS_RELEASE includes both Debug and Release objects.
Solved problem by adding m_Objs.clear(); on line 384 of Makefile.cpp see the attached source for changes. I renamed the Makefile.cpp to Makefile.txt in order to be able to attach it.

I no longer am having issues so I figured I would pass this on.

[attachment deleted by admin]
Title: Re: cbMakefileGen plugin
Post by: kisoft on June 10, 2010, 08:36:43 pm
Sasquatch_47 Thank you. I will try check this problem and build new version for CB 10.05.
meeba Thanks for report. I try check this problem.
Title: Re: cbMakefileGen plugin
Post by: kisoft on June 11, 2010, 12:22:49 pm
release 0.3.12.4. Fix by Sasquatch_47 and compiled for CB 10.05 (really for svn 6333).
Win32 only, Linux was later.
Source repository updated too. rev.24


release 0.3.12.5. Win32 binary and update source repository. Fixed bug with virtual targets.

release 0.3.12.4 binaries deleted now.

Good Luck!

Title: Re: cbMakefileGen plugin
Post by: turbosnail on December 17, 2014, 09:00:37 pm
maybe I nekroposter, but after moving project berlios, sources become unavailable
Title: Re: cbMakefileGen plugin
Post by: LETARTARE on December 17, 2014, 09:16:30 pm
http://sourceforge.net/projects/cbmakegen.berlios/
Title: Re: cbMakefileGen plugin
Post by: turbosnail on December 17, 2014, 11:35:38 pm
http://sourceforge.net/projects/cbmakegen.berlios/

i found src code but it from 2007. last commit wa at 2010.

Quote
cbMakefileGen_src_0.1.zip
Title: Re: cbMakefileGen plugin
Post by: stahta01 on December 18, 2014, 02:06:56 am
http://sourceforge.net/projects/cbmakegen.berlios/

i found src code but it from 2007. last commit wa at 2010.

Quote
cbMakefileGen_src_0.1.zip

This ones 2012 dated.
http://sourceforge.net/projects/cbp2make/files/ (http://sourceforge.net/projects/cbp2make/files/)

Tim S.
Title: Re: cbMakefileGen plugin
Post by: kisoft on December 19, 2014, 11:26:56 am
Hello!

Last Sources URL: https://github.com/kisoft/cbmakefilegen (https://github.com/kisoft/cbmakefilegen)

Good luck!