mohawk2 / dmake

dmake - formerly used by openoffice.org
Other
15 stars 6 forks source link

Bug 104727 - patch for dmake to properly work if installed in a dir spaces in its name #2

Open mohawk2 opened 10 years ago

mohawk2 commented 10 years ago

Transferred from AOO bugzilla: The patch contains fixes for this:

1) dmake is not able even start if it is installed in a directory containing spaces in directory name.

2) I have added a build batch for mingw32 enviroment - see newly added winnt/mingw/build.cmd + winnt/mingw/config.h

Please consider the patch, it would be nice if you can accept it an commit in your SVN as we are using dmake in strawberry perl project (http://www.strawberryperl.com) and do not want to keep any sort of unofficial dmake patches.

Thanks

kmx

Bad news, my patch does not work well with the following Makefile:

#########
LIST1   = a.a ../b.b ./c.c ..\d.d .\e.e /f.f \g.g c:/h/h.h c:\i\i.i
LIST2   = $(LIST1:f)

all:
    echo "LIST2=$(LIST2)"
#########

At the moment I have no idea how to fix it.

I would appreciate any help.

kmx

mohawk2 commented 10 years ago

The patch:

Index: configure.in
===================================================================
--- configure.in (revision 277396)
+++ configure.in (working copy)
@@ -76,7 +76,7 @@
OS_VERSION=cygwin
CASE_INSENSITIVE_FS=true
;;
- "MINGW")
+ MINGW*)
OS_VERSION=mingw
OS_TYPE=winnt
BUILDINFO="Windows / MinGW"
Index: readme/read1st.txt
===================================================================
--- readme/read1st.txt (revision 277396)
+++ readme/read1st.txt (working copy)
@@ -46,7 +46,15 @@
a directory of your choice. You may also want to copy the man/
sub-directory for future access to the manual page.

+With MINGW gcc compiler
+-----------------------
+From dmake root directory run: "winnt\mingw\build.cmd" in a command shell.
+This should create a dmake.exe + relevant *.mk files in "output" subdirectory.

+To install dmake, simply copy the content of "output" subdirectory to
+a directory of your choice.
+
+
All other systems might look in the public/ directory for usefull hints.

Index: startup/winnt/recipes.mk
===================================================================
--- startup/winnt/recipes.mk (revision 277396)
+++ startup/winnt/recipes.mk (working copy)
@@ -6,4 +6,4 @@
%$O : %$S ; $(AS) $(ASFLAGS) $(<:s,/,\)

# Process release-specific refinements, if any.
-.INCLUDE .NOINFER .IGNORE : $(INCFILENAME:d)$(OSRELEASE)$/recipes.mk
+.INCLUDE .NOINFER .IGNORE : "$(INCFILENAME:d)$(OSRELEASE)$/recipes.mk"
Index: startup/winnt/borland/macros.mk
===================================================================
--- startup/winnt/borland/macros.mk (revision 277396)
+++ startup/winnt/borland/macros.mk (working copy)
@@ -1,7 +1,7 @@
# MSDOS Borland-C environment customization.

.IF $(OSENVIRONMENT)
- .INCLUDE .IGNORE .NOINFER : $(INCFILENAME:d)$(OSENVIRONMENT)$/macros.mk
+ .INCLUDE .IGNORE .NOINFER : "$(INCFILENAME:d)$(OSENVIRONMENT)$/macros.mk"
.ENDIF

# Standard C-language command names and flags
Index: startup/winnt/mingw/macros.mk
===================================================================
--- startup/winnt/mingw/macros.mk (revision 277396)
+++ startup/winnt/mingw/macros.mk (working copy)
@@ -3,7 +3,7 @@

# Process environment-specific refinements, if any.
.IF $(OSENVIRONMENT)
- .INCLUDE .NOINFER .IGNORE : $(INCFILENAME:d)$(OSENVIRONMENT)$/macros.mk
+ .INCLUDE .NOINFER .IGNORE : "$(INCFILENAME:d)$(OSENVIRONMENT)$/macros.mk"
.ENDIF

