一 过程

Linux中autoconf和automake生成makefile脚本 

二 脚本


  EXIT_VALUE
=0
  
  
# setp1
  autoscan
  STATUS
=$?
  
if [ $STATUS -ne 0 ] ; then
    EXIT_VALUE
=1
    
echo autoscan FAILED
    
exit $EXIT_VALUE
  fi
  
  
#step2
  
rename configure.scan configure.in configure.scan
  STATUS
=$?
  
if [ $STATUS -ne 0 ] ; then
    EXIT_VALUE
=1
    
echo autoscan FAILED
    
exit $EXIT_VALUE
  fi
  
  
#step3
  rm -f configure
  
find . -name "*.cache" -exec rm -rf {} \;
  
  libtoolize --force
  STATUS
=$?
  
if [ $STATUS -ne 0 ] ; then
    EXIT_VALUE
=1
    
echo libtoolize FAILED
    
exit $EXIT_VALUE
  fi
  
  
#step4
  aclocal
  STATUS
=$?
  
if [ $STATUS -ne 0 ] ; then
    EXIT_VALUE
=1
    
echo aclocal FAILED
    
exit $EXIT_VALUE
  fi  
  
  
#step5
  automake
  STATUS
=$?
  
if [ $STATUS -ne 0 ] ; then
    EXIT_VALUE
=1
    
echo automake FAILED
    
exit $EXIT_VALUE
  fi

  
#step6
  autoconf -f
  STATUS
=$?
  
if [ $STATUS -ne 0 ] ; then
    EXIT_VALUE
=1
    
echo autoconf FAILED
    
exit $EXIT_VALUE
  fi

  
#step7
  
./configure --enable-optimized=yes 
  STATUS
=$?
  
if [ $STATUS -ne 0 ] ; then
    EXIT_VALUE
=1
    
echo configure FAILED
    
exit $EXIT_VALUE
  fi

  
#step7
  make -j 
4
  STATUS
=$?
  
if [ $STATUS -ne 0 ] ; then
    EXIT_VALUE
=1
    
echo make FAILED
    
exit $EXIT_VALUE
  fi
  
  
#step8
  make -j 
4 install
  STATUS
=$?
  
if [ $STATUS -ne 0 ] ; then
    EXIT_VALUE
=1
    
echo make install FAILED
    
exit $EXIT_VALUE
  fi

exit $EXIT_VALUE

 

三 参考

http://www.cnblogs.com/itech/archive/2009/05/25/1488983.html

完!

相关文章:

  • 2021-06-08
  • 2022-12-23
  • 2021-11-05
  • 2021-06-03
  • 2021-07-03
猜你喜欢
  • 2022-12-23
  • 2021-09-15
  • 2022-12-23
  • 2021-06-24
  • 2022-02-26
  • 2021-09-25
相关资源
相似解决方案