Last active
January 29, 2016 23:30
-
-
Save kisom/7fbc87c6f4f158f865c3 to your computer and use it in GitHub Desktop.
Autotools bootstrap script.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# _ _ _ _ _ _ | |
# __ _ _ _| |_ ___ | |__ _ _(_) | __| | ___| |__ | |
# / _` | | | | __/ _ \| '_ \| | | | | |/ _` | / __| '_ \ | |
# | (_| | |_| | || (_) | |_) | |_| | | | (_| |_\__ \ | | | | |
# \__,_|\__,_|\__\___/|_.__/ \__,_|_|_|\__,_(_)___/_| |_| | |
# | |
# | |
# https://git.io/autobuild | |
# | |
# This script performs the initial autotools bootstrapping. | |
# Abort the script and exit with failure if any command below exits with | |
# a non-zero exit status. | |
set -e | |
# Create the m4/ directory if it doesn't exist. | |
[ -d m4 ] || mkdir m4 | |
# If there's configure script, reconfigure the autoconf files. Make sure | |
# to install missing files and re-run configure and make if needed. | |
[ -e configure ] || autoreconf -im | |
# If the Makefile doesn't exist, the previous step didn't run; this | |
# indicates the presence of a configure script. Run that script and | |
# then call make. | |
[ -e Makefile ] || ( ./configure && make ) | |
# If src/codename doesn't exist, there was a Makefile but make hasn't | |
# been run yet. Run it, which should produce the codename binary. | |
[ -e src/codename ] || make | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment