Date: Tue, 23 Feb 1999 16:20:17 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: "Salvador Eduardo Tropea (SET)" cc: djgpp-workers AT delorie DOT com Subject: Re: Bug in make? In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp-workers AT delorie DOT com On Tue, 23 Feb 1999, Salvador Eduardo Tropea (SET) wrote: > Just $(MAKE), it looks like the second copy of make expands this variable > using some strange thing. It just takes argv[0] as it is passed by DOS, and doesn't do anything to change how it looks. > Why if make is called with $(MAKE) expands with > forward slashes and if make is called with "make" expands it with forward > slashes? Because the top-level Make gets argv[0] with all slashes converted to forward slashes by the startup code. This is the default operation of the startup code (you can change it with one of the bits in __crt0_startup_flags). In the second case, E:\DJ\BIN/make.exe is created by spawnv, by looking along the PATH, and passed like that to the child Make. When argv[0] is passed from another DJGPP program, it is not subject to the normal startup processing, but is instead passed as is. This is how DJGPP always worked, since v1.x, and it was decided to not change that in v2.x. > Is very strange. From where comes these forward slashes? argv[0]? From argv[0] that is created by __dosexec_find_on_path function from dosexec.c and passed via spawnv to the child. > 1) Make used a mixed stuff (2 back and one forward!) So? Most programs, including DOS itself and Make, don't have any problems with such pathnames. > 2) Make expands this variable in a different way if: No, the expansion is the same, it's just that argv[0] is different in these two cases, like I explained above.