Skip to content

quickhatch/quickhatch-autotools

Repository files navigation

ci

quickhatch-autotools

Autoconf macros and auxiliary build tools for use with the GNU Autotools.

Macros

See source code for usage instructions.

Auxiliary Build Tools

See source code for usage instructions.

Installation as Git Submodule

To use these tools in your project, install them as a Git submodule.

Initial Setup

  • Add the quickhatch-autotools repository as a submodule of your project.

      $ git submodule add --name quickhatch-autotools \
          https://github.com/quickhatch/quickhatch-autotools.git .quickhatch
      $ git config -f .gitmodules submodule.quickhatch-autotools.shallow true
      $ git submodule set-branch --branch master quickhatch-autotools
    
  • Mention -I .quickhatch/m4 in ACLOCAL_AMFLAGS in Makefile.am.

      ACLOCAL_AMFLAGS = -I m4 -I .quickhatch/m4 --install
    

Updating

Here are the steps to update the quickhatch-autotools submodule to the latest upstream version, assuming the initial setup was done as specified above.

    $ git submodule update --recursive --remote .quickhatch
    $ git add .quickhatch
    $ git commit -m 'Updating quickhatch-autotools submodule'

Integration with Gnulib

If your project uses Gnulib's bootstrap script, add the following to your bootstrap.conf bootstrap_post_pull_hook function override. See the Gnulib documentation for more details.

# non-gnulib submodules
submodules='
  quickhatch-autotools
'

qh_build_aux_files='
  git-rpm-version-gen
'

bootstrap_post_pull_hook()
{
  # Update submodules
  for sm in $submodules; do
    sm_path=$(git_modules_config submodule.$sm.path)
    test "x$sm_path" = x && die "Could not determine submodule path for $sm"
    git submodule update --init $sm_path || return 1
  done

  # symlink quickhatch build-aux files
  qh_at_path=$(git_modules_config submodule.quickhatch-autotools.path)
  qh_at_build_aux="$qh_at_path/build-aux"
  for file in $qh_build_aux_files; do
    dest="$build_aux/$file"
    symlink_to_dir $qh_at_build_aux $file $dest
  done
} # bootstrap_post_import_hook