normal use for autotools

1. remove temporary files, only used for test purpose.

 ls | sed -e "/^term.sh$/d" | sed -e "/^test.cpp$/d" | sed -e "/^Makefile.am$/d" | sed -e "/^autogen.sh$/d" | xargs -n 1 rm -rf

 

2. edit autogen.sh

echo "automatic generating configure.scan ......"
autoscan

echo "modifing configure.scan to configure.ac ......"
sed -e "/AC_INIT/a\
    AM_INIT_AUTOMAKE" configure.scan > configure.ac

echo "automatic generating config.in.h ......"
autoheader

echo "aclocal ......"
aclocal

echo "creating files: README, AUTHORS, NEWS, ChangLog ......"
touch README AUTHORS NEWS ChangeLog

echo "Daniel King(long123king@163.com)" > AUTHORS
echo "0.0.1" > ChangeLog
echo -e "\tAutomatic make" >> ChangeLog
echo -e "\tNeed to edit Makefile.am manually first" >> ChangeLog

echo "automake ......"
automake --add-missing --copy

echo "autoconf ......"
autoconf

echo "./configure"
./configure

echo "make"
echo "##############################################################################"
make
echo "##############################################################################"

 

3. run autogen.sh

bash autogen.sh

 

posted @ 2014-05-27 11:34  Daniel King  阅读(100)  评论(0编辑  收藏