0

I am developing a C++ application on Ubuntu. The application consists of several modules, each with its makefile.

I want to have a customised command line build process that does the following:

  1. checks code out from a repository (for specified branch/tag)
  2. builds the app (release or debug as specified)
  3. logs any errors etc

I am too lazy to learn Perl (I tried before, but cant seem to get my head around it). Are there any (preferably open source) tools anyone can suggest, or maybe a simpler scripting languuage - or do I really have to learn Perl?

4 Answers 4

1

Have a look at Hudson (or any other Continuous Integration tool).

Sign up to request clarification or add additional context in comments.

Comments

1

You could try out Scons. It is pretty straightforward if you know a little Python (and if you don't Python is pretty easy to pick up).

Comments

1

A shell script should do for your immediate needs.

bash is pretty powerful, and I think that's what I would use.

Comments

1

You can use GNU make for that.
Basically, something like:

all: update compile

update:
    svn update

compile:
    gcc ...

The target all depends on update (which updates the working copy from the repository), and on compile, which will be the target for compiling your code.

You can also use a variable to specify the compile type (debug or release), that you will use to change the way your files are compiled.
Make variables can be overrided from the commande line, when you invoke make.
So for instance, "make" will build the debug version, and "make TYPE=release" will build the release version, assuming you defined a variable named "TYPE" for that. the targets.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.