1 | -*-text-*-
|
---|
2 |
|
---|
3 | -------------------------------------------------------------------------------
|
---|
4 | Copyright (C) 2002-2016 Free Software Foundation, Inc.
|
---|
5 | This file is part of GNU Make.
|
---|
6 |
|
---|
7 | GNU Make is free software; you can redistribute it and/or modify it under the
|
---|
8 | terms of the GNU General Public License as published by the Free Software
|
---|
9 | Foundation; either version 3 of the License, or (at your option) any later
|
---|
10 | version.
|
---|
11 |
|
---|
12 | GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
---|
13 | WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
---|
14 | A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
---|
15 |
|
---|
16 | You should have received a copy of the GNU General Public License along with
|
---|
17 | this program. If not, see <http://www.gnu.org/licenses/>.
|
---|
18 | -------------------------------------------------------------------------------
|
---|
19 |
|
---|
20 | Obtaining Git Code
|
---|
21 | ------------------
|
---|
22 |
|
---|
23 | This seems redundant, since if you're reading this you most likely have
|
---|
24 | already performed this step; however, for completeness, you can obtain the GNU
|
---|
25 | make source code via Git from the FSF's Savannah project
|
---|
26 | <http://savannah.gnu.org/projects/make/>:
|
---|
27 |
|
---|
28 | $ git clone git://git.savannah.gnu.org/make.git
|
---|
29 |
|
---|
30 |
|
---|
31 | Changes using Git
|
---|
32 | -----------------
|
---|
33 |
|
---|
34 | For non-developers, you can continue to provide patches as before, or if you
|
---|
35 | make a public repository I can pull from that if you prefer.
|
---|
36 |
|
---|
37 | Starting with GNU make 4.0 we no longer keep a separate ChangeLog file in
|
---|
38 | source control. We use the Gnulib git-to-changelog conversion script to
|
---|
39 | convert the Git comments into ChangeLog-style entries for release. As a
|
---|
40 | result, please format your Git comments carefully so they will look clean
|
---|
41 | after conversion. In particular, each line of your comment will have a TAB
|
---|
42 | added before it so be sure your comment lines are not longer than 72
|
---|
43 | characters; prefer 70 or less. Please use standard ChangeLog formats for
|
---|
44 | your commit messages (sans the leading TAB of course).
|
---|
45 |
|
---|
46 | Rule #1: Don't rewrite pushed history (don't use "git push --force").
|
---|
47 |
|
---|
48 | Typical simple workflow might be:
|
---|
49 |
|
---|
50 | * Edit files
|
---|
51 | * Use "git status" and "git diff" to verify your changes
|
---|
52 | * Use "git add" to stage the changes you want to make
|
---|
53 | * Use "git commit" to commit the staged changes to your local repository
|
---|
54 | * Use "git pull" to accept & merge new changes from the Savannah repository
|
---|
55 | * Use "git push" to push your commits back to the Savannah repository
|
---|
56 |
|
---|
57 | For Emacs users, there are many options for Git integration but I strongly
|
---|
58 | recommend the Magit package: http://www.emacswiki.org/emacs/Magit
|
---|
59 | It makes the workflow much clearer, and has advanced features such as
|
---|
60 | constructing multiple commits from various files and even from different
|
---|
61 | diff chunks in the same file. There is a video available which helps a lot.
|
---|
62 |
|
---|
63 |
|
---|
64 | Coding Standards
|
---|
65 | ----------------
|
---|
66 |
|
---|
67 | GNU make code adheres to the GNU Coding Standards. Please use only spaces and
|
---|
68 | no TAB characters in source code.
|
---|
69 |
|
---|
70 | Additionally, GNU make is a foundational bootstrap package for the GNU
|
---|
71 | project; as such it is very conservative about language features it expects.
|
---|
72 | It should build with any C compiler conforming to the ANSI C89 / ISO C90
|
---|
73 | standard.
|
---|
74 |
|
---|
75 |
|
---|
76 | Building From Git
|
---|
77 | -----------------
|
---|
78 |
|
---|
79 | To build GNU make from Git, you will need Autoconf, Automake, and
|
---|
80 | Gettext, and any tools that those utilities require (GNU m4, Perl,
|
---|
81 | etc.). See the configure.ac file to find the minimum versions of each
|
---|
82 | of these tools. You will also need a copy of wget and gnulib.
|
---|
83 |
|
---|
84 | When building from Git you must build in the source directory: "VPATH
|
---|
85 | builds" from remote directories are not supported. Once you've created
|
---|
86 | a distribution, of course, you can unpack it and do a VPATH build from
|
---|
87 | there.
|
---|
88 |
|
---|
89 | After checking out the code, you will need to perform these steps to get
|
---|
90 | to the point where you can run "make".
|
---|
91 |
|
---|
92 | 1) $ autoreconf -i
|
---|
93 |
|
---|
94 | This rebuilds all the things that need rebuilding, installing
|
---|
95 | missing files as symbolic links.
|
---|
96 |
|
---|
97 | You may get warnings here about missing files like README, etc.
|
---|
98 | Ignore them, they are harmless.
|
---|
99 |
|
---|
100 | 2) $ ./configure
|
---|
101 |
|
---|
102 | Generate a Makefile
|
---|
103 |
|
---|
104 | 3) $ make update
|
---|
105 |
|
---|
106 | Use wget to retrieve various other files that GNU make relies on,
|
---|
107 | but does not keep in its own source tree.
|
---|
108 |
|
---|
109 | NB: You may need GNU make to correctly perform this step; if you use
|
---|
110 | a platform-local make you may get problems with missing files in doc/.
|
---|
111 |
|
---|
112 | At this point you have successfully brought your Git copy of the GNU
|
---|
113 | make source directory up to the point where it can be treated
|
---|
114 | more-or-less like the official package you would get from ftp.gnu.org.
|
---|
115 | That is, you can just run:
|
---|
116 |
|
---|
117 | $ make && make check && make install
|
---|
118 |
|
---|
119 | to build and install GNU make.
|
---|
120 |
|
---|
121 |
|
---|
122 | Windows builds from Git
|
---|
123 | -----------------------
|
---|
124 |
|
---|
125 | If you have a UNIX emulation like CYGWIN you can opt to run the general
|
---|
126 | build procedure above; it will work. Be sure to read
|
---|
127 | README.W32.template for information on options you might want to use
|
---|
128 | when running ./configure.
|
---|
129 |
|
---|
130 | If you can't or don't want to do that, then rename the file
|
---|
131 | README.W32.template to README.W32 and follow those instructions.
|
---|
132 |
|
---|
133 |
|
---|
134 | Creating a Package
|
---|
135 | ------------------
|
---|
136 |
|
---|
137 | Once you have performed the above steps (including the configuration and
|
---|
138 | build) you can create a GNU make package. This is very simple, just
|
---|
139 | run:
|
---|
140 |
|
---|
141 | $ make dist-gzip
|
---|
142 |
|
---|
143 | and, if you like:
|
---|
144 |
|
---|
145 | $ make dist-bzip2
|
---|
146 |
|
---|
147 | Even better, you should run this:
|
---|
148 |
|
---|
149 | $ make distcheck
|
---|
150 |
|
---|
151 | Which will build both .gz and .bz2 package files, then unpack them into
|
---|
152 | a temporary location, try to build them, and repack them, verifying that
|
---|
153 | everything works, you get the same results, _and_ no extraneous files
|
---|
154 | are left over after the "distclean" rule--whew!! Now, _that_ is why
|
---|
155 | converting to Automake is worth the trouble! A big "huzzah!" to Tom
|
---|
156 | T. and the AutoToolers!
|
---|
157 |
|
---|
158 |
|
---|
159 | Steps to Release
|
---|
160 | ----------------
|
---|
161 |
|
---|
162 | Here are the things that need to be done (in more or less this order)
|
---|
163 | before making an official release. If something breaks such that you need to
|
---|
164 | change code, be sure to start over again sufficiently that everything is
|
---|
165 | consistent (that's why we don't finalize the Git tag, etc. until the end).
|
---|
166 |
|
---|
167 | * Update the configure.ac file with the new release number.
|
---|
168 | * Update the EDITION value in the doc/make.texi file.
|
---|
169 | * Update the NEWS file with the release number and date.
|
---|
170 | * Ensure the Savannah bug list URL in the NEWS file uses the correct
|
---|
171 | "Fixed Release" ID number.
|
---|
172 | * Run "make distcheck" to be sure it all works.
|
---|
173 | * Run "make check-alt-config" to be sure alternative configurations work
|
---|
174 | * Run "make update-makeweb" to get a copy of the GNU make web pages
|
---|
175 | * Run "make update-gnuweb" to get a copy of the GNU website boilerplate pages
|
---|
176 | * Update the web page boilerplate if necessary:
|
---|
177 | ../gnu-www/www/server/standards/patch-from-parent ../make-web/make.html \
|
---|
178 | ../gnu-www/www/server/standards/boilerplate.html
|
---|
179 | * Run "make gendocs" (requires gnulib) to generate the manual files for
|
---|
180 | the GNU make web pages.
|
---|
181 | * Follow the directions from gendocs for the web page repository
|
---|
182 | * run "make tag-release" to create a Git tag for the release
|
---|
183 | * Push everything:
|
---|
184 | git push --tags origin master
|
---|
185 |
|
---|
186 | Manage the Savannah project for GNU make:
|
---|
187 |
|
---|
188 | >>> This is only for real releases, not release candidate builds <<<
|
---|
189 |
|
---|
190 | * In Savannah modify the "Value", "Rank", and "Description" values for the
|
---|
191 | current "SCM" entry in both "Component Version" and "Fix Release" fields
|
---|
192 | to refer to the new release. The "Rank" field should be 10 less than the
|
---|
193 | previous release so it orders properly.
|
---|
194 | * In Savannah create a new entry for the "Component Version" and "Fix
|
---|
195 | Release" fields:
|
---|
196 | - Value: SCM
|
---|
197 | - Rank: 20
|
---|
198 | - Descr: Issues found in code retrieved from Source Code Management (Git), rather than a distributed version. Please include the SHA you are working with.
|
---|
199 |
|
---|
200 | - Descr: Fixed in Source Code Management (Git). The fix will be included in the next release of GNU make.
|
---|
201 |
|
---|
202 | Start the next release:
|
---|
203 |
|
---|
204 | * Update configure.ac and add a ".90" to the release number.
|
---|
205 | * Update the NEWS file with a new section for the release / date.
|
---|
206 | * Update the Savannah URL for the bugs fixed in the NEWS section.
|
---|
207 |
|
---|
208 |
|
---|
209 | Publishing a Package
|
---|
210 | --------------------
|
---|
211 |
|
---|
212 | In order to publish a package on the FSF FTP site, either the release
|
---|
213 | site ftp://ftp.gnu.org, or the prerelease site ftp://alpha.gnu.org, you
|
---|
214 | first need to have my GPG private key and my passphrase to unlock it.
|
---|
215 | And, you can't have them! So there! But, just so I remember here's
|
---|
216 | what to do:
|
---|
217 |
|
---|
218 | Make sure the "Steps to Release" are complete and committed and tagged.
|
---|
219 |
|
---|
220 | git clone git://git.savannah.gnu.org/make.git make-release
|
---|
221 |
|
---|
222 | cd make-release
|
---|
223 |
|
---|
224 | <run the commands above to build the release>
|
---|
225 |
|
---|
226 | make upload-alpha # for alpha.gnu.org (pre-releases)
|
---|
227 | -OR-
|
---|
228 | make upload-ftp # for ftp.gnu.org (official releases)
|
---|
229 |
|
---|
230 | Depending on your distribution (whether GnuPG is integrated with your keyring
|
---|
231 | etc.) it will either pop up a window asking for your GPG key passphrase one
|
---|
232 | time, or else it will use the CLI to ask for the GPG passphrase _THREE_ times.
|
---|
233 | Sigh.
|
---|
234 |
|
---|
235 |
|
---|
236 | For both final releases and pre-releases, send an email with the URL of
|
---|
237 | the package to the GNU translation robot to allow the translators to
|
---|
238 | work on it:
|
---|
239 |
|
---|
240 | <[email protected]>
|
---|
241 |
|
---|
242 |
|
---|
243 | Where to Announce
|
---|
244 | -----------------
|
---|
245 |
|
---|
246 | Create the announcement in a text file, using 'git shortlog',
|
---|
247 | then sign it with GPG:
|
---|
248 |
|
---|
249 | gpg --clearsign <announcement.txt>
|
---|
250 |
|
---|
251 | Or, use your mail client's PGP/GPG signing capabilities.
|
---|
252 |
|
---|
253 | Announce the release:
|
---|
254 |
|
---|
255 | * For release candidate builds:
|
---|
256 | To: [email protected]
|
---|
257 | CC: [email protected]
|
---|
258 | BCC: [email protected], [email protected], [email protected]
|
---|
259 |
|
---|
260 | * For release builds
|
---|
261 | To: [email protected], [email protected]
|
---|
262 | CC: [email protected]
|
---|
263 | BCC: [email protected], [email protected], [email protected]
|
---|
264 |
|
---|
265 | * Add a news item to the Savannah project site.
|
---|
266 | * Add an update to freecode.com (nee freshmeat.net)
|
---|
267 |
|
---|
268 |
|
---|
269 | Appendix A - For The Brave
|
---|
270 | --------------------------
|
---|
271 |
|
---|
272 | For those of you who trust me implicitly, or are just brave (or
|
---|
273 | foolhardy), here is a canned sequence of commands to build a GNU make
|
---|
274 | distribution package from a virgin Git source checkout (assuming all the
|
---|
275 | prerequisites are available of course).
|
---|
276 |
|
---|
277 | This list is eminently suitable for a quick swipe o' the mouse and a
|
---|
278 | swift click o' mouse-2 into an xterm. Go for it!
|
---|
279 |
|
---|
280 | autoreconf -i
|
---|
281 | ./configure
|
---|
282 | make update
|
---|
283 | make
|
---|
284 | make check
|
---|
285 |
|
---|
286 | Or, for a debugging version:
|
---|
287 |
|
---|
288 | autoreconf -i && ./configure CFLAGS=-g && make update && make && make check
|
---|
289 |
|
---|
290 | Or, all-in-one:
|
---|
291 |
|
---|
292 | autoreconf -i && ./configure && make update && make && make check
|
---|