On Mon, 2009-08-03 at 16:12 +0300, Denis Onischenko wrote:
> It seems that the NORMAL_INSTALL variable is assigned to the shell
> command line "@ HOST = "$HOST"; test ".$$HOST"= ...", because in
> another Makefile this variable is used in target rule as:
> 
> install-binPROGRAMS: $(bin_PROGRAMS)
>         @$(NORMAL_INSTALL)
>         test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"

That may be what you WANT it to do, but that's not what it DOES.

> i.e. HOST is not MAKE variable. Instead it is the shell variable in
> shell command line

Again, that may be what you want but that's not what your makefile says.

What this says:

> NORMAL_INSTALL = :
>         @ HOST="$(HOST)" \

is create two make variables; the first line creates a make variable
"NORMAL_INSTALL" which is set to the value ":".

The second line creates another make variable "@ HOST" (in 3.81 and
below) which is set to the value '"$(HOST)" ...'.  In newer versions of
GNU make this is an error, as I've said, because make variables with
whitespace in the name are no longer valid.

> And I thought that the symbol ":" is a special symbol that is used to
> define a value from next line

No.  There is one such special character and it's backslash ("\").

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <[email protected]>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.mad-scientist.us
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist


_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to