Issue 73499 - Provide a mode to cygwin dmake to generate DOSish paths
Summary: Provide a mode to cygwin dmake to generate DOSish paths
Status: CLOSED FIXED
Alias: None
Product: Build Tools
Classification: Code
Component: dmake (show other issues)
Version: current
Hardware: All Windows, all
: P3 Trivial (vote)
Target Milestone: ---
Assignee: hjs
QA Contact: issues@tools
URL:
Keywords:
Depends on: 73996
Blocks:
  Show dependency tree
 
Reported: 2007-01-16 01:47 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
WINPATH patch for dmake (17.54 KB, patch)
2007-01-16 01:50 UTC, quetschke
no flags Details | Diff
.WINPATH patch for dmake (32.98 KB, patch)
2007-01-26 17:39 UTC, quetschke
no flags Details | Diff
.WINPATH patch for dmake48 (30.68 KB, patch)
2007-01-28 17:00 UTC, quetschke
no flags Details | Diff
.WINPATH patch for dmake48 (28.50 KB, patch)
2007-01-30 03:04 UTC, quetschke
no flags Details | Diff
.WINPATH patch for dmake48 (25.29 KB, patch)
2007-03-14 02:00 UTC, quetschke
no flags Details | Diff
.WINPATH patch for dmake48 (25.89 KB, patch)
2007-03-17 20:02 UTC, quetschke
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description quetschke 2007-01-16 01:47:53 UTC
The main reason we need guw on W32-bash is that a dmake compiled on cygwin
generates POSIX paths instead of DOS like paths.

The following (preliminary) patch adds a new attribute .WINPATH to generate
DOS paths for dmakes dynamic macros. (So far for $@, $*, $>, $?, $<, $& and $^.)
Comment 1 quetschke 2007-01-16 01:50:12 UTC
Created attachment 42183 [details]
WINPATH patch for dmake
Comment 2 quetschke 2007-01-26 17:39:57 UTC
Created attachment 42496 [details]
.WINPATH patch for dmake
Comment 3 quetschke 2007-01-26 17:44:19 UTC
The previous patch extends .WINPATH to also generate (if needed) DOS paths
for $(PWD), $(MAKEDIR) and $(TMD).

The patch includes several small unrelated fixes that I will commit separately.

It's not extensively tested yet and there is still room for improvement but
this seems to be all that is needed to get rid of guw.
Comment 4 quetschke 2007-01-28 17:00:03 UTC
Created attachment 42525 [details]
.WINPATH patch for dmake48
Comment 5 quetschke 2007-01-30 03:04:31 UTC
Created attachment 42562 [details]
.WINPATH patch for dmake48
Comment 6 quetschke 2007-03-14 02:00:26 UTC
Created attachment 43693 [details]
.WINPATH patch for dmake48
Comment 7 quetschke 2007-03-17 20:02:14 UTC
Created attachment 43778 [details]
.WINPATH patch for dmake48
Comment 8 quetschke 2007-03-17 20:05:48 UTC
I comitted the previous patch to cws_src680_dmake48. Documentation is still
missing but here is a short explanation:

A new .WINPATH attribute to generate Windows style paths (with regular slashes)
instead of the default cygwin style (POSIX) paths for dmake's dynamic macros
was added to dmake.

This attribute is specific for cygwin dmake executables and non-cygwin
environments ignore this attribute.

The windows style paths use regular slashes ('/') instead of the usual windows
backslash ('\') as directory separator to avoid quoting problems (It still
is a cygwin dmake!) and cygwin as well as native windows programs should have
no problems using this (c:/foo/bar) path representation.

The affected macros are $@, $*, $>, $?, $<, $&, $^ and $(PWD), $(MAKEDIR) and
$(TMD).

Examples:

Content of $(PWD) without .WINPATH (default):  /cygdrive/c/temp

Content of $(PWD) with .WINPATH set:           c:/temp
Comment 9 quetschke 2007-03-23 21:45:01 UTC
Committed documentation and testcase.
Comment 10 quetschke 2007-03-23 21:45:26 UTC
@ause: Please verify
Comment 11 quetschke 2007-03-24 14:11:13 UTC
reassign
Comment 12 hjs 2007-03-30 18:02:02 UTC
in make.c Make() in case of an make erroro, haspointer m_at may be passed to
_drop_mac() before being defined. since it isn't initialized to NULL it
potentially gets "freed" . initializing seems to help.
Comment 13 hjs 2007-03-30 18:36:33 UTC
tests/misc-18 breaks because solaris uname doesn't know "-o". checking "uname
-s" != "SunOS" first helps
Comment 14 quetschke 2007-04-09 04:11:42 UTC
I committed a fix for the _drop_mac() problem.
Comment 15 quetschke 2007-04-09 04:34:13 UTC
I committed a change to misc-18 to make it (I hope) Solaris compatible.

@ause: Please verify.
Comment 16 hjs 2007-05-31 13:37:20 UTC
builds still work fine w.o. .WINPATH, testcases passed
Comment 17 hjs 2007-07-13 13:55:36 UTC
dmake 4.8 is on the MWS now