Re: [The good, the bad and] The Ugly -- the cosmetic rant
On Sun, Dec 16, 2001 at 07:52:49PM +0100, Gergely Nagy wrote:
> Quoting from debian/rules:
>
> ,----
> | configure: configure-stamp
> | configure-stamp:
> | dh_testdir
> | # Add here commands to configure the package.
> | ./configure --prefix=/usr
> | touch configure-stamp
> `----
>
> There are two issues here. First, the configure-stamp target is
> unneeded, configure generates config.status, which can be used as a
> stamp file.
What happens if the configure command fails? config.status will be
there, all right, but the configure target will not have completed
successfully. So if you use config.status as a stamp file, you'll be
stuffed.
> Second, the comment above the ./configure line - as added
> by dh_make, I presume - does not bear any value once the template is
> filled out, since you don't have to add anything anymore. Compare this
> with TeX markup in a printed book, it's almost the same thing.
Comments are good. Compare this to commenting your source code; after
all, once you've written it, you don't need to know what it does any
more, right? So this comment is a bit redundant -- big deal: it could
help someone one day.
> The same stands for most of the targets too.
And so do my comments.
> Another bad example is this:
>
> ,----
> | # Build architecture-independent files here.
> | binary-indep: build install
> | # We have nothing to do by default.
> `----
Good example. I recently changed a package from arch: all to arch:
any and back again, and was very appreciative to have these comments
lying around. And as a policy maintainer, I do know this stuff well;
nevertheless, having reminders is very good (and even then, I forgot
things).
Julian
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Julian Gilbey, Dept of Maths, Debian GNU/Linux Developer
Queen Mary, Univ. of London see http://people.debian.org/~jdg/
http://www.maths.qmul.ac.uk/~jdg/ or http://www.debian.org/
Visit http://www.thehungersite.com/ to help feed the hungry
Also: http://www.helpthehungry.org/
Reply to: