This patch is active only for MinGW32 targets.

Whilst using absolute Windows paths (eg C:/) is the easiest
way to configure and install for MinGW32, you don't really
want hard coded drive letters in the binary. This patch
strips off initial drive letters before GNUSTEP_SYSTEM_ROOT,
GNUSTEP_LOCAL_ROOT and GNUSTEP_NETWORK_ROOT are sent as "-D"
defines to the compiler to be hard coded.

There is a corresponding patch (see next e-mail) to NSUser.m
which dynamically prepends the "system drive" drive letter
to these paths at runtime if they are required.

Note that if there are environment variables set for
GNUSTEP_SYSTEM_ROOT etc at runtime, these hard coded paths
and prepended drive letter are NOT consulted.

Stephen Brandon
[EMAIL PROTECTED]
Index: base/Source/GNUmakefile
===================================================================
RCS file: /cvsroot/gnustep/gnustep/core/base/Source/GNUmakefile,v
retrieving revision 1.96
diff -r1.96 GNUmakefile
44a45,63
> 
> ifeq ($(GNUSTEP_TARGET_OS), mingw32)
> 
> GNUSTEP_TARGET_INSTALL_PREFIX := \
>      $(shell echo $(GNUSTEP_SYSTEM_ROOT) | sed 's|^[a-zA-Z]:/|/|')
> GNUSTEP_TARGET_LOCAL_ROOT := \
>      $(shell echo $(GNUSTEP_LOCAL_ROOT) | sed 's|^[a-zA-Z]:/|/|')
> GNUSTEP_TARGET_NETWORK_ROOT := \
>      $(shell echo $(GNUSTEP_NETWORK_ROOT) | sed 's|^[a-zA-Z]:/|/|')
> DEFS= -DGNUSTEP_INSTALL_PREFIX=$(GNUSTEP_TARGET_INSTALL_PREFIX) \
>       -DGNUSTEP_LOCAL_ROOT=$(GNUSTEP_TARGET_LOCAL_ROOT) \
>       -DGNUSTEP_NETWORK_ROOT=$(GNUSTEP_TARGET_NETWORK_ROOT) \
>       -DGNUSTEP_TARGET_DIR=\"$(GNUSTEP_TARGET_DIR)\" \
>       -DGNUSTEP_TARGET_CPU=\"$(GNUSTEP_TARGET_CPU)\" \
>       -DGNUSTEP_TARGET_OS=\"$(GNUSTEP_TARGET_OS)\" \
>       -DLIBRARY_COMBO=\"$(LIBRARY_COMBO)\"
>               
> else
> 
52a72,73
> 
> endif

Reply via email to