# Make OS-release-specific settings
Index: startup/winnt/microsft/macros.mk
===================================================================
--- startup/winnt/microsft/macros.mk (revision 277396)
+++ startup/winnt/microsft/macros.mk (working copy)
@@ -1,7 +1,7 @@
# MSDOS Microsoft-C environment customization.

.IF $(OSENVIRONMENT)
- .INCLUDE .IGNORE .NOINFER : $(INCFILENAME:d)$(OSENVIRONMENT)$/macros.mk
+ .INCLUDE .IGNORE .NOINFER : "$(INCFILENAME:d)$(OSENVIRONMENT)$/macros.mk"
.ENDIF

# Standard C-language command names and flags
Index: startup/winnt/macros.mk
===================================================================
--- startup/winnt/macros.mk (revision 277396)
+++ startup/winnt/macros.mk (working copy)
@@ -18,7 +18,7 @@
GROUPSHELL *:= $(SHELL)

# Process release-specific refinements, if any.
-.INCLUDE .NOINFER .IGNORE : $(INCFILENAME:d)$(OSRELEASE)$/macros.mk
+.INCLUDE .NOINFER .IGNORE : "$(INCFILENAME:d)$(OSRELEASE)$/macros.mk"

# Applicable suffix definitions
A *:= .lib # Libraries
Index: startup/winnt/msvc6/macros.mk
===================================================================
--- startup/winnt/msvc6/macros.mk (revision 277396)
+++ startup/winnt/msvc6/macros.mk (working copy)
@@ -1,7 +1,7 @@
# MSDOS Microsoft-C environment customization.

.IF $(OSENVIRONMENT)
- .INCLUDE .IGNORE .NOINFER : $(INCFILENAME:d)$(OSENVIRONMENT)$/macros.mk
+ .INCLUDE .IGNORE .NOINFER : "$(INCFILENAME:d)$(OSENVIRONMENT)$/macros.mk"
.ENDIF

# Standard C-language command names and flags
Index: startup/startup.mk
===================================================================
--- startup/startup.mk (revision 277396)
+++ startup/startup.mk (working copy)
@@ -29,10 +29,10 @@
.IMPORT .IGNORE : TMPDIR SHELL

# Default DMAKE configuration, if not overriden by environment
-.INCLUDE .NOINFER $(!null,$(OS) .IGNORE) : $(INCFILENAME:d)config.mk
+.INCLUDE .NOINFER $(!null,$(OS) .IGNORE) : "$(INCFILENAME:d)config.mk"

# Look for a local defaults configuration
-.INCLUDE .NOINFER .IGNORE : $(INCFILENAME:d)local.mk
+.INCLUDE .NOINFER .IGNORE : "$(INCFILENAME:d)local.mk"

# Define the directory separator string.
/ *= $(DIRSEPSTR)
@@ -40,7 +40,7 @@
# Customize macro definitions based on setings of OS, OSRELEASE and
# OSENVIRONMENT, this must come before the default macro definitions which
# follow.
-.INCLUDE .NOINFER .IGNORE : $(INCFILENAME:d)$(OS)$/macros.mk
+.INCLUDE .NOINFER .IGNORE : "$(INCFILENAME:d)$(OS)$/macros.mk"

# ----------------- Default Control Macro definitions -----------------------
# Select appropriate defaults for basic macros
@@ -193,7 +193,7 @@
.END

# Customize default recipe definitions for OS, OSRELEASE, etc. settings.
- .INCLUDE .NOINFER .IGNORE: $(INCFILENAME:d)$(OS)$/recipes.mk
+ .INCLUDE .NOINFER .IGNORE: "$(INCFILENAME:d)$(OS)$/recipes.mk"
.ENDIF

Index: startup/win95/recipes.mk
===================================================================
--- startup/win95/recipes.mk (revision 277396)
+++ startup/win95/recipes.mk (working copy)
@@ -6,4 +6,4 @@
%$O : %$S ; $(AS) $(ASFLAGS) $(<:s,/,\)

