📄 bootstrap
字号:
#!/bin/sh#set -x# helps bootstrapping fistgen, when checked out from CVS# requires GNU autoconf and GNU automake# this is not meant to go into the distributions# Erez Zadok <ezk@cs.columbia.edu># test cwdtest -f ../fistgen.h && cd ..if [ ! -f fistgen.h ]; then echo "Must run $0 from the top level source directory." exit 1fi# validate macros directory and some macro filesif [ ! -d m4 ]; then echo No m4 directory found! exit 1fiif [ ! -f m4/HEADER ]; then echo No m4/HEADER file found! exit 1fi# remove any remaining autom4te.cache directoryrm -fr autom4te.cache autom4te-*.cache# generate acinclude.m4 fileecho "FISTGEN: prepare acinclude.m4..."test -f acinclude.m4 && mv -f acinclude.m4 acinclude.m4.old(cd m4 for i in HEADER *.m4; do cat $i echo echo done cat TRAILER) > acinclude.m4# generate aclocal.m4 fileecho "FISTGEN: aclocal..."test -f aclocal.m4 && mv -f aclocal.m4 aclocal.m4.old# show versionaclocal --version 2>&1 | head -1if aclocal ; then :else echo "aclocal command failed. fix errors and rerun $0." exit 2fi# produce new configure.in (temp) scriptecho "FISTGEN: autoconf..."# show versionautoconf --version 2>&1 | head -1LOG=/tmp/fistgen-$$.logrm -f ${LOG}autoconf configure.in > configure.new 2> ${LOG}# until Automake requires Autoconf 2.50, manual says to ignore thisCUTWARNMSG1="warning: AC_PROG_LEX invoked multiple times|do not use m4_(patsubst|regexp):"egrep -v "${CUTWARNMSG1}" ${LOG} > ${LOG}.newmv ${LOG}.new ${LOG}if test -s ${LOG}; then echo "AUTOCONF ERRORS (MUST FIX):" cat ${LOG} rm -f ${LOG} exit 2fi# now prepare the real configure scriptmv -f configure configure.oldmv -f configure.new configurechmod a+rx configurerm -f configure.old# run autoheader to produce C header .in filesecho "FISTGEN: autoheader..."# show versionautoheader --version 2>&1 | head -1autoheader configure.in > config.h.in 2> ${LOG}CUTWARNMSG2="autoheader: \`config.h.in' is updated"egrep -v "${CUTWARNMSG2}" ${LOG} > ${LOG}.newmv ${LOG}.new ${LOG}if test -s ${LOG}; then echo "AUTOHEADER ERRORS (MUST FIX):" cat ${LOG} rm -f ${LOG} exit 2firm -f ${LOG}# generate makefilescmd="automake --add-missing --copy --ignore-deps"#cmd="automake --add-missing"echo "FISTGEN: $cmd..."# show versionautomake --version 2>&1 | head -1if ${cmd} ; then :else echo "automake command failed. fix errors and rerun $0." exit 2fi# save timestampecho "FISTGEN: save timestamp..."echo timestamp > stamp-h.inexit 0
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -