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


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


To be able to use ccbuild, you as a developer will have to adhere to some strict(er) rules then using something like autotools. Here is a list of things you should keep in mind when moving to ccbuild.


5.1 Strictness to adhere to


5.2 Setting up your configuration file

To set up your ccResolutions file, it's best to do the following steps:

  1. Check your local includes span over your whole source

    To make sure ccbuild was able to follow your local includes, use the deps command. This will list all the local and global dependencies of a file. You may also use the dot command to get a graphical interpertation of the same information.

    All paths that ccbuild needs to search for local includes should be added to the first line of your ccResolutions file. Using -l in this first line will make ccbuild highlight all compiler output.

         	#& -I../tools -I. -l
    
  1. Add packages to your global ccResolutions

    You can add a package to your global resolution configuration using the genPkgconfigList.sh tool. This will find all files in the include path of a package's include paths and add them to a resolution file. See the Tools section for more information.

  1. Check the global includes are resolved

    To make sure the global includes are resolved, use the resolve command.

         	ccbuild resolve |sort >> ccResolutions
    

    Now all unresolved global headers are listed in your ccResolutions file. When you run ccbuild now, it won't complain about any global includes missing. However, g++ might complain because the needed extra arguments aren't in place. You should now add the needed arguments to your ccResolutions file by using, for example, `pkg-config --cflags --libs <packagename>` with the needed packagei in place.

    If you have a lot of resolution rules in your defaults (~/.ccbuild/), then it might be hard to see what your project actually depends on. Passing ccbuild the option --nodefres will cause it to skip loading these files and will allow you to see which resolutions fail. This might give you some hints on what packages your program depends on.


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


ccbuild - A strict developer's build utility

1.5.7

A. Bram Neijt