Johan Bezem ist Mitglied bei
Archive for June, 2008
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
Heads-up: Gimpel released patch version 8.00x
If you’re not a regular reader of the Gimpel forum on PC Lint, please be aware that Gimpel released the next patch version of PC Lint, 8.00x. Several smaller errors are fixed, some support files have been updated (don’t forget the read80.txt and the bugfix80.txt).
And finally, support for Visual Studio 2008 is added.
If you’re a user, have a look at the patches page.
Happy Linting!
Johan
If you’re serious about GNU make, you have to read this
For easy reference, I’ve composed some links to websites you need to know about if you do more than just tweak some GNU makefiles.
First, there’s the source of all:The project’s pages on Savannah as maintained by Paul D. Smith, and the manual in PDF as published by the FSF.
The next resource is the website of Paul D. Smith himself, with some links, but especially the white papers are gold.
And the I’ve recently (re-)discovered Mr. Make, John Graham-Cumming: A column at CM Crossroads especially on GNU Make and its surroundings. I need not always share his opinion to value his tips and tricks.
Brad Appleton in his blog collected several links on the (dis-)advantages of recursive make, it’s good to know the reasoning behind the topics, as well as the proposed solutions.
And, of course, even though it has been linked many times already, the paper that gave birth to my project (but to prove it wrong!), “Recursive Make Considered Harmful”, 1997 by Peter Miller.
Start with GNU make and its manual, take Paul’s white papers to get it right, take John’s tips to make it better and more efficient, and see for yourself what can be done using my concept ;-)
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
Updated version of “How to wield PC Lint”
With some more experience from some different environments, I have felt the need to update my document on “How to wield PC Lint”. The main changes I made to the document:
- the Gimpel-provided compiler support files ‘co-*.lnt’ may be a fair starting point, but certainly not the final word;
- I changed the name for my output file to ‘lintout.out’, for one project the names ‘error’ and ‘errors’ were already in use, and using the extension ‘lnt’ doesn’t seem a good idea anymore;
- I now use quotes around the filename for Lint’s output messages, to accommodate environments using spaces in path names;
- I added a warning about suppressing errors numbered less than 400;
in addition to some small corrections.
Have fun!
Johan
Deutsch
English
Nederlands