I’d like to validate my hand-written makefiles, to make sure they work as intended on a variety of platforms. Is there a utility I can use to warn me of idiosyncrasies that might get in the way?
I’d like to validate my hand-written makefiles, to make sure they work as intended
Share
Not as far as I’m aware of.
The best thing to do is respect the old rule “port early; port often”. Try building your application on other platforms as soon as possible, and re-do it whenever you have the opportunity. That’ll shake out portability bugs in your code, and validate the Makefile as a side-effect.
That said, it’s wise to limit yourself to conservative Makefile features as much as possible. You might want to look at the POSIX make manpage (though I’d advise you to use the
%.foo: %.barrules rather the nominally standard.bar.foo:rules), and the portable make programming section of the autoconf manual is full of good advice.Oh, and you know that autoconf is a Good Thing, yes?