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>
howto/maintain: mark titles for asciidoc
Merge branch 'kb/maint-bundle-doc' into jch

Will merge to 'next'.

* kb/maint-bundle-doc:
  Documentation: full-ness of a bundle is significant for cloning
  Documentation: correct example restore from bundle
Merge branch 'tb/test-t9020-no-which' into jch

Will merge to 'next'.

* tb/test-t9020-no-which:
  t9020: which is not portable
Merge branch 'tb/test-t9810-no-sed-i' into jch

Will merge to 'next'.

* tb/test-t9810-no-sed-i:
  t9810: Do not use sed -i
Merge branch 'ap/status-ignored-in-ignored-directory' into jch

Output from "git status --ignored" showed an unexpected interaction
with "--untracked".

Will merge to 'next'.

* ap/status-ignored-in-ignored-directory:
  git-status: Test --ignored behavior
  dir.c: Make git-status --ignored more consistent
Merge branch 'nd/retire-fnmatch' into jch

Replace our use of fnmatch(3) with a more feature-rich wildmatch.
A handful patches at the bottom have been moved to nd/wildmatch to
graduate as part of that branch, before this series solidifies.

Will merge to 'next'.

* nd/retire-fnmatch:
  Makefile: add USE_WILDMATCH to use wildmatch as fnmatch
  wildmatch: advance faster in <asterisk> + <literal> patterns
  wildmatch: make a special case for "*/" with FNM_PATHNAME
  test-wildmatch: add "perf" command to compare wildmatch and fnmatch
  wildmatch: support "no FNM_PATHNAME" mode
  wildmatch: make dowild() take arbitrary flags
  wildmatch: rename constants and update prototype
Merge branch 'os/gitweb-highlight-uncaptured' into jch

The code to sanitize control characters before passing it to
"highlight" filter lost known-to-be-safe control characters by
mistake.

Will merge to 'next'.

* os/gitweb-highlight-uncaptured:
  gitweb: fix error in sanitize when highlight is enabled
Merge branch 'tb/test-shell-lint' into jch

Check for common mistakes in the test scripts, based on simple
pattern-matching.

Will merge to 'next'.

* tb/test-shell-lint:
  test: Add check-non-portable-shell.pl
Merge branch 'fc/remote-bzr' into jch

New remote helper for bzr, with minimum fix squashed in.

Will merge to 'next'.

* fc/remote-bzr:
  remote-bzr: detect local repositories
  remote-bzr: add support for older versions of bzr
  remote-bzr: add support to push special modes
  remote-bzr: add support for fecthing special modes
  remote-bzr: add simple tests
  remote-bzr: update working tree upon pushing
  remote-bzr: add support for remote repositories
  remote-bzr: add support for pushing
  Add new remote-bzr transport helper
Merge branch 'jc/submittingpatches' into jch

Will merge to 'next'.

* jc/submittingpatches:
  SubmittingPatches: give list and maintainer addresses
  SubmittingPatches: remove overlong checklist
  SubmittingPatches: mention subsystems with dedicated repositories
  SubmittingPatches: who am I and who cares?
Merge branch 'ap/merge-stop-at-prepare-commit-msg-failure' into jch

"git merge" started calling prepare-commit-msg hook like "git
commit" does some time ago, but forgot to pay attention to the exit
status of the hook.  t7505 may want a general clean-up but that is
a different topic.

Will merge to 'next'.

* ap/merge-stop-at-prepare-commit-msg-failure:
  merge: Honor prepare-commit-msg return code
Merge branch 'jk/enable-test-lint-by-default' into jch

We had two simple and quick tests to catch common mistakes when
writing test scripts, but they weren't run by default when running
tests.

Will merge to 'next'.

* jk/enable-test-lint-by-default:
  tests: turn on test-lint by default
Merge branch 'nd/maint-branch-desc-doc' into jch

Teach various forms of "format-patch" command line to identify what
branch the patches are taken from, so that the branch description
is picked up in more cases.

Will merge to 'next'.

* nd/maint-branch-desc-doc:
  format-patch: pick up branch description when no ref is specified
  format-patch: pick up correct branch name from symbolic ref
  t4014: a few more tests on cover letter using branch description
  branch: delete branch description if it's empty
  config.txt: a few lines about branch.<name>.description
Merge branch 'jc/format-patch-reroll' into jch

Teach "format-patch" to prefix v4- to its output files for the
fourth iteration of a patch series, to make it easier for the
submitter to keep separate copies for iterations.

Will merge to 'next'.

* jc/format-patch-reroll:
  format-patch: give --reroll-count a short synonym -v
  format-patch: document and test --reroll-count
  format-patch: add --reroll-count=$N option
  get_patch_filename(): split into two functions
  get_patch_filename(): drop "just-numbers" hack
  get_patch_filename(): simplify function signature
  builtin/log.c: stop using global patch_suffix
  builtin/log.c: drop redundant "numbered_files" parameter from make_cover_letter()
  builtin/log.c: drop unused "numbered" parameter from make_cover_letter()
Merge branch 'jk/config-uname' into jch

* jk/config-uname:
  Makefile: hoist uname autodetection to config.mak.uname
Merge branch 'as/dir-c-cleanup' into jch

* as/dir-c-cleanup:
  dir.c: rename free_excludes() to clear_exclude_list()
  dir.c: refactor is_path_excluded()
  dir.c: refactor is_excluded()
  dir.c: refactor is_excluded_from_list()
  dir.c: rename excluded() to is_excluded()
  dir.c: rename excluded_from_list() to is_excluded_from_list()
  dir.c: rename path_excluded() to is_path_excluded()
  dir.c: rename cryptic 'which' variable to more consistent name
  Improve documentation and comments regarding directory traversal API
  api-directory-listing.txt: update to match code
Merge branch 'jc/blame-no-follow' into jch

Teaches "--no-follow" option to "git blame" to disable its
whole-file rename detection.

Stalled mostly due to lack of responses.

* jc/blame-no-follow:
  blame: pay attention to --no-follow
  diff: accept --no-follow option
Merge branch 'mo/cvs-server-updates' into jch

As nobody seems to be stepping up to review this, I am tempted to
merge this to 'next and see who screams.

* mo/cvs-server-updates:
  t9402: Use TABs for indentation
  t9402: Rename check.cvsCount and check.list
  t9402: Simplify git ls-tree
  t9402: Add missing &&; Code style
  t9402: No space after IO-redirection
  t9402: Dont use test_must_fail cvs
  t9402: improve check_end_tree() and check_end_full_tree()
  t9402: sed -i is not portable
  cvsserver Documentation: new cvs ... -r support
  cvsserver: add t9402 to test branch and tag refs
  cvsserver: support -r and sticky tags for most operations
  cvsserver: Add version awareness to argsfromdir
  cvsserver: generalize getmeta() to recognize commit refs
  cvsserver: implement req_Sticky and related utilities
  cvsserver: add misc commit lookup, file meta data, and file listing functions
  cvsserver: define a tag name character escape mechanism
  cvsserver: cleanup extra slashes in filename arguments
  cvsserver: factor out git-log parsing logic
Merge branch 'jc/merge-blobs' into jch

A beginning of a new merge strategy based on the disused merge-tree
proof-of-concept code.

* jc/merge-blobs:
  merge-tree: fix d/f conflicts
  merge-tree: add comments to clarify what these functions are doing
  merge-tree: lose unused "resolve_directories"
  merge-tree: lose unused "flags" from merge_list
  Which merge_file() function do you mean?