title: debian packaging: what's the difference between dh build and dh binary
body: <p>I encountered an issue when building debian package.</p>
  
  <p>As for the document of the rules file: <a href="https://www.debian.org/doc/manuals/maint-guide/dreq.en.html#rules" rel="nofollow">https://www.debian.org/doc/manuals/maint-guide/dreq.en.html#rules</a></p>
  
  <ul>
  <li><p>debian/rules build runs dh build; which in turn runs the following:</p>
  
  <pre><code>dh_testdir
  dh_auto_configure
  dh_auto_build
  dh_auto_test
  </code></pre></li>
  <li><p>fakeroot debian/rules binary runs fakeroot dh binary; which in turn runs the following:</p>
  
  <pre><code>dh_testroot
  dh_prep
  dh_installdirs
  dh_auto_install
  dh_install
  dh_installdocs
  ...
  dh_builddeb
  </code></pre></li>
  </ul>
  
  <p>But when I run <code>dh binary --no-act</code> command, the output includes <code>dh build --no-act</code>. This means the <code>./configure</code> and <code>make</code> commands are run two times during build the debian package. It's weird.</p>
  
  <p>I used <code>dpkg-buildpackage -us -uc</code> to build debian package.</p>
  
  <p>UPDATE: I saw it actually did not run twice, but why --no-act shows the <code>dh build</code> output runs twice?</p>