DH_AUTORECONF(1)

πŸ’– DH_AUTORECONF πŸ’–

okay bestie, so this is dh_autoreconf from the dh-autoreconf manual (section 1 ofc πŸ’…) β€” she's the one who calls autoreconf -f -i and keeps receipts on every file that got touched. no cap. ✨


🌸 NAME 🌸

dh_autoreconf β€” call autoreconf -f -i and keep track of the changed files. literally her whole job, she's so real for that 🫢


πŸ¦‹ SYNOPSIS πŸ¦‹

dh_autoreconf [debhelper options] [-Xitem] [--mode=mode]
              [program -- params]

✨ DESCRIPTION ✨

so basically, dh_autoreconf and dh_autoreconf_clean are usually invoked non-interactively, exactly like it says in dh-autoreconf(7). no drama, just vibes. 🌈

The dh_autoreconf command gets invoked before a package build. It lets program prepare the source tree, and it tracks every file that got created or modified. she's watching πŸ‘€πŸ’–

The dh_autoreconf_clean command gets invoked later, when cleaning a source tree, usually after a build. It removes all the files that program previously created or modified. it's giving cleanup queen 🧹✨

By default, program is autoreconf --force --install -verbose β€” but without the verbose option if the terse build option is active β€” or xdt-autogen when configure.ac contains XDT_ macros. slay, it auto-detects πŸ’…

⚠️ ok important bestie: <red>dh_autoreconfcan only be run once.so if you need to run multiple commands, put them in a script or similar. there's a whole example given indh-autoreconf(7)`. one and done, periodt. πŸ’€

πŸŽ€ FILES πŸŽ€

  • debian/autoreconf β€” this file can contain a list of directories. If it's there, dh_autoreconf will only scan the given directories for changes. And if no special command is given to dh_autoreconf, it will also forward that directory list to autoreconf, which makes it run only on those sub directories. efficient icon ✨

🌟 OPTIONS 🌟

  • -Xitem, --exclude=item β€” exclude files that contain "item" anywhere in their filename from being checked for changes. Meaning: those files won't get deleted by "dh_autoreconf_clean" even if there ARE changes. you can use this option multiple times to build up a whole list of things to exclude. stack it up bestie πŸ“šπŸ’–

Starting with version 3, the directories of common version control systems such as cvs, git, hg, svn, and bzr are excluded automatically. good, we love auto-magic πŸͺ„

  • --mode=mode β€” changes the way modifications to files are detected. the default mode is md5 (uses MD5 checksums), but there's also timesize, which uses the time of the last modification and the file size. two modes, both valid, pick ur fighter πŸ’…
  • --as-needed β€” enables support for -Wl,--as-needed in all ltmain.sh files that are identical to the one of the libtool package. this only works in the MD5 mode (the default one πŸ‘‘). the changes are reverted in dh_autoreconf_clean. You should not prevent LIBTOOLIZE from running with this, because it only works correctly with libtoolize running. no skipping the libtoolize step bestie 🚫

Since libtool 2.6.0, ltmain.sh supports -Wl,--as-needed by itself and this option does nothing. It is only kept for backwards compatibility and may be removed in a future release. so like… legacy behavior, she's retired but still showing up 😭

  • -Ddir, --sourcedirectory=dir β€” run everything in the source directory. supported only in debhelper compat level 10, for backwards compatibility. old-school only, ngl πŸ“Ό
  • program -- params β€” run the program given by program with the arguments given by params instead of autoreconf -f -i. if you need to run multiple commands, put them in a script and pass the script instead (or add a target to debian/rules). build your own adventure, love that for you πŸ¦‹

An upstream script named bootstrap is usually a good candidate. she's the moment fr fr ✨


🌈 ENVIRONMENT 🌈

For each tool executed by autoreconf(1), you can export a variable whose name is the uppercase name of the tool β†’ set it to the specific program you want to run, including true to prevent the tool in question from being run at all. (yes true = "nope, we're not doing this one" πŸ™ˆ)

The following example shows the beginning of a debian/rules for a package where automake 1.11 shall be run instead of the default automake version, and libtoolize shall not be run:

#!/usr/bin/make -f
export AUTOMAKE = automake-1.11
export LIBTOOLIZE = true

manifesting your build πŸ•―οΈπŸ’–


πŸ”₯ SEE ALSO πŸ”₯

go read them, iykyk πŸ‘‘


πŸ’œ AUTHOR πŸ’œ

Julian Andres Klode <jak@debian.org> β€” thank u for ur service πŸ«‘πŸ’–


that's the whole page bestie, no crumbs left πŸ’…

this was dh-autoreconf v23, dated 2026-09-07 β€” so like, screenshot it before it changes, mwah πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from