• 4758阅读
  • 0回复

makeobj有什么用的! [复制链接]

上一主题 下一主题
离线sqsowen
 

只看楼主 倒序阅读 楼主  发表于: 2009-03-28
所需软件

首先你必须安装以下软件,你才能成功完成这份教程:

    * 来自gcc项目的gcc和g++, 最好是4.1或更高的版本。
    * svn(Subversion客户端)
    * pkg-config
    * X11和OpenGL的开发库及头文件
    * libjpeg、libpng、libungif、libxml2和libxslt的开发库及头文件
    * makeobj脚本。可以做为kdesdk-scripts(debian)或类似的软件包的部件来安装,或者直接从WebSVN下载该软件本身。
    * shared-mime-info软件包,是KDE现在使用的freedesktop MIME标准。

你也许还需要安装以下软件:

    * bash
我按照教程的说明安装了以上的软件,然后执行makeobj脚本
脚本内容如下:


#! /usr/bin/env bash

# this is a script around make which basicly checks
# if it's in srcdir or in builddir and changes to
# the right directory for calling /usr/bin/make
# (C) Stephan Kulow

# You may need to set OBJ_REPLACEMENT variable to get it to work.
# In the variable use the sed syntax to switch directories, for example
# export OBJ_REPLACEMENT="s:/home/zack/cvs/kde:/home/zack/build:"
# will assure that the builds are performed under /home/zack/build
# directory, when the cvs is held under /home/zack/cvs/kde.

file=Makefile
dir=.
args=()

while test $# -gt 0 ; do
   case "${1}" in
      -f)
    shift
    file="${1}"
    shift
    args=("${args[@]}" -f $file)
    ;;
      -C)
    shift
    dir="${1}"
    shift ;;
      *)
    args=("${args[@]}" "$1")
    shift
    ;;
    esac
done

if test "$dir" = "." && test ! -f CMakeLists.txt && test -f ../CMakeLists.txt; then
   cd ..
fi

if test ! -f $dir/$file; then
  if test -n "$OBJ_SUBDIR"; then
    dir=$PWD
    subdir=.
    while test ! -f $dir/$OBJ_SUBDIR/$file; do
       subdir=`basename $dir`"/$subdir"
       dir=`dirname $dir`
       if test "$dir" = "/"; then
         # the case that someone puts the compile dir in /
         # is very unlikely, so we better skip here ;)
         echo "can't find $OBJ_SUBDIR above current dir"
         exit 1
       fi
    done
    cd $dir/$OBJ_SUBDIR/$subdir
  else
    if test -n "$OBJ_REPLACEMENT"; then
      pwd=`echo $PWD | sed -e "$OBJ_REPLACEMENT"`
      if test ! -f $pwd/$dir/$file; then
         # No objdir found. But if "make" will work in srcdir, then go ahead; might be a non-kde project.
         test -f $dir/GNUmakefile && file=GNUmakefile
         test -f $dir/makefile && file=makefile
         test -f $dir/$file || file=""
         if test -z "$file"; then
           echo "no objdir found. Tried $pwd"
           exit 1
         fi
      fi
      cd $pwd/$dir
    fi
  fi
else
  cd $dir
fi

echo "makeobj[0]: Entering directory \`$PWD'"
if test -z "$MAKE"; then
    using_new_unsermake=0
    if head -n 1 $file | grep unsermake >/dev/null; then
        using_new_unsermake=1
    fi
    if head -n 1 $file | grep automake >/dev/null; then
        using_new_unsermake=0
    fi
    if test $using_new_unsermake -eq 1; then
        MAKE=`type -p unsermake`
    if test ! -x "$MAKE"; then
        echo 'Makefile was created with unsermake, but there'
        echo 'is no unsermake in $PATH'
        exit 1
    fi
    else
        MAKE=/usr/bin/make
    fi
fi
LANGUAGE=C $MAKE "${args[@]}"
retval=$?
echo "makeobj[0]: Leaving directory \`$PWD'"
exit $retval


输出结果如下:

makeobj[0]: Entering directory `/home/kde-devel'
head: 无法打开 “Makefile” 读取数据: 没有那个文件或目录
head: 无法打开 “Makefile” 读取数据: 没有那个文件或目录
make: *** No targets specified and no makefile found.  Stop.
makeobj[0]: Leaving directory `/home/kde-devel'
  
请高手解答!!!!
行路有风!
快速回复
限100 字节
 
上一个 下一个