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

 

转载于:https://www.cnblogs.com/long123king/p/3754760.html

评论将由博主筛选后显示,对所有人可见 | 还能输入1000个字符 “速评一下”
©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页