[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: dh_make's "rules" file



On Mon, Jul 09, 2001 at 10:50:47PM -0400, Matt Zimmerman wrote:
> If your package produces only one binary, and you can be sure that it will be
> the last thing created by the build process, then it should be safe.  You must
> be sure not to specify any commands in debian/rules after the call to $(MAKE),
> though.

There is no limiting to only one binary,  why do you think so?  Of course
you must be sure to know what you're writing a rules Makefile for and
how the build process works.  I do not see how this is relevant to the
artificial stamps, btw.

> Overall, you are better off using build-stamp and friends.  These are not used
> because "it was much more convenient," but because they represent stages of the
> Debian package build process.  Either an entire phase is complete, or it is
> not.  This cannot generally be tied to a specific upstream makefile target.
> Even when it can, such things are likely to change from time to time.

The stages of the build process are best represented by the stages of
the build process per se.  The artificial stamps are added onto the
build process and are not an essential part of it.  They may convenient
to some in some situations, but you lose on elegance, generally. 

In the long run, you are better of mastering the art of makefiles.
I wrote a rules file using contrived stamps and it was ugly, mostly
because I did not understand the idea behind it very well.  It only
really dawned to me after I had finally studied make more seriously.
Then I was not only able to fix my embarrassing mistakes, but also to
do things properly, without "stamps".  Had I been happy with the stamps,
they might have been in my way to understanding things forever, blocking
any progress I could be making otherwise.

So I would not like to forbid people to use the stamps, I just want to
encourage people to learn make.  Then, when you understand the differences
and tradeoffs between contrived stamps and natural make targets, should
you decide what is best for your package.  Encouraging people to use the
"stamps" blindly is imho not doing a favor to these people, debian and
debian's users.

The examples with stamps are great to get you going, if it works then it
works and may the users be happier for it.  But stamps based rules files
should not be considered as worthy end goals of technical excellence,
simply because they generally aren't.  It is not elegant imho.

Cheers,


Joost



Reply to: