]> git.ipfire.org Git - thirdparty/git.git/commit - config.mak.uname
Makefile: hoist uname autodetection to config.mak.uname
authorJeff King <peff@peff.net>
Thu, 3 Jan 2013 21:05:41 +0000 (16:05 -0500)
committerJunio C Hamano <gitster@pobox.com>
Thu, 3 Jan 2013 22:15:17 +0000 (14:15 -0800)
commite1b6dbb554ece7c32a73c0d8fe63c99bcec70229
tree85d64e6f092552e2381ef738852be09a400b0f01
parent3e293fba627e254b2c7d196bb7563c6c9d2e6f8a
Makefile: hoist uname autodetection to config.mak.uname

Our Makefile first sets up some sane per-platform defaults
by looking at "uname", then modifies that according to the
results of autoconf (if any), then modifies that according
to the user's wishes in config.mak.

For sub-Makefiles like Documentation/Makefile, the latter
two are available, but the uname defaults are available only
to the main Makefile. This hasn't been a problem so far,
because the sub-Makefiles do not rely on any of those
automatic settings to do their work.

This patch puts the uname magic into its own file so it can
be reused in other Makefiles, opening up the possibility of
new knobs.

Note that we leave one reference to uname in the top-level
Makefile: if we are on Darwin, we must check the NO_FINK and
NO_DARWIN_PORTS settings. But because we are combining uname
settings with user-options, we must do so after all of the
config is loaded. This is acceptable, as the resulting
conditionals are about setting variables specific to the
top-level Makefile (and if that ever changes, we can hoist
them into a separate post-config include, too).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Makefile
config.mak.uname [new file with mode: 0644]