bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #30323] No path in MAKE_COMMAND (with fix)


From: anonymous
Subject: [bug #30323] No path in MAKE_COMMAND (with fix)
Date: Wed, 04 Aug 2010 13:50:44 +0000
User-agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2; WOW64; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.1; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C; .NET4.0E)

Follow-up Comment #7, bug #30323 (project make):

Hi Eli,

> Sorry, I don't follow. I'm not even sure we are talking about the same
thing, so let's step back for a moment and see that we understand each other.


Ful ACK.

> This code's sole purpose is to define the value of $MAKE such that it will
cause the same executable to be invoked by sub-Make's. There's no other
purpose here. Agreed? 

ACK.

> Next, let's forget about the comment, it is only correct for Posix
platforms. Let's talk only about what the code actually does on Windows. Okay?


ACK.

> Now, the code in question, in its WINDOWS32 branch, simply mirrors all
backslashes to forward slashes (except in a couple of weirdo cases, which we
will ignore for the moment). Unlike the Posix branch, this code does NOT
prepend the current directory to the value of argv[0]. Do you agree? 

NACK. The line

    argv[0] = xstrdup(w32ify(argv[0],1));

calls w32ify() with the second parameter being 1 causing w32ify() to call
_fullpath().

Then _fullpath() calls GetFullPathName() which is described as:
"merges the name of the current drive and directory with a specified file
name to determine the full path and file name of a specified file."

> Now, if you agree with all of the above, please describe a use-case where
the result of this code will be a value of $MAKE which could potentially
invoke a different executable in a sub-Make. 

1. Have make.exe in the current directory (and not in the PATH).
2. Have a subdirectory 'subdir'.
3. Have a Makefile with the following content:

all:
        cd subdir && $(MAKE)

4. Use cmd.exe and enter 'make'.

You'll get:

cd subdir && make
make: not found
make: *** [all] Error 127

Oliver Schmidt - oliv.schmidt(at)sap.com

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?30323>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]