This file explains how to install GNU git-merge-changelog from a tarball.
(If you have checked out the source code repository, start by reading the
file HACKING instead.)


Prerequisites
=============

Before starting the installation, install the prerequisites listed in the
file DEPENDENCIES.  You need to have at least those marked as 'Mandatory'
installed.


Installation
============

Then, you can run 'configure':

  $ mkdir build/ && cd build
  $ ../configure

Here, you can give as arguments to 'configure'

  - configure options, as listen in the 'configure --help' output,
  - Makefile variable assignments for building the binaries, as
    described in the INSTALL.generic file.

If you are in a 64-bit multilib system with support for building 32-bit
binaries, you can build 32-bit binaries by configuring like this:

  $ ../configure CC="gcc -m32"

You find a set of known-to-work variable settings for various platforms
in https://gitlab.com/ghwiki/gnow-how/-/wikis/Platforms/Configuration .

Then:

  $ make
  $ make check
  $ make install

Additionally, for git users:
  - Add to .git/config of the checkout (or to your $HOME/.gitconfig) the
    lines

       [merge "merge-changelog"]
               name = GNU-style ChangeLog merge driver
               driver = /usr/local/bin/git-merge-changelog %O %A %B "%Y"

  - Add to the top-level directory of the checkout a file '.gitattributes'
    with this line:

       ChangeLog    merge=merge-changelog

    (See "man 5 gitattributes" for more info.)

Additionally, for bzr users:
  - Install the 'extmerge' bzr plug-in listed at
      <http://doc.bazaar.canonical.com/plugins/en/index.html>
      <http://wiki.bazaar.canonical.com/BzrPlugins>
  - Add to your $HOME/.bazaar/bazaar.conf the line

       external_merge = git-merge-changelog %b %T %o

  - Then, to merge a conflict in a ChangeLog file, use

       $ bzr extmerge ChangeLog

Additionally, for hg users:
  - Add to your $HOME/.hgrc the lines

       [merge-patterns]
       ChangeLog = git-merge-changelog

       [merge-tools]
       git-merge-changelog.executable = /usr/local/bin/git-merge-changelog
       git-merge-changelog.args = $base $local $other

    See <https://www.selenic.com/mercurial/hgrc.5.html> section merge-tools
    for reference.