# Process release-specific refinements, if any.
-.INCLUDE .NOINFER .IGNORE : $(INCFILENAME:d)$(OSRELEASE)$/recipes.mk
+.INCLUDE .NOINFER .IGNORE : "$(INCFILENAME:d)$(OSRELEASE)$/recipes.mk"
Index: startup/win95/borland/macros.mk
===================================================================
--- startup/win95/borland/macros.mk (revision 277396)
+++ startup/win95/borland/macros.mk (working copy)
@@ -1,7 +1,7 @@
# MSDOS Borland-C environment customization.

.IF $(OSENVIRONMENT)
- .INCLUDE .IGNORE .NOINFER : $(INCFILENAME:d)$(OSENVIRONMENT)$/macros.mk
+ .INCLUDE .IGNORE .NOINFER : "$(INCFILENAME:d)$(OSENVIRONMENT)$/macros.mk"
.ENDIF

# Standard C-language command names and flags
Index: startup/win95/microsft/macros.mk
===================================================================
--- startup/win95/microsft/macros.mk (revision 277396)
+++ startup/win95/microsft/macros.mk (working copy)
@@ -1,7 +1,7 @@
# MSDOS Microsoft-C environment customization.

.IF $(OSENVIRONMENT)
- .INCLUDE .IGNORE .NOINFER : $(INCFILENAME:d)$(OSENVIRONMENT)$/macros.mk
+ .INCLUDE .IGNORE .NOINFER : "$(INCFILENAME:d)$(OSENVIRONMENT)$/macros.mk"
.ENDIF

# Standard C-language command names and flags
Index: startup/win95/macros.mk
===================================================================
--- startup/win95/macros.mk (revision 277396)
+++ startup/win95/macros.mk (working copy)
@@ -18,7 +18,7 @@
GROUPSHELL *:= $(SHELL)

# Process release-specific refinements, if any.
-.INCLUDE .NOINFER .IGNORE : $(INCFILENAME:d)$(OSRELEASE)$/macros.mk
+.INCLUDE .NOINFER .IGNORE : "$(INCFILENAME:d)$(OSRELEASE)$/macros.mk"

