Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development

cbMakefileGen plugin

<< < (21/29) > >>

libfab:
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]

kisoft:
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!

libfab:
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]

kisoft:
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!

libfab:
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

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version