User forums > Using Code::Blocks
cbp2make - makefile generation tool
mirai:
Update: (see rev.80)
[*] Fixed commands-only type of targets so they no longer generate rules for object files and binary output, clean_* rules will not be generated for this type of targets either.
[+] Doxygen-style documentation is in progress...
blinde:
Hi.
Just made a first test with cbp2make.
Generated makefile works but there is no .h dependencies management ?
Or I missed something ?
Thanks
Chris
mirai:
--- Quote from: blinde on March 24, 2011, 11:15:29 am ---Just made a first test with cbp2make.
Generated makefile works but there is no .h dependencies management ?
Or I missed something ?
--- End quote ---
No, you haven't missed anything. I intentionally don't generate dependencies for non-compilable files. However, this may be wrong for some cases like forcing make to rebuild the project when a .h file changes. Just let me know if I'm really wrong at this point and I will fix the issue. I guess I have to (at least optionally) generate dependencies for all project files including non-compilable and/or especially treat C/C++ case with .h/.c pairs.
blinde:
--- Quote from: mirai on March 24, 2011, 03:40:23 pm ---I intentionally don't generate dependencies for non-compilable files.
--- End quote ---
Hum... Don't understand.
I have a test.c file.
test.c include test.h
test.c is a compilable file.
I think that there should be a dependency between test.c & test.h.
I don't know what is the purpose of cbp2make
1- it is just a workaround to temporary build a CB project in console mode.
So we accept the requirement of doing make clean; make all when I want to rebuild.
In this case I understand that we can forget dependencies.
2- cbp2make shoud really generate some makefile that are fully usable and that will replace the build made in CB
In this case, dependencies are mandatory (make clean; make all take 20mn on my project...)
Thanks
Chris
mirai:
--- Quote from: blinde on March 24, 2011, 04:10:03 pm ---
--- Quote from: mirai on March 24, 2011, 03:40:23 pm ---I intentionally don't generate dependencies for non-compilable files.
--- End quote ---
Hum... Don't understand.
I have a test.c file.
test.c include test.h
test.c is a compilable file.
I think that there should be a dependency between test.c & test.h.
--- End quote ---
test.h does not produce an object file, therefore, it is not a dependency for target binary.
However, it is a dependency of test.c ... and should be somehow taken into account.
--- Quote from: blinde on March 24, 2011, 04:10:03 pm ---I don't know what is the purpose of cbp2make
1- it is just a workaround to temporary build a CB project in console mode.
So we accept the requirement of doing make clean; make all when I want to rebuild.
In this case I understand that we can forget dependencies.
--- End quote ---
The purpose is to build CB projects when CB is missing and cannot (should not) be installed by any means.
It is not just a workaround, even if it may seem so, because one of requirements is not depending on CB presence at all.
I think that it is possible to even make a complete build system out of cbp2make, i.e.,
to eliminate use of 'make' tool at all in some cases and run other build tools directly.
--- Quote from: blinde on March 24, 2011, 04:10:03 pm ---2- cbp2make shoud really generate some makefile that are fully usable and that will replace the build made in CB
In this case, dependencies are mandatory (make clean; make all take 20mn on my project...)
--- End quote ---
Yes, that is my intention, i.e., fully usable makefiles.
Let me remind that cbp2make is still in alpha stage, and many necessary things are missing yet.
Never the less, thank you for paying attention to my efforts, I will try to fix this .h/.c problem.
One thing that bothers me about this kind of dependencies is that they are not contained in CB project.
I will probably have to scan source files and search for include directives and pay attention to other preprocessor directives... this may become a real problem.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version