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

📄 makedep

📁 一个网络和单机的麻将游戏源码
💻
字号:
#!/bin/sh## makedepend which uses 'gcc -MM'## tiny change to the gccmakedep in XFree86## Based on mdepend.cpp and code supplied by Hongjiu Lu <hjl@nynexst.com>#TMP=/tmp/mdep$$CC="gcc"RM="rm -f"LN="ln -s"MV="mv -f"trap "$RM ${TMP}*; exit 1" 1 2 15trap "$RM ${TMP}*; exit 0" 1 2 13files=makefile=endmarker=magic_string='# DO NOT DELETE'append=nargs=asmfiles=# if we have a gcc version after 3.0, we have to muck with the# flags, because post-3.0 gcc breaks (deliberately!) -MM .gcc --version | grep 'GCC. 3\.[1-9]' >/dev/nullif [ $? = 0 ] ; then lategcc=Y ; else lategcc="" ; fiwhile [ $# != 0 ]; do    if [ "$endmarker"x != x -a "$endmarker" = "$1" ]; then	endmarker=    else	case "$1" in	    -D*)		args="$args '$1'"		;;	    -I*)		if [ "$lategcc" ] ; then		    args="$args -isystem '`echo $1 | sed -e s/-I//`'"		else		    args="$args '$1'"		fi		;;	    -g|-o)		;;	    *)		if [ "$endmarker"x = x ]; then		    case $1 in# ignore these flags			-w|-o|-cc)			    shift			    ;;			-v)			    ;;			-s)			    magic_string="$2"			    shift			    ;;			-f-)			    makefile="-"			    ;;			-f)			    makefile="$2"			    shift			    ;;			--*)			    endmarker=`echo $1 | sed 's/^\-\-//'`			    if [ "$endmarker"x = x ]; then				endmarker="--"			    fi			    ;;			-a)			    append=y			    ;;			-*)			    echo "Unknown option '$1' ignored" 1>&2			    ;;			*)			    files="$files $1"			    ;;		    esac		fi		;;	esac    fi    shiftdoneif [ x"$files" = x ]; then# Nothing to do    exit 0ficase "$makefile" in    '')	if [ -r makefile ]; then	    makefile=makefile	elif [ -r Makefile ]; then	    makefile=Makefile	else	    echo 'no makefile or Makefile found' 1>&2	    exit 1	fi	;;esacif [ X"$makefile" != X- ]; then    if [ x"$append" = xn ]; then        sed -e "/^$magic_string/,\$d" < $makefile > $TMP        echo "$magic_string" >> $TMP    else        cp $makefile $TMP    fifi# need to link .s files to .Sfor i in $files; do    case $i in	*.s)	    dir=`dirname $i`	    base=`basename $i .s`	    (cd $dir; $RM ${base}.S; $LN ${base}.s ${base}.S)	    asmfiles="$asmfiles ${base}.S"	    ;;    esacdoneCMD="$CC -MM $args `echo $files | sed -e 's,\.s$,\.S,g' -e 's,\.s ,\.S ,g'` | 	sed -e 's,\.S$,\.s,g' -e 's,\.S ,\.s ,g'"if [ X"$makefile" != X- ]; then    CMD="$CMD >> $TMP"fieval $CMDif [ X"$makefile" != X- ]; then    $RM ${makefile}.bak    $MV $makefile ${makefile}.bak    $MV $TMP $makefilefiif [ x"$asmfiles" != x ]; then    $RM $asmfilesfi$RM ${TMP}*exit 0

⌨️ 快捷键说明

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