# Applicable suffix definitions
A *:= .lib # Libraries
Index: configure
===================================================================
--- configure (revision 277396)
+++ configure (working copy)
@@ -4049,7 +4049,7 @@
OS_VERSION=cygwin
CASE_INSENSITIVE_FS=true
;;
- "MINGW")
+ MINGW*)
OS_VERSION=mingw
OS_TYPE=winnt
BUILDINFO="Windows / MinGW"
Index: winnt/mingw/build.cmd
===================================================================
--- winnt/mingw/build.cmd (revision 0)
+++ winnt/mingw/build.cmd (revision 0)
@@ -0,0 +1,65 @@
+@echo off
+rem ### this script was written by kmx ###
+
+if not exist winnt\mingw\config.h echo You have to run this batch from the root of dmake package!!&pause&goto END
+
+echo ### cleaning 'objects' directory
+if exist objects rmdir /S /Q objects
+mkdir objects
+
+echo ### gonna compile *.c
+set OPTS=-c -Iwinnt\mingw -Iwinnt -I. -O2
+@echo on
+gcc %OPTS% -o objects\infer.o infer.c
+gcc %OPTS% -o objects\make.o make.c
+gcc %OPTS% -o objects\stat.o stat.c
+gcc %OPTS% -o objects\expand.o expand.c
+gcc %OPTS% -o objects\dmstring.o dmstring.c
+gcc %OPTS% -o objects\hash.o hash.c
+gcc %OPTS% -o objects\dag.o dag.c
+gcc %OPTS% -o objects\dmake.o dmake.c
+gcc %OPTS% -o objects\path.o path.c
+gcc %OPTS% -o objects\imacs.o imacs.c
+gcc %OPTS% -o objects\sysintf.o sysintf.c
+gcc %OPTS% -o objects\parse.o parse.c
+gcc %OPTS% -o objects\getinp.o getinp.c
+gcc %OPTS% -o objects\quit.o quit.c
+gcc %OPTS% -o objects\state.o state.c
+gcc %OPTS% -o objects\dmdump.o dmdump.c
+gcc %OPTS% -o objects\macparse.o macparse.c
+gcc %OPTS% -o objects\rulparse.o rulparse.c
+gcc %OPTS% -o objects\percent.o percent.c
+gcc %OPTS% -o objects\function.o function.c
+gcc %OPTS% -o objects\dchdir.o win95/dchdir.c
+gcc %OPTS% -o objects\switchar.o win95/switchar.c
+gcc %OPTS% -o objects\dstrlwr.o msdos/dstrlwr.c
+gcc %OPTS% -o objects\arlib.o msdos/arlib.c
+gcc %OPTS% -o objects\dirbrk.o msdos/dirbrk.c
+gcc %OPTS% -o objects\runargv.o unix/runargv.c
+gcc %OPTS% -o objects\rmprq.o unix/rmprq.c
+gcc %OPTS% -o objects\ruletab.o win95/microsft/ruletab.c
+@echo off
+
+echo ### gonna link dmake.exe
+@echo on
+gcc -g -O2 -o dmake.exe objects\infer.o objects\make.o objects\stat.o objects\expand.o objects\dmstring.o objects\hash.o objects\dag.o objects\dmake.o objects\path.o objects\imacs.o objects\sysintf.o objects\parse.o objects\getinp.o objects\quit.o objects\state.o objects\dmdump.o objects\macparse.o objects\rulparse.o objects\percent.o objects\function.o objects\dchdir.o objects\switchar.o objects\dstrlwr.o objects\arlib.o objects\dirbrk.o objects\runargv.o objects\rmprq.o objects\ruletab.o
+@echo off
+
+echo ### cleaning 'output' directory
+if exist output rmdir /S /Q output
+mkdir output
+mkdir output\startup
+mkdir output\startup\winnt
+mkdir output\startup\winnt\mingw
+
+echo ### copying results into 'output' directory
+copy .\dmake.exe .\output\dmake.exe
+copy .\startup\startup.mk .\output\startup\startup.mk
+copy .\winnt\mingw\config.mk .\output\startup\config.mk
+copy .\startup\winnt\macros.mk .\output\startup\winnt\macros.mk
+copy .\startup\winnt\recipes.mk .\output\startup\winnt\recipes.mk
+copy .\startup\winnt\mingw\macros.mk .\output\startup\winnt\mingw\macros.mk
+
+echo ### done - see results in '%~dp0output\'
+
+:END
Index: winnt/mingw/config.h
===================================================================
--- winnt/mingw/config.h (revision 0)
+++ winnt/mingw/config.h (revision 0)
@@ -0,0 +1,185 @@
+/* config.h. Generated from config.h.in by configure. */
+/* config.h.in. Generated from configure.in by autoheader. */
+
+/* Build info string */
+#define BUILDINFO "Windows / MinGW"
+
+/* Assume case insensitive file system. */
+#define CASE_INSENSITIVE_FS 1
+
+/* Enables the use of spawn instead of fork/exec if it is supported. */
+/* #undef ENABLE_SPAWN */
+
+/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
+ */
+#define HAVE_DIRENT_H 1
+
+/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
+/* #undef HAVE_DOPRNT */
+
+/* Define to 1 if you have the <errno.h> header file. */
+#define HAVE_ERRNO_H 1
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#define HAVE_FCNTL_H 1
+
+/* Define to 1 if you have the `getcwd' function. */
+#define HAVE_GETCWD 1
+
+/* Define to 1 if you have the `gettimeofday' function. */
+#define HAVE_GETTIMEOFDAY 1
+
+/* Define to 1 if you have the `getwd' function. */
+/* #undef HAVE_GETWD */
+
+/* Define to 1 if the system has the type `int16'. */
+/* #undef HAVE_INT16 */
+
+/* Define to 1 if the system has the type `int32'. */
+/* #undef HAVE_INT32 */
+
+/* Define to 1 if the system has the type `int8'. */
+/* #undef HAVE_INT8 */
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#define HAVE_INTTYPES_H 1
+
+/* Define to 1 if you have the <limits.h> header file. */
+#define HAVE_LIMITS_H 1
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define to 1 if you have the `mkstemp' function. */
+/* #undef HAVE_MKSTEMP */
+
+/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
+/* #undef HAVE_NDIR_H */
+
+/* Define to 1 if you have the `settz' function. */
+/* #undef HAVE_SETTZ */
+
+/* Define to 1 if you have the `setvbuf' function. */
+#define HAVE_SETVBUF 1
+
+/* Define to 1 if you have the <spawn.h> header file. */
+/* #undef HAVE_SPAWN_H */
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#define HAVE_STDINT_H 1
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the `strerror' function. */
+#define HAVE_STRERROR 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#define HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the `strlwr' function. */
+#define HAVE_STRLWR 1
+
+/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
+ */
+/* #undef HAVE_SYS_DIR_H */
+
+/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
+ */
+/* #undef HAVE_SYS_NDIR_H */
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#define HAVE_SYS_TIME_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the <sys/wait.h> header file. */
+/* #undef HAVE_SYS_WAIT_H */
+
+/* Define to 1 if you have the `tempnam' function. */
+#define HAVE_TEMPNAM 1
+
+/* Define to 1 if you have the `tzset' function. */
+#define HAVE_TZSET 1
+
+/* Define to 1 if the system has the type `uint16'. */
+/* #undef HAVE_UINT16 */
+
+/* Define to 1 if the system has the type `uint32'. */
+/* #undef HAVE_UINT32 */
+
+/* Define to 1 if the system has the type `uint8'. */
+/* #undef HAVE_UINT8 */
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H 1
+
+/* Define to 1 if you have the <utime.h> header file. */
+#define HAVE_UTIME_H 1
+
+/* Define to 1 if `utime(file, NULL)' sets file's timestamp to the present. */
+#define HAVE_UTIME_NULL 1
+
+/* Define to 1 if you have the `vprintf' function. */
+#define HAVE_VPRINTF 1
+
+/* Define to 1 if you have the <wait.h> header file. */
+/* #undef HAVE_WAIT_H */
+
+/* Define to 1 if your C compiler doesn't accept -c and -o together. */
+/* #undef NO_MINUS_C_MINUS_O */
+
+/* Name of package */
+#define PACKAGE "dmake"
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT ""
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME "dmake"
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING "dmake 4.12"
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME "dmake"
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION "4.12"
+
+/* Define as the return type of signal handlers (`int' or `void'). */
+#define RETSIGTYPE void
+
+/* The size of `int', as computed by sizeof. */
+#define SIZEOF_INT 4
+
+/* The size of `long', as computed by sizeof. */
+#define SIZEOF_LONG 4
+
+/* The size of `short', as computed by sizeof. */
+#define SIZEOF_SHORT 2
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
+#define TIME_WITH_SYS_TIME 1
+
+/* Version number of package */
+#define VERSION "4.12"
+
+/* Define to empty if `const' does not conform to ANSI C. */
+/* #undef const */
+
+/* Define to `long int' if <sys/types.h> does not define. */
+/* #undef off_t */
+
+/* Define to `unsigned int' if <sys/types.h> does not define. */
+/* #undef size_t */
Index: winnt/mingw/dmakeroot.h
===================================================================
--- winnt/mingw/dmakeroot.h (revision 0)
+++ winnt/mingw/dmakeroot.h (revision 0)
@@ -0,0 +1,6 @@
+ /* dmakeroot.h
+ *
+ * This is a generated file. Please modify `configure.in'
+ */
+
+
Index: winnt/mingw/config.mk
===================================================================
--- winnt/mingw/config.mk (revision 0)
+++ winnt/mingw/config.mk (revision 0)
@@ -0,0 +1,3 @@
+OS := winnt
+OSRELEASE := mingw
+#OSENVIRONMENT := ???
Index: expand.c
===================================================================
--- expand.c (revision 277396)
+++ expand.c (working copy)
@@ -280,7 +280,7 @@
SET_TOKEN( &str, src );
e = NIL(char);

