[ previous ] [ Contents ] [ 1 ] [ 2 ] [ 3 ] [ 4 ] [ 5 ] [ 6 ] [ A ] [ B ] [ next ]


ccbuild - A strict developer's build utility
Chapter 5 - Moving from ccbuild


There will be a day you want to move away from ccbuild. When the day comes, you would probably only be able to use ccbuild for it's dependency generation commands.

To make ccbuild useful in these later stages, ccbuild has a few commands to help you cope. Don't forget, you can remove all ccbuild generated files using:

     	ccbuild distclean;
     	rm ./ccResolutions;

The build script generation commands only read source and, should not generate any output.


5.1 General build file generation

ccbuild can generate a number of different files for different build systems. When you call ccbuild with a build generation command without a source file, it will try to create a standalone file for that build system. Which will also contain an all rule.

For most systems however, you don't want the all rule to be defined. So, ccbuild allows you to state which source you want a build file for. This will then generate a build file without the all rule. Then simply include this build file into your main build file and write the all rule yourself.


5.2 Generating A-A-P files

One of the most useful generation features is probably the A-A-P file generation. You can use this by calling ccbuild with the aap command. This will generate an A-A-P file on the stdout.

The most common way of using this aap file is by generating it for a single binary target using:

     	ccbuild aap mainsource.cc > mainsource.aap

Or

     	ccbuild aap src/mainsource.cc > mainsource.aap

Then create a main.aap file with the following line:

     		:include mainsource.aap
     		
     		all : ./mainsource

Or

     		:include mainsource.aap
     		
     		all : ./src/mainsource

Add any recipes needed and then use aap to generate the main program.


[ previous ] [ Contents ] [ 1 ] [ 2 ] [ 3 ] [ 4 ] [ 5 ] [ 6 ] [ A ] [ B ] [ next ]


ccbuild - A strict developer's build utility

2.0.2

A. Bram Neijt