2002-04-22 10:11:31 +08:00
-*-text-*-
2006-02-12 03:02:21 +08:00
-------------------------------------------------------------------------------
2019-05-19 23:57:14 +08:00
Copyright (C) 2002-2019 Free Software Foundation, Inc.
2012-01-16 10:29:20 +08:00
This file is part of GNU Make.
2006-02-12 03:02:21 +08:00
GNU Make is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
2007-07-05 03:35:15 +08:00
Foundation; either version 3 of the License, or (at your option) any later
version.
2006-02-12 03:02:21 +08:00
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
2007-07-05 03:35:15 +08:00
this program. If not, see <http://www.gnu.org/licenses/>.
2006-02-12 03:02:21 +08:00
-------------------------------------------------------------------------------
2013-01-13 08:31:13 +08:00
Obtaining Git Code
2002-04-22 10:11:31 +08:00
------------------
This seems redundant, since if you're reading this you most likely have
2013-01-13 08:31:13 +08:00
already performed this step; however, for completeness, you can obtain the GNU
make source code via Git from the FSF's Savannah project
<http://savannah.gnu.org/projects/make/>:
2002-04-22 10:11:31 +08:00
2013-01-13 08:31:13 +08:00
$ git clone git://git.savannah.gnu.org/make.git
2002-04-22 10:11:31 +08:00
2013-01-20 06:11:23 +08:00
Changes using Git
-----------------
2013-10-13 22:54:32 +08:00
For non-developers, you can continue to provide patches as before, or if you
2013-01-20 06:11:23 +08:00
make a public repository I can pull from that if you prefer.
2013-10-13 22:54:32 +08:00
Starting with GNU make 4.0 we no longer keep a separate ChangeLog file in
source control. We use the Gnulib git-to-changelog conversion script to
convert the Git comments into ChangeLog-style entries for release. As a
result, please format your Git comments carefully so they will look clean
after conversion. In particular, each line of your comment will have a TAB
added before it so be sure your comment lines are not longer than 72
2013-10-21 00:49:56 +08:00
characters; prefer 70 or less. Please use standard ChangeLog formats for
your commit messages (sans the leading TAB of course).
2013-01-20 06:11:23 +08:00
Rule #1: Don't rewrite pushed history (don't use "git push --force").
Typical simple workflow might be:
* Edit files
* Use "git status" and "git diff" to verify your changes
* Use "git add" to stage the changes you want to make
* Use "git commit" to commit the staged changes to your local repository
* Use "git pull" to accept & merge new changes from the Savannah repository
* Use "git push" to push your commits back to the Savannah repository
For Emacs users, there are many options for Git integration but I strongly
recommend the Magit package: http://www.emacswiki.org/emacs/Magit
It makes the workflow much clearer, and has advanced features such as
constructing multiple commits from various files and even from different
diff chunks in the same file. There is a video available which helps a lot.
2013-05-17 14:29:46 +08:00
Coding Standards
----------------
2013-10-21 00:49:56 +08:00
GNU make code adheres to the GNU Coding Standards. Please use only spaces and
no TAB characters in source code.
2013-05-17 14:29:46 +08:00
2013-10-21 00:49:56 +08:00
Additionally, GNU make is a foundational bootstrap package for the GNU
project; as such it is very conservative about language features it expects.
It should build with any C compiler conforming to the ANSI C89 / ISO C90
standard.
2013-05-17 14:29:46 +08:00
2018-07-02 00:28:25 +08:00
Building From Git for POSIX
---------------------------
2006-04-01 14:36:40 +08:00
2018-07-02 00:28:25 +08:00
To build GNU make from Git on POSIX systems such as GNU/Linux, you will
need to install the following extra software:
2002-04-22 10:11:31 +08:00
2018-07-02 00:28:25 +08:00
* autoconf
* automake >= 1.16.1
* gettext
* autopoint
* pkg-config
* texinfo (for makeinfo)
2019-09-04 00:24:54 +08:00
* GCC (Clang's GCC emulation is not sufficient)
* GNU make (POSIX make is not sufficient)
2002-04-22 10:11:31 +08:00
2019-12-18 02:36:26 +08:00
And any tools that those utilities require (GNU m4, etc.)
To run the tests you must install Perl.
To build a release you'll need to install lzip.
2002-04-22 10:11:31 +08:00
2018-07-02 00:28:25 +08:00
GNU make requires gnulib to provide some facilities. If you want to maintain
a local installation of gnulib you can set GNULIB_SRCDIR to point to it.
Otherwise, ./bootstrap will obtain a clone for you.
2003-10-22 12:35:27 +08:00
2018-07-02 00:28:25 +08:00
Unfortunately due to issues with gnulib's getloadavg, you must have automake
2019-09-04 00:24:54 +08:00
1.16.1 or above. This version may not yet be available through GNU/Linux
2018-07-02 00:28:25 +08:00
package managers. If you need to install from source be sure to set
ACLOCAL_PATH to point to the pkg-config location (e.g., /usr/share/aclocal).
2002-07-08 21:05:02 +08:00
2019-09-04 00:24:54 +08:00
If you want to build from Git with a non-GCC compiler, add "MAKE_CFLAGS=" to
your make command line (or at least remove any flags your compiler does not
support).
2002-07-08 21:05:02 +08:00
2018-07-02 00:28:25 +08:00
When building from Git you must build in the source directory: "VPATH
builds" from remote directories are not supported. Once you've created
a distribution, of course, you can unpack it and do a VPATH build from
there.
2002-07-08 21:05:02 +08:00
2018-07-02 00:28:25 +08:00
After checking out the code, you will need to run the bootstrap script:
2002-07-08 21:05:02 +08:00
2018-07-02 00:28:25 +08:00
$ ./bootstrap
2003-05-02 09:44:59 +08:00
2013-01-13 08:31:13 +08:00
At this point you have successfully brought your Git copy of the GNU
2002-04-22 10:11:31 +08:00
make source directory up to the point where it can be treated
more-or-less like the official package you would get from ftp.gnu.org.
That is, you can just run:
2018-07-02 00:28:25 +08:00
$ ./configure
$ make check
2002-04-22 10:11:31 +08:00
2019-09-16 03:26:23 +08:00
to build and test GNU make.
2002-04-22 10:11:31 +08:00
2019-09-16 03:26:23 +08:00
NOTE! This method builds GNU make in "maintainer mode". Make programs built
in this mode it will be slower, possibly MUCH slower: there are various
sanity checks enabled. Further this mode assumes a modern GCC, GNU
libc, and well-formed system headers and enables a high level of
warnings AND enables -Werror to turn warnings into failures.
If you want to build from Git with "maintainer mode" disabled, add
"MAKE_MAINTAINER_MODE=" to the make command line. If you want to turn
off the extra warning flags, add "MAKE_CFLAGS=" to the make command
line.
For example:
$ ./configure
$ make check MAKE_MAINTAINER_MODE= MAKE_CFLAGS=
$ make install
2019-09-04 00:24:54 +08:00
2002-04-22 10:11:31 +08:00
2018-07-02 00:28:25 +08:00
Building From Git for Windows
-----------------------------
2006-03-20 10:36:36 +08:00
If you have a UNIX emulation like CYGWIN you can opt to run the general
2018-07-02 00:28:25 +08:00
build procedure above; it will work. Consult README.W32.template for
information on options you might want to use when running ./configure.
2006-03-20 10:36:36 +08:00
2018-07-02 00:28:25 +08:00
If you can't or don't want to do that, then first run the .\bootstrap.bat
script to prime your Git workspace:
> .\bootstrap.bat
Next, rename the file README.W32.template to README.W32 and follow those
instructions.
2006-03-20 10:36:36 +08:00
2002-04-22 10:11:31 +08:00
Creating a Package
------------------
Once you have performed the above steps (including the configuration and
build) you can create a GNU make package. This is very simple, just
run:
$ make dist-gzip
and, if you like:
2019-12-18 02:36:26 +08:00
$ make dist-lzip
2002-04-22 10:11:31 +08:00
2002-04-22 12:35:19 +08:00
Even better, you should run this:
$ make distcheck
2019-12-18 02:36:26 +08:00
Which will build both .gz and .lz package files, then unpack one into a
temporary location, try to build it and repack it, then verifying that
everything works, you get the same results, _and_ no extraneous files are
left over after the "distclean" rule.
2019-09-16 03:26:23 +08:00
This package can be unpacked and built to give a "normal" (non-maintainer
mode) result.
2002-04-22 12:35:19 +08:00
2006-03-20 10:36:36 +08:00
Steps to Release
----------------
2002-04-22 12:35:19 +08:00
2006-03-20 10:36:36 +08:00
Here are the things that need to be done (in more or less this order)
2013-10-14 02:42:23 +08:00
before making an official release. If something breaks such that you need to
change code, be sure to start over again sufficiently that everything is
consistent (that's why we don't finalize the Git tag, etc. until the end).
2002-04-22 12:35:19 +08:00
2013-04-21 04:18:16 +08:00
* Update the configure.ac file with the new release number.
2013-10-14 02:42:23 +08:00
* Update the EDITION value in the doc/make.texi file.
2006-03-20 10:36:36 +08:00
* Update the NEWS file with the release number and date.
2013-10-14 02:42:23 +08:00
* Ensure the Savannah bug list URL in the NEWS file uses the correct
"Fixed Release" ID number.
* Run "make distcheck" to be sure it all works.
2013-10-21 00:49:56 +08:00
* Run "make check-alt-config" to be sure alternative configurations work
2014-10-06 00:18:08 +08:00
* Run "make update-makeweb" to get a copy of the GNU make web pages
* Run "make update-gnuweb" to get a copy of the GNU website boilerplate pages
* Update the web page boilerplate if necessary:
../gnu-www/www/server/standards/patch-from-parent ../make-web/make.html \
../gnu-www/www/server/standards/boilerplate.html
2013-10-14 02:42:23 +08:00
* Run "make gendocs" (requires gnulib) to generate the manual files for
the GNU make web pages.
* Follow the directions from gendocs for the web page repository
* run "make tag-release" to create a Git tag for the release
* Push everything:
git push --tags origin master
Manage the Savannah project for GNU make:
2013-10-21 00:49:56 +08:00
>>> This is only for real releases, not release candidate builds <<<
2013-01-13 08:31:13 +08:00
* In Savannah modify the "Value", "Rank", and "Description" values for the
current "SCM" entry in both "Component Version" and "Fix Release" fields
2013-10-21 00:49:56 +08:00
to refer to the new release. The "Rank" field should be 10 less than the
previous release so it orders properly.
2013-01-13 08:31:13 +08:00
* In Savannah create a new entry for the "Component Version" and "Fix
Release" fields:
- Value: SCM
- Rank: 20
2014-10-09 14:06:53 +08:00
- Descr: Issues found in code retrieved from Source Code Management (Git), rather than a distributed version. Please include the SHA you are working with.
- Descr: Fixed in Source Code Management (Git). The fix will be included in the next release of GNU make.
2013-10-14 02:42:23 +08:00
Start the next release:
* Update configure.ac and add a ".90" to the release number.
* Update the NEWS file with a new section for the release / date.
* Update the Savannah URL for the bugs fixed in the NEWS section.
2006-02-01 15:54:22 +08:00
2006-03-20 10:36:36 +08:00
Publishing a Package
--------------------
In order to publish a package on the FSF FTP site, either the release
site ftp://ftp.gnu.org, or the prerelease site ftp://alpha.gnu.org, you
first need to have my GPG private key and my passphrase to unlock it.
And, you can't have them! So there! But, just so I remember here's
2013-01-13 08:31:13 +08:00
what to do:
2006-03-20 10:36:36 +08:00
Make sure the "Steps to Release" are complete and committed and tagged.
2013-01-13 08:31:13 +08:00
git clone git://git.savannah.gnu.org/make.git make-release
2006-03-20 10:36:36 +08:00
cd make-release
<run the commands above to build the release>
make upload-alpha # for alpha.gnu.org (pre-releases)
-OR-
make upload-ftp # for ftp.gnu.org (official releases)
2013-01-13 08:31:13 +08:00
Depending on your distribution (whether GnuPG is integrated with your keyring
etc.) it will either pop up a window asking for your GPG key passphrase one
time, or else it will use the CLI to ask for the GPG passphrase _THREE_ times.
Sigh.
2006-03-20 10:36:36 +08:00
2006-10-01 13:38:38 +08:00
For both final releases and pre-releases, send an email with the URL of
the package to the GNU translation robot to allow the translators to
work on it:
2013-05-28 01:52:15 +08:00
<coordinator@translationproject.org>
2006-10-01 13:38:38 +08:00
2006-03-20 10:36:36 +08:00
Where to Announce
-----------------
2016-05-22 03:23:54 +08:00
Create the announcement in a text file, using 'git shortlog',
then sign it with GPG:
2006-04-01 14:36:40 +08:00
gpg --clearsign <announcement.txt>
2013-10-21 00:49:56 +08:00
Or, use your mail client's PGP/GPG signing capabilities.
Announce the release:
2006-03-20 10:36:36 +08:00
2013-10-21 00:49:56 +08:00
* For release candidate builds:
To: bug-make@gnu.org
CC: coordinator@translationproject.org
BCC: help-make@gnu.org, make-w32@gnu.org, make-alpha@gnu.org
2006-03-20 10:36:36 +08:00
2013-10-21 00:49:56 +08:00
* For release builds
To: info-gnu@gnu.org, bug-make@gnu.org
CC: coordinator@translationproject.org
BCC: help-make@gnu.org, make-w32@gnu.org, make-alpha@gnu.org
2006-03-20 10:36:36 +08:00
2013-10-21 00:49:56 +08:00
* Add a news item to the Savannah project site.
* Add an update to freecode.com (nee freshmeat.net)
2006-02-01 15:54:22 +08:00
2002-04-22 12:35:19 +08:00
Appendix A - For The Brave
--------------------------
For those of you who trust me implicitly, or are just brave (or
foolhardy), here is a canned sequence of commands to build a GNU make
2013-01-13 08:31:13 +08:00
distribution package from a virgin Git source checkout (assuming all the
2002-04-22 12:35:19 +08:00
prerequisites are available of course).
2002-08-10 09:27:16 +08:00
This list is eminently suitable for a quick swipe o' the mouse and a
swift click o' mouse-2 into an xterm. Go for it!
2002-04-22 12:35:19 +08:00
2018-07-02 00:28:25 +08:00
For a debugging version:
2010-07-13 09:20:10 +08:00
2018-07-02 00:28:25 +08:00
./bootstrap && ./configure CFLAGS=-g && make check
2010-07-13 09:20:10 +08:00
2018-07-02 00:28:25 +08:00
For a release version
2006-03-18 02:55:26 +08:00
2018-07-02 00:28:25 +08:00
./bootstrap && ./configure && make check