- while( *(s = Get_token( &str, "", FALSE )) != '\0' ) {
+ while( *(s = Get_token( &str, NIL(char), FALSE )) != '\0' ) {
HASHPTR hp;

if ( (hp = Get_name(normalize_path(s), Defs, FALSE)) != NIL(HASH)
@@ -330,7 +330,7 @@

if (mod & JUST_FIRST_FLAG) {
SET_TOKEN(&str, src);
- if ((s = Get_token(&str,"",FALSE)) != '\0') {
+ if ((s = Get_token(&str,NIL(char),FALSE)) != '\0') {
/* Recycle the quote at the beginning. */
if(str.tk_quote == 0) {
s--;
@@ -358,7 +358,7 @@
DB_PRINT( "mod", ("Source string [%s]", src) );
res = DmStrDup("");

- while( *(s = Get_token( &str, "", FALSE )) != '\0' ) {
+ while( *(s = Get_token( &str, NIL(char), FALSE )) != '\0' ) {
char *tokstart = s;

/* search for the directory portion of the filename. If the
@@ -460,7 +460,7 @@

/* Build the token list */
SET_TOKEN( &tokens, src );
- while( *(tok = Get_token( &tokens, "", FALSE )) != '\0' ) {
+ while( *(tok = Get_token( &tokens, NIL(char), FALSE )) != '\0' ) {
char *x;

if( first ) {
mohawk2 commented 10 years ago

https://issues.apache.org/ooo/show_bug.cgi?id=104727

mohawk2 commented 10 years ago

@kmx, this patch has been applied on https://github.com/mohawk2/dmake/tree/kmx/4.12.3 and cherry-picked onto master as 86e4f8709dd071fc5cdb5aec46a428507c684af1.

kmx commented 10 years ago

unfortunately, there is still a trouble mentioned in my original ticket

The patch does not work well with the following Makefile.mk:

LIST1   = a.a ../b.b ./c.c ..\d.d .\e.e /f.f \g.g c:/h/h.h c:\i\i.i
LIST2   = $(LIST1:f)

all:
    @echo $(LIST2)

The correct output is a.a b.b c.c d.d e.e f.f g.g h.h i.i

mohawk2 commented 10 years ago

I'm aware; that's why I incorporated your test yesterday in the test suite as dc22c194a938b46995d8cbdf4325a0120331ead4. Unfortunately, your patch broke other tests in the suite (try yourself with make check), but the test above is a useful "canary in the mine". You'll see the precise test that works with your patch, but doesn't work when your patch is removed, so should be a robust sign that dmake will work in "place with space", in 21daabea37672ea18747a895f5073d706f1d85e0.

My current approach is to replace your code change with setting INCFILENAME with " around it, but this is still not quite there as when dmake sees the second " resulting from \$(INCFILENAME:d) it thinks the string is finished.

I'll probably introduce changes both to allow "s1"s2 to produce "s1s2", and also to effectively allow nested "-quoted strings to be returned from Expand as a single "-quoted string.

mohawk2 commented 10 years ago

Not quite ready yet, still.

@kmx, a workaround that would allow dmake to start up when installed in a place-with-space would be to replace the .INCLUDE in startup.mk with just incorporating the files, potentially with if to differentiate between the different OS combinations?

kmx commented 10 years ago

The trouble is that dmake.exe is not even able to load startup.mk

mohawk2 commented 10 years ago

Ah, that's right. So one would need to make a tiny patch to change the default value of DMAKEROOT from $(ABSMAKECMD:d)startup to a bit of code that "manually" did the $(ABSMAKECMD:d) bit. Alternatively, since one is changing environment variables anyway, one can set an env var DMAKEROOT to the right place during installation, and it will then work without changing dmake's code at all.

Do bear in mind I intend to actually fix this properly.

kmx commented 10 years ago

One possible hack (Win32 specific) might be to convert ABSMAKECMD value to short name via GetShortPathName() - see http://msdn.microsoft.com/en-us/library/windows/desktop/aa364989%28v=vs.85%29.aspx

klaernie commented 7 years ago

@kmx the Win32 hack you described is destined to fail, 8.3 conversion is required for this to work, which is not guaranteed to be enabled.