package-make-target.txt 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. // -*- mode:doc; -*-
  2. [[pkg-build-steps]]
  3. Package make targets
  4. ~~~~~~~~~~~~~~~~~~~~
  5. A +make <package>+ call achieves several _make targets_ with, as a
  6. result, this particular package and its dependencies built, installed
  7. in their destination directory (target, staging or host directory).
  8. For packages based on the Buildroot infrastructures (+generic-package+,
  9. +autotools-package+ or +cmake-package+), each of those
  10. actions/steps/commands. For packages relying on other build system,
  11. then there is no other choice than looking at the +.mk+ file (see also
  12. the xref:rebuild-pkg[]).
  13. For packages relying on the Buildroot infrastructures, there are
  14. numerous special make targets that can be called independently like
  15. this:
  16. ------------
  17. make <package>-<target>
  18. ------------
  19. In order, the package build commands are:
  20. [width="90%",cols="^1,4",options="header"]
  21. |===================================================
  22. | command/target | Description
  23. | +source+ | Fetch the source (download the tarball, clone
  24. the source repository, etc)
  25. | +depends+ | Build and install all dependencies required to
  26. build the package
  27. | +extract+ | Put the source in the package build directory
  28. (extract the tarball, copy the source, etc)
  29. | +patch+ | Apply the patches if any
  30. | +configure+ | Run the configure command
  31. | +build+ | Compile the source
  32. | +install-staging+ |
  33. *target package:* Run the installation of the package in the
  34. staging directory
  35. *host package:* Does nothing
  36. | +install-target+ |
  37. *target package:* Run the installation of the package in the
  38. staging directory
  39. *host package:* Does nothing
  40. | +install+ |
  41. *target package:* Run the 2 previous installation commands for the
  42. target packages
  43. *host package:* Run the installation of the package in the host
  44. directory
  45. |===================================================
  46. Additionally, there are some other useful make targets:
  47. [width="90%",cols="^1,4",options="header"]
  48. |===================================================
  49. | command/target | Description
  50. | +show-depends+ | Displays the dependencies required to build the
  51. package
  52. | +clean+ | Clean the package build directory, also
  53. uninstall the package from both the target and the staging directory
  54. | +dirclean+ | Remove the whole package build directory
  55. | +rebuild+ | Rebuild only necessary binaries and install them
  56. again
  57. | +reconfigure+ | Re-run the configure command, then rebuild
  58. only necessary binaries, and lastly install them again
  59. |===================================================