Issue 83940 - Make $(mktmp ..) .WINPATH aware
Summary: Make $(mktmp ..) .WINPATH aware
Status: CLOSED FIXED
Alias: None
Product: Build Tools
Classification: Code
Component: dmake (show other issues)
Version: current
Hardware: PC Windows, all
: P3 Trivial (vote)
Target Milestone: ---
Assignee: hjs
QA Contact: issues@tools
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-25 05:29 UTC by quetschke
Modified: 2013-08-07 15:34 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Patch for dmake (3.49 KB, patch)
2008-02-06 21:29 UTC, quetschke
no flags Details | Diff
./dmake -v -p -r -f ../test.mk >& /cygdrive/h/tmp/dmake.log (2.74 KB, text/plain)
2008-02-26 10:23 UTC, hjs
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description quetschke 2007-11-25 05:29:09 UTC
Currently the result of $(mktmp ..) is not aware of the .WINPATH setting
for cygwin dmakes.

In addition to this the value of TMPDIR is used without verifying if that
directory exists and is uasable - at the moment this allows to force mktmp
to output DOS paths on by setting TMPDIR to a DOS path. This should be fixed.
Comment 1 quetschke 2008-02-06 21:29:29 UTC
Created attachment 51410 [details]
Patch for dmake
Comment 2 quetschke 2008-02-07 19:50:35 UTC
committed
Comment 3 quetschke 2008-02-07 20:24:02 UTC
I started to write a testcase, but that would involve string comparisons
and would only be useful for cygwin, so it is much easier to just test it by hand.

Use the following makefile:

-- makefile.mk --
SHELL*:=/bin/sh
SHELLFLAGS*:=-ce

all .WINPATH : all2
	@echo X1$(mktmp blah)Y

all2 :
	@echo X2$(mktmp blah)Y
-- makefile.mk --

You should get this result:

$ ./dmake/dmake.exe -r
X2/tmp/mkUh8aQ2Y
X1C:/cygwin/tmp/mkeKnoiCY
Comment 4 quetschke 2008-02-07 20:24:45 UTC
Please verify.
Comment 5 hjs 2008-02-25 17:49:39 UTC
nope! both lines the form C:/cygwin/tmp
even more, i'm not able to get the native form at all, no matter what i do with
.WINPATH (or without).
Comment 6 quetschke 2008-02-26 02:10:03 UTC
Hmm, works fine here. Did you use the '-r' switch? Without it the global
.WINPATH setting from solenv/inc/startup/?.mk takes over and unconditionally
enables the
c:/foo/bar style.
Comment 7 hjs 2008-02-26 10:23:35 UTC
Created attachment 51721 [details]
./dmake -v -p -r -f ../test.mk >& /cygdrive/h/tmp/dmake.log
Comment 8 hjs 2008-02-26 10:46:51 UTC
i did a bit of "printf debugging". it's all fine with .WINPATH (i can change it
as i like and see that it's set).
the issue seems to me that Create_temp in sysintf.c already returns path in
c:/bla notation.
maybe that's some kind of hint...
Comment 9 quetschke 2008-02-26 14:58:17 UTC
What is your value of

  $TMPDIR

? Try

$ export TMPDIR= ; ./dmake -r -f ../test.mk
Comment 10 hjs 2008-02-26 15:22:15 UTC
yes, that did the trick. i had TMPDIR set by a sourced  OOo env. reading the
first comment more carefully would have helped too...
Comment 11 hjs 2008-06-05 15:05:48 UTC
.