Author - Copyright (C) 2018, 2021 Mark Grant
1 ... Project Description
2 ... Normal Location of Script
3 ... AutoTools (configure and make) Installation
4 ... Utility Scripts
This script performs a setup for using gnulib based on my standard AutoTools project structure. Essentially it runs the following command:-
gnulib-tool --import --dir=$basedir --source-base=src/prg/c/gen/lib
--no-conditional-dependencies --no-libtool --no-vc-files configmake
where basedir defaults to the current directory or is passed to the command as the 1 and only command line argument.
At a source modification / development level, this project expects to reside in a git environment. This manifests itself in 2 places:-
- ... .gitignore files are included in the source.
- ... The make target, 'srctarball', relies on the command 'git archive' so it will fail if git is not installed or it is not in a git repository.
It is envisaged that the script can be dropped in to a project root directory and invoked from there when necessary. This means that any project has a script to help build that project. It also means that it does not have to be installed as below.
a) ... Download either the source or distribution tarball (the .tar.gz file) from:-
https://github.com/m-grant-prg/gen-gnulib/releases
b) ... Extract the tarball preserving the directory structure.
c) ... cd to the directory created.
d) ... If you downloaded the source tarball type 'autoreconf -if'
e) ... Type './configure'
f) ... As root or sudo, type 'make install clean'
(Quote marks are for textual clarity only).
To uninstall the package:
1 ... cd to the directory created in the above install process.
2 ... As root or sudo, type 'make uninstall clean'
In the project root directory there is 1 helper script; bootstrap.sh.
This misleadingly named script bootstraps the project build and provides other useful features. The main options below are probably b, c, C, D and T.
In AutoTools it is usually advisable to perform parallel builds. This means you build somewhere other than the project root. This is because building creates files and they would confuse the project root downwards. I always create a build directory straight off the project root, cd to there and do all build and git work from there, (.gitignore is already set to ignore such a directory).
Assuming you adopt the preceding paragraph then a typical invocation of the script would be:-
../bootstrap.sh --config --build ..
The last '..' points the way to project root.
For the full list of arguments to bootstrap.sh, please refer to the options section of the acmbuild wiki, the options are identical:-