[Mew-dist 1779] Re: install Mew-1.90

SAKAI Kiyotaka ksakai at example.com
1997年 8月 29日 (金) 12:02:22 JST


>> In article <19970829113014X.kazu at example.com>, Kazu Yamamoto (山本和彦) <Kazu at example.com> writes:

> これは Makefile 内の変数は、シェル変数と等価だといっていますか? 

> 本当なら知らなかったぞ...

> Makefile 内から、親シェルの変数を参照できることは知っています。

GNU make の info を読んでみると、

     Variables in `make' can come from the environment in which `make' is
  run.  Every environment variable that `make' sees when it starts up is
  transformed into a `make' variable with the same name and value.  But
  an explicit assignment in the makefile, or with a command argument,
  overrides the environment.  (If the `-e' flag is specified, then values
  from the environment override assignments in the makefile.  *Note
  Summary of Options: Options Summary.  But this is not recommended
  practice.)

と書かれているので、原則として ${NAME} で参照される変数は

  1. command line argument
  2. Makefile 内で設定されているもの
  3. 環境変数

の順序で等価に参照されていることになると思います。

ただし、別のところで

     Unlike most variables, the variable `SHELL' is never set from the
  environment.  This is because the `SHELL' environment variable is used
  to specify your personal choice of shell program for interactive use.
  It would be very bad for personal choices like this to affect the
  functioning of makefiles.  *Note Variables from the Environment:
  Environment.

という記述があるので、GNU make の仕様として SHELL だけは無視するように
なっているようです。
-- 
酒井 清隆 (E-mail: ksakai at example.com)



Mew-dist メーリングリストの案内