views:

895

answers:

8

As good developers we keep our code as standard compliant as possible to help in porting between platforms. But what tools are available that help us build the code in a uniform way across multiple platforms.

*nix family has make but Windows needs nmake.

I have read about SCons but never used it in anger. What is your favorite build tool, why do you find it effective and are there any limitations (i.e. platforms with bad support etc).

Cross platform IDEs as well.

+2  A: 

I personally use ant, rake, and maven2. I have used ant the most and find it great for several reasons:

  • Because it is java it works on lots of platforms (without changing any scripts)

  • The build files are written in XML and fairly easy to write

  • There are lots of 3rd party extensions available for it and it is easy to write plugins for

Josh Moore
A: 

If you're in the Java world, there are quite a few tools which are cross-platform. Apache Ant and Maven are both build tools which will run on any platform which has Java available for it.

Cruise Control (continuous integration tool) also works on Windows and Linux (it's written in Java as well).

I haven't had any real issues with the core tools, the only problems I've sometimes had have come from things external to the build process, i.e. publishing artifacts - this will vary between systems so I've found there's no single way of setting it up.

Phill Sacre
+1  A: 

cmake for c/c++ environments is good. http://www.cmake.org/

A: 

we do extreme cross development, and our code runs on linux, windows ce, windows 2K, nucleus and uCOS-II. since each environment uses different 'make' methodology (out nucleus customer, for example, require us to compile via code-warrior GUI).

i used ANT combined with perl for about 2 years, but this lead the build script to total non-maintainability.

now we moved to use python, which increase the maintainability of the scripts.

bottom line, i did not find a ready-made tool, and had to build my own. maybe, when i have some time (2017 ?) i will pack my scripts and distribute them ....

Noam
So you have never found a CI product that works cross platform?
Tim
A: 

For C/C++ development, I've found that bakefile works well. The fairly large wxWidgets project, a cross-platform cross-platform utility and UI library, uses it for their build file generation.

Bakefile is cross-platform, cross-compiler native makefiles generator. It takes compiler-independent description of build tasks as input and generates native makefile (autoconf's Makefile.in, Visual C++ project, bcc makefile etc.).

Bakefile's task is to generate native makefiles, so that people can keep using their favorite tools. There are other cross-platform make solutions, but they either aren't native and require the user to use unfamiliar tools (Boost.Build) or they are too limited (qmake).

Burly
A: 

You can use gmake on Windows as well with cygwin/minGW or build your windows stuff on Linux. http://cdtdoug.blogspot.com/2009/05/mingw-cross-for-linux.html

robert.berger
A: 

There are tools like Opus Make or MKS Toolkit that offers multiplatform and support. If you have an existing codebase of make script, could be easier migrate to one of there. I suspect you may hunt for similar tools in advertising of DDJ magazine.

Giulio Vian
A: 

We've been running a Java environment for Linux, Windows and the Mac for the last 18 months.

  • Maven 2 drives our builds, it's pretty easy to get things consistent here. Where M2 plugins don't dare to tread, we use small Ant scripts.
  • IDE-wise we're using Eclipse & IDEA - both, of course, multi-platform.
  • Testing - JUnit, Fitnesse, Fest - all nicely multi-platform.
  • Release scripts are written in Ruby. There's a bit more trouble with Windows here, but a function to convert paths as necessary generally does the trick.
  • TeamCity does CI. We've actually migrated this from Windows to Linux and encountered no errors at all, very nice package.

We did use GWT for a while and this did cause us large amounts of pain. Be careful if you swing that way.

James