⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 automake.sh

📁 pic 模拟程序!面向对象
💻 SH
字号:
#!/bin/sh######################################################################## File:		automake.sh## Purpose:	to run automake with the appropriate arguments## $Id: automake.sh,v 1.21 2005/02/27 16:48:28 cary Exp $## Tech-X Corporation configure system######################################################################### See whether we have automakeamver=`automake --version 2>/dev/null | sed -n '1p' | sed 's/^.*automake) //'`if test $? != 0; then  echo automake not present on your system.  Should be fine.  exitfi# amver=`echo $amver | sed 's/Written.*$//' | sed 's/ Copy.*$//'`# echo amver is $amverammajver=`echo $amver | sed 's/\..*$//'`amminver=`echo $amver | sed "s/^$ammajver\.//"`amminver=`echo $amminver | sed 's/\..*$//' | sed 's/-.*$//'`# echo automake minor version is $amminver## Determine the Makefile's that are operated on#lastarg=`echo $* | sed 's/^.* //'`mkfls=`echo $lastarg | grep -i Makefile`if test "$mkfls"; then  mkfls=$lastarg  amfile=$lastargelse  # echo Constructing mkfls  echo "/AC_OUTPUT/p" > configure.sed  echo "/Makefile/p" >> configure.sed  mkfls1=`sed -f configure.sed -n <configure.in`  rm configure.sed  mkfls2=`echo $mkfls1 | sed 's/^.*AC_OUTPUT(//' | sed 's/).*$//'`# Must excape the shell and the sed command  mkfls=`echo $mkfls2 | sed 's/\[//g' | sed 's/\\\\//g'`  # echo mkfls = $mkfls  amfile=""fi## If Makefile.am contains babel.make, then touch that in that directory# echo mkfls = $mkflsfor i in $mkfls; do  hasbabel=`grep babel.make $i.am`  if test -n "$hasbabel"; then    touch `dirname $i`/babel.make  fidone## For version 1.4,# --include-deps prevents the code that invokes gcc -E to create #	dependency files.  Not done as works with gcc only.# For version 1.5,# --ignore-deps prevents the dependency code# For both# --foreign stops complaints about missing information files# --no-force prevent automake from being invoked at every build, as#	this would undo the final fix if automake is badif test "$amminver" -le 4; then  cmd="automake --include-deps --foreign --no-force $amfile"else  cmd="automake --ignore-deps --foreign --no-force $amfile"fiecho $cmd$cmd# Now extract any cru created by decaying automakeif test "$amminver" -le 4; then  printed=""  for i in $mkfls; do    # echo working on $i    hasar=`grep "AR = ar" $i.in`    hascru=`grep " cru " $i.in`    # echo hasar = $hasar    if test -n "$hasar" -o -n "$hascru"; then      if test ! "$printed"; then         echo "automake not patched.  Will attempt patch of Makefile.in's."        printed=1      fi      # sed -f config/automake.sed <$i.in >$i.in1      sed '/AR = ar/s/ar/@AR@AR_FLAGS = @AR_FLAGS@/' <$i.in >$i.in1      sed '/@AR@AR_FLAGS/G;s/\(AR_FLAGS = @AR_FLAGS@\)\(\n\)/\2\1/' <$i.in1 >$i.in2      sed '/ cru /s/ cru//;s/\.a \$(l/.a $(AR_FLAGS) $(l/' <$i.in2 >$i.in      rm -f $i.in1 $i.in2    fi  donefi

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -