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