Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - How can automated builds be set up with 4.5?: (5 Items)
   
How can automated builds be set up with 4.5?  
What is the recommended way to set up an automated build?  For example, a cron job type of thing where the system kicks 
off a nightly build.

In 4.0.1, a Standard Make project could be used, and the system could simply be instructed to call 'make' on the 
required makefile.  What is the new way to do this?

Thanks,

--Chris Foran
Post Deleted
Re: How can automated builds be set up with 4.5?  
There are hreedifferent schemas I can see on the surface.
1. Using of container projects. This option could be convenient
for those who use a big code base. They could group projects into containers.
Container is a holder of various projects (amoung them could be other
containers as well). THis is a user's decision how to combine projects into container. For  example third-party service 
libraries could be assembled in
one container. Each container has  a set of different build
configurations (this is almost the  same as assigning make targets such as debug, release
etc.). To build the whole workspace they could just launch a root container
build specifying configuration  This structure should be  mirrored into command
line build. To provide this, insert special make file into top
container's root directory The content looks like that:

<configuration_1>  :
      cd ../Child_Container_1/... ; make<target name>
      cd ...
      ...
      cd ../Child_Project_k/...,make<target name>
      ...
<configuration_n>  :
Launching make for the top container Makefile cause the built of whole
configuration. Please take in account that trying to be reasonably boring I
skip some  less important issues from this description.

2. Using of mksbp utility (yes it is still there:-)

3. Using regular make files. They are still available, but I'd
postpone observation to my next message.





Chris Foran wrote:
> What is the recommended way to set up an automated build?  For example, a cron job type of thing where the system 
kicks off a nightly build.
>
> In 4.0.1, a Standard Make project could be used, and the system could simply be instructed to call 'make' on the 
required makefile.  What is the new way to do this?
>
> Thanks,
>
> --Chris Foran
>
> _______________________________________________
> General
> http://community.qnx.com/sf/go/post13371
>
>    

Re: How can automated builds be set up with 4.5?  
The first option using container project does work very well from inside the IDE.

BUT using the make on the command line does not work (because Makefile is missing):

D:\Code\lib\lib__container>make
make: *** No targets specified and no makefile found.  Stop.

D:\Code\lib\lib__container>make build
make: *** No rule to make target `build'.  Stop.

D:\Code\lib\lib__container>make -n clean
make: *** No rule to make target `clean'.  Stop.


Therefore I have looked at the build for the QNX core os and found that it uses a Makefile on each level of the source 
code hierarchy. This makefile recurse the subdirectories. So it is possible to build all the project in the different 
sub directories.

I am very happy with this way as it is possible to use the command line build and the IDE build in parallel. The IDE may
 be used to customize the individual project, e.g. to add additional include directories. These are used within the IDE,
 but not from the command line make. The problem is that the properties dialog of the QNX C++ project adds this 
definition:

EXTRA_INCVPATH+=$(PROJECT_ROOT_lib_std)

This is not replaced from the command line. Changing this manually to
EXTRA_INCVPATH+=$(PROJECT_ROOT)/../../lib/std
does work.

Are there any macros available that are performing this substitution on my behalf?

Is there an alternative to use the same common.mk from IDE 4.5 and from command line make?

The same problem applies to EXTRA_LIBVPATH, too.
Re: How can automated builds be set up with 4.5?  
Using of PROJECT_ROOT macro is not a general solution. It works only 
when your project you reference to is located in workspace. As long as 
Momentics lets you to cretate project anywhere, we use another 
macros.The recommended way is to create extra file with this definitions:
PROJECT_ROOT_lib1=$(PROJECT_ROOT)../lib1  # if you project and 
dependency live in workspace
PROJECT_ROOT_lib_other=F:\libs/lib_other # for references out of workspace

Then add to this extra make file  launch of you "root" make file or add 
environment variable MAKEFILE=your_extra_file_cretaed_on the _previous_step.

On 14/10/2008 5:24 AM, Christian Leutloff wrote:
> The first option using container project does work very well from inside the IDE.
>
> BUT using the make on the command line does not work (because Makefile is missing):
>
> D:\Code\lib\lib__container>make
> make: *** No targets specified and no makefile found.  Stop.
>
> D:\Code\lib\lib__container>make build
> make: *** No rule to make target `build'.  Stop.
>
> D:\Code\lib\lib__container>make -n clean
> make: *** No rule to make target `clean'.  Stop.
>
>
> Therefore I have looked at the build for the QNX core os and found that it uses a Makefile on each level of the source
 code hierarchy. This makefile recurse the subdirectories. So it is possible to build all the project in the different 
sub directories.
>
> I am very happy with this way as it is possible to use the command line build and the IDE build in parallel. The IDE 
may be used to customize the individual project, e.g. to add additional include directories. These are used within the 
IDE, but not from the command line make. The problem is that the properties dialog of the QNX C++ project adds this 
definition:
>
> EXTRA_INCVPATH+=$(PROJECT_ROOT_lib_std)
>
> This is not replaced from the command line. Changing this manually to
> EXTRA_INCVPATH+=$(PROJECT_ROOT)/../../lib/std
> does work.
>
> Are there any macros available that are performing this substitution on my behalf?
>
> Is there an alternative to use the same common.mk from IDE 4.5 and from command line make?
>
> The same problem applies to EXTRA_LIBVPATH, too.
>
>
> _______________________________________________
> General
> http://community.qnx.com/sf/go/post14927
>
>