红联Linux门户
Linux帮助

有熟悉Makefile的么?谢谢了!

发布时间:2012-05-01 13:14:43来源:红联作者:sentimental
ifneq ("$(ComSpec)", "")
ifeq ("$(OSTYPE)", "cygwin")
DIRSEP ?=/
else
DIRSEP ?=\\
endif
else
DIRSEP ?= /
endif
这段是什么意思?比较当前目录之后,DIRSEP ?=/与 ?=\\是什么意思?
文章评论

共有 2 条评论

  1. wei2012dt 于 2012-05-01 22:44:08发表:

    我是来学习的,楼上说的不够具体阿。
    DIRSEP Director Seperator

    Section: Operating System Functions
    Usage
    Returns the directory seperator character for the current platform. The general syntax for its use is

    y = dirsep

    This function can be used to build up paths (or see fullfile for another way to do this. 但愿有所帮助

  2. jinger7281 于 2012-05-01 21:47:47发表:

    你这段代码的基本思路是判断当前系统是什么系统然后来确定路径分隔符应该是用哪种