Apache OpenOffice (AOO) Bugzilla – Issue 73499
Provide a mode to cygwin dmake to generate DOSish paths
Last modified: 2013-08-07 15:34:52 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 $^.)
Created attachment 42183 [details] WINPATH patch for dmake
Created attachment 42496 [details] .WINPATH patch for dmake
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.
Created attachment 42525 [details] .WINPATH patch for dmake48
Created attachment 42562 [details] .WINPATH patch for dmake48
Created attachment 43693 [details] .WINPATH patch for dmake48
Created attachment 43778 [details] .WINPATH patch for dmake48
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
Committed documentation and testcase.
@ause: Please verify
reassign
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.
tests/misc-18 breaks because solaris uname doesn't know "-o". checking "uname -s" != "SunOS" first helps
I committed a fix for the _drop_mac() problem.
I committed a change to misc-18 to make it (I hope) Solaris compatible. @ause: Please verify.
builds still work fine w.o. .WINPATH, testcases passed
dmake 4.8 is on the MWS now