Posts Tagged ‘Automagical make template’


GNU make meets Visual Studio (automagical make part 5)

Another automagical step!

I’ve split up the one makefile into more manageable pieces, organized for easier reference and better topical coherence. I’ve reinstated the support also for CMD.EXE (in addition to Cygwin/bash and Linux), and introduced the Visual Studio C/C++ compiler in parallel to GCC.
All with updated documentation as usual in a neat package. It’s not ready yet, but we’re getting there.

Take a look at http://www.bezem.de/i_make.html.

Happy making!

Johan


GNU make learns how to compile (automagical make part 4)

I’ve created the next instalment of my makefile template, available at http://www.bezem.de/i_make.html. In this instalment, I show how to call the compiler (for now, only GCC using cygwin), how the ‘vpath’ is working, provide a simple ‘clean’ target, and show a few tricks.

Happy making!

Johan


Automagical make: 3rd instalment

After providing some (empty) source files in the directory tree, I taught the template to create object files, albeit still using ‘touch’ instead of a real compiler. That will have to wait for one of the coming instalments. Look at http://www.bezem.de/i_make.html

Happy making!

Johan


Automagical make: 2nd instalment

Magic make learns to crawl. It still doesn’t do much, but it now switches over from the source tree to the objects’ tree to traverse the source tree from a created parallel ‘universe’ where the intermediate files shall reside. Again, a PDF grown to 10 pages, as well as the latest directory-copy for you to follow along, available at http://www.bezem.de/i_make.html.

Happy Making!

Johan


Gone is the build-system-maintenance-nightmare

OK, to be honest: It isn’t quite gone. But it’s become very small, and no longer a nightmare.

You ask why? Because it now operates automagically.

You ask how? By deducing what directories contain relevant sources, by finding out where the include directives are located, by compiling all sources it can (or is allowed to) find, and create an executable for that. Or more than one. Or a library.

You ask where? Well, here: http://www.bezem.de/i_make.html

I’ve started documenting a make structure based on GNU make, with little else in form of utilities (one of my own will be presented with full source code), automating most of the build process itself.

  • platform-independent using GNU make
  • no more makefile-maintenance to add files or directories
  • multiple versions in one project tree, keeping the sources together while separating the intermediate files as well as the results
  • full dependency checking included, automatically
  • dependencies between directories can be indicated and will be observed
  • hardly slower than running a flat makefile, just as fast as a normal recursive make

OK, where’s the catch, you ask? No catch. This system has been up and running in at least three development locations, on Solaris, HP-UX, AIX, Windows 2000, Windows XP, with and without Cygwin, using a variety of compilers (including GCC and Microsoft VC++), with implementations for various assembler languages, C, C++, lex/yacc and IDL.

If there is a catch it is this: I’ve now started documenting the system and the concepts in a way for developers to understand the reasoning (I have documentation on the innards as well as for the user, but too specific for publication), and for others to tailor the ideas to their environments, if necessary. And, sadly, that work has just started.

The first installment is online, illustrating how GNU make can find the directories intended to be included in the build by looking (recursively, with arbitrary depth) for directories containing a file called ‘Makefile’, and illustrating how to represent dependencies between sibling-directories that even will be honored by parallel-make.

Maybe not much, but then, more is to come, so register here, or watch the RSS!

Happy Making!

Johan