文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>xmkmf的源码(其实就是imake)

xmkmf的源码(其实就是imake)

时间:2007-03-11  来源:paradiseHIT

#!/bin/sh

# $XFree86: xc/config/util/xmkmf.cpp,v 1.3 2000/11/06 21:57:10 dawes Exp $
#
# make a Makefile from an Imakefile from inside or outside the sources
#
# $Xorg: xmkmf.cpp,v 1.3 2000/08/17 19:41:53 cpqbld Exp $

usage="usage:  $0 [-a] [top_of_sources_pathname [current_directory]]"

configdirspec=-I/etc/X11/config/cf
topdir=
curdir=.
do_all=
imake_defines=

while [ $# -gt 0 ]
do
    case "$1" in
    -D*)
        imake_defines="$imake_defines $1"
 shift
 ;;
    -a)
 do_all="yes"
 shift
 ;;
    *)
     break
 ;;
    esac
done

case $# in
    0) ;;
    1) topdir=$1 ;;
    2) topdir=$1 curdir=$2 ;;
    *) echo "$usage" 1>&2; exit 1 ;;
esac

case "$topdir" in
    -*) echo "$usage" 1>&2; exit 1 ;;
esac

if [ -f Makefile ]; then
    echo mv -f Makefile Makefile.bak
    mv -f Makefile Makefile.bak
fi

if [ "$topdir" = "" ]; then
    args="-DUseInstalled "$configdirspec
else
    args="-I$topdir/config/cf -DTOPDIR=$topdir -DCURDIR=$curdir"
fi

echo imake $imake_defines $args
case "$do_all" in
yes)
    imake $imake_defines $args &&
    echo "make Makefiles" &&
    make Makefiles &&
    echo "make includes" &&
    make includes &&
    echo "make depend" &&
    make depend
    ;;
*)
    imake $imake_defines $args
    ;;
esac
相关阅读 更多 +
排行榜 更多 +
僵尸阴谋最新版

僵尸阴谋最新版

飞行射击 下载
狗子突围逃生游戏

狗子突围逃生游戏

飞行射击 下载
战术冷却最新版本

战术冷却最新版本

飞行射击 下载