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

Re: dh_make's "rules" file



On Tue, Jul 10, 2001 at 03:00:48AM +0200, Joost Kooij wrote:

> On Mon, Jul 09, 2001 at 02:02:41PM +0100, Nick Phillips wrote:
> > Could anyone possibly explain the purpose of the build_stamp target
> > in the debian/rules file that dh_make creates? The NMG states that
> > all the targets in there are required, whilst the policy disagrees,
> > so presumably it's just "a good idea" rather than required.
> > 
> > Any explanations?
> 
> Someone started doing this in a situation where it was much more
> convenient than using real targets.  Then other people decided that
> it was easier to copy examples than to read the make documentation.
> 
> In the case of dh_make, it is clearly a case where the mere
> generality of it precludes using real targets.
> 
> If you're not bound to these tools to do your work, it is imho more
> elegant to use eg. the package's main binary for a target than a 
> contrived "stamp_build" file.

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.

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.

-- 
 - mdz



Reply to: