其他分享
首页 > 其他分享> > 自动产生configure

自动产生configure

作者:互联网

#!/bin/bash
dir=$(pwd)
echo $dir

cd $dir
rm -rf cur
cp test cur -r
cd cur

autoscan
name=configure.ac
mv configure.scan $name
sed -i 's|AC_OUTPUT|AC_OUTPUT(Makefile)|g' $name
sed -i 's|\[FULL-PACKAGE-NAME\]|demo|g' $name
sed -i 's|\[VERSION\]|1.0|g' $name
sed -i 's|\[BUG-REPORT-ADDRESS\]|demo.com|g' $name
sed -i 's|AC_CONFIG_SRCDIR|AM_INIT_AUTOMAKE\
AC_CONFIG_SRCDIR|g' $name
cat>Makefile.am<<EOF
AUTOMAKE_OPTIONS=foreign
bin_PROGRAMS=hello
hello_SOURCES=m.cpp
EOF
touch NEWS README AUTHORS ChangeLog

aclocal
autoheader
libtoolize --automake --copy --force
automake --add-missing
autoconf
autoreconf -ivf

./configure
make
ls -lh

 

标签:AC,configure,产生,cur,sed,自动,dir,name
来源: https://www.cnblogs.com/yuandaozhe/p/16696212.html