GNU make manual 翻译( 一百四十七)

继续翻译

   If you do not want to pass the other flags down, you must change the
value of `MAKEFLAGS', like this:

     subsystem:
             cd subdir && $(MAKE) MAKEFLAGS=

   The command line variable definitions really appear in the variable
`MAKEOVERRIDES', and `MAKEFLAGS' contains a reference to this variable.
If you do want to pass flags down normally, but don't want to pass down
the command line variable definitions, you can reset `MAKEOVERRIDES' to
empty, like this:

     MAKEOVERRIDES =

This is not usually useful to do.  However, some systems have a small
fixed limit on the size of the environment, and putting so much
information into the value of `MAKEFLAGS' can exceed it.  If you see
the error message `Arg list too long', this may be the problem.  (For
strict compliance with POSIX.2, changing `MAKEOVERRIDES' does not
affect `MAKEFLAGS' if the special target `.POSIX' appears in the
makefile.  You probably do not care about this.)

如果你没有想要向下传递其他的标志,你必须改变MAKEFLAGS标志,像这样:

subsystem:
cd subdir && $(MAKE) MAKEFLAGS=

命令行变量定义确实出现在变量 MAKEOVERRIDES中,并且 MAKEFLAGS 包含一个对此变量的引用。如果你想要正常地向下传递标志,但是不想向下传递命令行变量定义,你可以设置 MAKEOVERRIDES 为空值,像下面这样:

MAKEOVERRIDES =

这么做通常是没有用的。但是有些系统在环境的大小方面有一个小小的限制,把很多的信息放入MAKEFLAGS 可能会超出大小。如果你看到错误信息 '参数列表太长(Arg list too long)',可能就是这个原因造成。(为了严格遵循POSIX.2 的兼容性,如果.POSIX出现在makefile中,那么改变MAKEOVERRIDES 不会影响到 MAKEFLAGS)

后文待续

posted @ 2012-10-02 10:33  健哥的数据花园  阅读(314)  评论(0编辑  收藏  举报