Created
November 14, 2012 23:54
-
-
Save doubleotoo/4075700 to your computer and use it in GitHub Desktop.
A basic script for project setup with the GNU autotools
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/bash | |
# | |
# Copied from http://code.google.com/p/autotools-bootstrap/source/browse/autotools-bootstrap-basic.sh | |
# | |
# This is the basic script for project setup with the GNU autotools. | |
# Visit: | |
# http://seth-g-kriticos.blogspot.com/2008/06/how-to-set-up-open-source-c-development.html | |
# to find out, what it does. | |
echo "Please enter the project name: " | |
read NAME | |
echo "Bootstrapping $NAME project.." | |
mkdir $NAME | |
cd $NAME | |
echo "Creating configure.in.." | |
echo "AC_INIT" > configure.in | |
echo "AM_INIT_AUTOMAKE($NAME,0.1.0)" >> configure.in | |
echo "AC_PROG_CC" >> configure.in | |
echo "AC_PROG_CXX" >> configure.in | |
echo "AC_OUTPUT(Makefile)" >> configure.in | |
echo "Creating mandatory files.." | |
touch AUTHORS NEWS README ChangeLog ${NAME}.c | |
echo "Creating Makefile.am.." | |
echo "bin_PROGRAMS = $NAME" > Makefile.am | |
echo "${NAME}_SOURCES = ${NAME}.c" >> Makefile.am | |
echo "Creating the build scripts.." | |
aclocal | |
autoconf | |
automake -a | |
./configure |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment