Julian Andres Klode wrote: > If you run build2 from the Makefile below, it does the same > as build. If you run it a second time, build2 starts ./configure > again. build works correctly, by not launching dh_auto_configure.
> -- Example:
> build:
> dh build
>
> build2:
> dh build --before configure
> dh_auto_configure
> dh build --after configure
You've told make to run dh_auto_configure in the build2 step, so of
course it runs it each time this target is called.
dh keeps track of which debhelper commands have run, and can avoid
re-running commands redundantly itself; this is intended to allow very
simple targets to be written. As soon as a target gets more complex than
just calling dh, you have to use other techniques to avoid make from
re-running it (such as stamp files).
It might help to consider this target:
build3:
dh build --before configure
./configure
dh build --after configure
Clearly debhelper can't prevent configure from being re-run each time
this target it called.
You might ask, why not have dh_auto_configure detect that it has run
before, and avoid doing anything the second time. The general reason is
that it's perfectly legitimate for a given debhelper command to be run
twice in a row. The most common, but not only case, would be passing the
two commands different parameters:
dh_link foo bar
dh_link foo2 bar2
I guess I should modify the examples to use stamp files.
--
see shy jo
signature.asc
Description: Digital signature

