Get started:
autoreconf --install
cd build
../configure
make
sudo make install
autoconf_hello_world
sudo make uninstall
Most useful things to get started:
./configure --prefix
make install DESTDIR
In normal projects, the files generated by the autoreconf --install
command are also checked in with Git.
We .gitignore
them here for minimality.
../configure --prefix="$(pwd)/install"
will install all files in the install
directory.
This is:
- very instructive to see what is getting built on large projects
- useful to prepare
chroot
environments
Modify the installation destination for a single run, without rerunning config
with a different prefix:
make install DESTDIR="$(pwd)/../install2"
This will install the programs under:
$(pwd)/../install2/usr/local/
supposing that the prefix is /usr/local
.
This is very useful to make test installs without modifying the system.
It may be important to not rerun config
because that requires a make distclean && make
, which could take hours for large projects.