README-hacking 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. -*- outline -*-
  2. These notes intend to help people working on the checked-out sources.
  3. These requirements do not apply when building from a distribution tarball.
  4. See also HACKING for more detailed contribution guidelines.
  5. * Requirements
  6. We've opted to keep only the highest-level sources in the GIT repository.
  7. This eases our maintenance burden, (fewer merges etc.), but imposes more
  8. requirements on anyone wishing to build from the just-checked-out sources.
  9. Note the requirements to build the released archive are much less and
  10. are just the requirements of the standard ./configure && make procedure.
  11. Specific development tools and versions will be checked for and listed by
  12. the bootstrap script. See README-prereq for specific notes on obtaining
  13. these prerequisite tools.
  14. Valgrind <http://valgrind.org/> is also highly recommended, if
  15. Valgrind supports your architecture. See also README-valgrind.
  16. While building from a just-cloned source tree may require installing a
  17. few prerequisites, later, a plain 'git pull && make' should be sufficient.
  18. * First GIT checkout
  19. You can get a copy of the source repository like this:
  20. $ git clone git://git.sv.gnu.org/coreutils
  21. $ cd coreutils
  22. As an optional step, if you already have a copy of the gnulib git
  23. repository, then you can use it as a reference to reduce download
  24. time and disk space requirements:
  25. $ export GNULIB_SRCDIR=/path/to/gnulib
  26. The next step is to get and check other files needed to build,
  27. which are extracted from other source packages:
  28. $ ./bootstrap
  29. To use the most-recent gnulib (as opposed to the gnulib version that
  30. the package last synchronized to), do this next:
  31. $ git submodule foreach git pull origin master
  32. $ git commit -m 'build: update gnulib submodule to latest' gnulib
  33. And there you are! Just
  34. $ ./configure --quiet #[--enable-gcc-warnings] [*]
  35. $ make
  36. $ make check
  37. At this point, there should be no difference between your local copy,
  38. and the GIT master copy:
  39. $ git diff
  40. should output no difference.
  41. Enjoy!
  42. [*] The --enable-gcc-warnings option is useful only with glibc
  43. and with a very recent version of gcc. You'll probably also have
  44. to use recent system headers. If you configure with this option,
  45. and spot a problem, please be sure to send the report to the bug
  46. reporting address of this package, and not to that of gnulib, even
  47. if the problem seems to originate in a gnulib-provided file.
  48. * Submitting patches
  49. If you develop a fix or a new feature, please send it to the
  50. appropriate bug-reporting address as reported by the --help option of
  51. each program. One way to do this is to use vc-dwim
  52. <https://www.gnu.org/software/vc-dwim/>), as follows.
  53. Run the command "vc-dwim --initialize" from the top-level directory
  54. of this package's git-cloned hierarchy.
  55. Edit the (empty) ChangeLog file that this command creates, creating a
  56. properly-formatted entry according to the GNU coding standards
  57. <https://www.gnu.org/prep/standards/html_node/Change-Logs.html>.
  58. Make your changes.
  59. Run the command "vc-dwim" and make sure its output (the diff of all
  60. your changes) looks good.
  61. Run "vc-dwim --commit".
  62. Run the command "git format-patch --stdout -1", and email its output
  63. in, using the output's subject line.
  64. -----
  65. Copyright (C) 2002-2018 Free Software Foundation, Inc.
  66. This program is free software: you can redistribute it and/or modify
  67. it under the terms of the GNU General Public License as published by
  68. the Free Software Foundation, either version 3 of the License, or
  69. (at your option) any later version.
  70. This program is distributed in the hope that it will be useful,
  71. but WITHOUT ANY WARRANTY; without even the implied warranty of
  72. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  73. GNU General Public License for more details.
  74. You should have received a copy of the GNU General Public License
  75. along with this program. If not, see <https://www.gnu.org/licenses/>.