提交 2b36350b 编写于 作者: T tbell

7152336: Enable builds on Windows with MinGW/MSYS

Summary: Minimal makefile changes to enable building OpenJDK using MSYS on Windows7
Reviewed-by: ohair, tbell
Contributed-by: volker.simonis@gmail.com
上级 ad62a4f7
...@@ -94,9 +94,9 @@ ifeq ($(PLATFORM), windows) ...@@ -94,9 +94,9 @@ ifeq ($(PLATFORM), windows)
LDOUTPUT = -Fe LDOUTPUT = -Fe
# JDK name required here # JDK name required here
RC_FLAGS += /D "JDK_FNAME=$(PGRM).exe" \ RC_FLAGS += -D "JDK_FNAME=$(PGRM).exe" \
/D "JDK_INTERNAL_NAME=$(PGRM)" \ -D "JDK_INTERNAL_NAME=$(PGRM)" \
/D "JDK_FTYPE=0x1L" -D "JDK_FTYPE=0x1L"
RES = $(OBJDIR)/$(PGRM).res RES = $(OBJDIR)/$(PGRM).res
else else
...@@ -161,7 +161,7 @@ $(UNPACK_EXE): $(UNPACK_EXE_FILES_o) updatefiles winres ...@@ -161,7 +161,7 @@ $(UNPACK_EXE): $(UNPACK_EXE_FILES_o) updatefiles winres
$(CP) mapfile-vers-unpack200 $(TEMPDIR)/mapfile-vers $(CP) mapfile-vers-unpack200 $(TEMPDIR)/mapfile-vers
$(LINKER) $(LDDFLAGS) $(sort $(UNPACK_EXE_FILES_o)) $(RES) $(LIBCXX) $(LDOUTPUT)$(TEMPDIR)/unpack200$(EXE_SUFFIX) $(LINKER) $(LDDFLAGS) $(sort $(UNPACK_EXE_FILES_o)) $(RES) $(LIBCXX) $(LDOUTPUT)$(TEMPDIR)/unpack200$(EXE_SUFFIX)
ifdef MT ifdef MT
$(MT) /manifest $(OBJDIR)/unpack200$(EXE_SUFFIX).manifest /outputresource:$(TEMPDIR)/unpack200$(EXE_SUFFIX);#1 $(MT) -manifest $(OBJDIR)/unpack200$(EXE_SUFFIX).manifest -outputresource:$(TEMPDIR)/unpack200$(EXE_SUFFIX);#1
endif endif
$(CP) $(TEMPDIR)/unpack200$(EXE_SUFFIX) $(UNPACK_EXE) $(CP) $(TEMPDIR)/unpack200$(EXE_SUFFIX) $(UNPACK_EXE)
@$(call binary_file_verification,$@) @$(call binary_file_verification,$@)
......
...@@ -78,7 +78,7 @@ ifeq ($(COMPILER_VERSION), VS2010) ...@@ -78,7 +78,7 @@ ifeq ($(COMPILER_VERSION), VS2010)
MS_RUNTIME_LIBRARIES = $(MSVCRNN_DLL) MS_RUNTIME_LIBRARIES = $(MSVCRNN_DLL)
endif endif
EXTRA_LFLAGS += /LIBPATH:$(DXSDK_LIB_PATH) EXTRA_LFLAGS += -LIBPATH:$(DXSDK_LIB_PATH)
# Full Debug Symbols has been enabled on Windows since JDK1.4.1. # Full Debug Symbols has been enabled on Windows since JDK1.4.1.
# The Full Debug Symbols (FDS) default for VARIANT == OPT builds is # The Full Debug Symbols (FDS) default for VARIANT == OPT builds is
...@@ -198,7 +198,7 @@ CC_OPT = $(CC_OPT/$(OPTIMIZATION_LEVEL)) ...@@ -198,7 +198,7 @@ CC_OPT = $(CC_OPT/$(OPTIMIZATION_LEVEL))
# -MTd Use static debug version (better than -MDd, no runtime issues) # -MTd Use static debug version (better than -MDd, no runtime issues)
# -D_DEBUG Change use of malloc/free/etc to use special debug ones (-MTd) # -D_DEBUG Change use of malloc/free/etc to use special debug ones (-MTd)
# #
# NOTE: We also will use /D _STATIC_CPPLIB so we don't need msvcpnn.dll # NOTE: We also will use -D _STATIC_CPPLIB so we don't need msvcpnn.dll
# #
# If MS_RUNTIME_STATIC is requested we may have a problem, it is no longer # If MS_RUNTIME_STATIC is requested we may have a problem, it is no longer
# supported by VS2010 # supported by VS2010
...@@ -223,12 +223,12 @@ ifeq ($(MFC_DEBUG), true) ...@@ -223,12 +223,12 @@ ifeq ($(MFC_DEBUG), true)
endif endif
# Always add _STATIC_CPPLIB definition # Always add _STATIC_CPPLIB definition
STATIC_CPPLIB_OPTION = /D _STATIC_CPPLIB STATIC_CPPLIB_OPTION = -D _STATIC_CPPLIB
# Silence the warning about using _STATIC_CPPLIB # Silence the warning about using _STATIC_CPPLIB
ifneq ($(SHOW_ALL_WARNINGS),true) ifneq ($(SHOW_ALL_WARNINGS),true)
# Needed with VS2010 to turn off the deprecated warning. # Needed with VS2010 to turn off the deprecated warning.
STATIC_CPPLIB_OPTION += /D _DISABLE_DEPRECATE_STATIC_CPPLIB STATIC_CPPLIB_OPTION += -D _DISABLE_DEPRECATE_STATIC_CPPLIB
endif endif
MS_RUNTIME_OPTION += $(STATIC_CPPLIB_OPTION) MS_RUNTIME_OPTION += $(STATIC_CPPLIB_OPTION)
...@@ -242,7 +242,7 @@ ifeq ($(CC_VERSION),msvc) ...@@ -242,7 +242,7 @@ ifeq ($(CC_VERSION),msvc)
# -Od Turns off optimization and speeds compilation # -Od Turns off optimization and speeds compilation
# -YX -Fp/.../foobar.pch Use precompiled headers (try someday?) # -YX -Fp/.../foobar.pch Use precompiled headers (try someday?)
# -nologo Don't print out startup message # -nologo Don't print out startup message
# /D _STATIC_CPPLIB # -D _STATIC_CPPLIB
# Use static link for the C++ runtime (so msvcpnn.dll not needed) # Use static link for the C++ runtime (so msvcpnn.dll not needed)
# #
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
...@@ -258,12 +258,12 @@ ifeq ($(CC_VERSION),msvc) ...@@ -258,12 +258,12 @@ ifeq ($(CC_VERSION),msvc)
CFLAGS_COMMON += $(MS_RUNTIME_OPTION) $(CFLAGS_$(COMPILER_VERSION)) CFLAGS_COMMON += $(MS_RUNTIME_OPTION) $(CFLAGS_$(COMPILER_VERSION))
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
LDEBUG = /debug LDEBUG = -debug
endif endif
ifeq ($(VTUNE_SUPPORT), true) ifeq ($(VTUNE_SUPPORT), true)
OTHER_CFLAGS = -Z7 -Ox OTHER_CFLAGS = -Z7 -Ox
LDEBUG += /pdb:NONE LDEBUG += -pdb:NONE
endif endif
# VS2010, always need safe exception handlers, not needed on 64bit # VS2010, always need safe exception handlers, not needed on 64bit
...@@ -272,7 +272,7 @@ ifeq ($(CC_VERSION),msvc) ...@@ -272,7 +272,7 @@ ifeq ($(CC_VERSION),msvc)
endif endif
# LFLAGS are the flags given to $(LINK) and used to build the actual DLL file # LFLAGS are the flags given to $(LINK) and used to build the actual DLL file
BASELFLAGS = -nologo /opt:REF /incremental:no BASELFLAGS = -nologo -opt:REF -incremental:no
LFLAGS = $(BASELFLAGS) $(LDEBUG) $(EXTRA_LFLAGS) $(LFLAGS_$(COMPILER_VERSION)) LFLAGS = $(BASELFLAGS) $(LDEBUG) $(EXTRA_LFLAGS) $(LFLAGS_$(COMPILER_VERSION))
LDDFLAGS += $(LFLAGS_$(COMPILER_VERSION)) LDDFLAGS += $(LFLAGS_$(COMPILER_VERSION))
...@@ -404,7 +404,7 @@ else ...@@ -404,7 +404,7 @@ else
JDK_UPDATE_VER := 0 JDK_UPDATE_VER := 0
endif endif
RC_FLAGS = /l 0x409 /r RC_FLAGS = -l 0x409 -r
ifeq ($(VARIANT), OPT) ifeq ($(VARIANT), OPT)
RC_FLAGS += -d NDEBUG RC_FLAGS += -d NDEBUG
......
...@@ -292,9 +292,9 @@ endif ...@@ -292,9 +292,9 @@ endif
ifeq ($(PLATFORM),windows) ifeq ($(PLATFORM),windows)
# JDK name required here # JDK name required here
RC_FLAGS += /D "JDK_FNAME=$(LIBRARY).dll" \ RC_FLAGS += -D "JDK_FNAME=$(LIBRARY).dll" \
/D "JDK_INTERNAL_NAME=$(LIBRARY)" \ -D "JDK_INTERNAL_NAME=$(LIBRARY)" \
/D "JDK_FTYPE=0x2L" -D "JDK_FTYPE=0x2L"
endif endif
# Native library building # Native library building
......
...@@ -206,9 +206,9 @@ endif ...@@ -206,9 +206,9 @@ endif
@$(ECHO) Created $@ @$(ECHO) Created $@
# JDK name required here # JDK name required here
RC_FLAGS += /D "JDK_FNAME=$(LIBRARY).dll" \ RC_FLAGS += -D "JDK_FNAME=$(LIBRARY).dll" \
/D "JDK_INTERNAL_NAME=$(LIBRARY)" \ -D "JDK_INTERNAL_NAME=$(LIBRARY)" \
/D "JDK_FTYPE=0x2L" -D "JDK_FTYPE=0x2L"
$(OBJDIR)/$(LIBRARY).res: $(VERSIONINFO_RESOURCE) $(OBJDIR)/$(LIBRARY).res: $(VERSIONINFO_RESOURCE)
ifndef LOCAL_RESOURCE_FILE ifndef LOCAL_RESOURCE_FILE
......
...@@ -157,9 +157,9 @@ $(ACTUAL_PROGRAM):: classes $(INIT) ...@@ -157,9 +157,9 @@ $(ACTUAL_PROGRAM):: classes $(INIT)
# #
ifeq ($(PLATFORM), windows) ifeq ($(PLATFORM), windows)
# JDK name required here # JDK name required here
RC_FLAGS += /D "JDK_FNAME=$(PROGRAM)$(EXE_SUFFIX)" \ RC_FLAGS += -D "JDK_FNAME=$(PROGRAM)$(EXE_SUFFIX)" \
/D "JDK_INTERNAL_NAME=$(PROGRAM)" \ -D "JDK_INTERNAL_NAME=$(PROGRAM)" \
/D "JDK_FTYPE=0x1L" -D "JDK_FTYPE=0x1L"
$(OBJDIR)/$(PROGRAM).res: $(VERSIONINFO_RESOURCE) $(OBJDIR)/$(PROGRAM).res: $(VERSIONINFO_RESOURCE)
@$(prep-target) @$(prep-target)
...@@ -201,11 +201,11 @@ endif ...@@ -201,11 +201,11 @@ endif
@$(prep-target) @$(prep-target)
@set -- $?; \ @set -- $?; \
$(ECHO) Rebuilding $@ because of $$1 $$2 $$3 $$4 $$5 $$6 $${7:+...}; $(ECHO) Rebuilding $@ because of $$1 $$2 $$3 $$4 $$5 $$6 $${7:+...};
$(LINK) -out:$@ /STACK:$(STACK_SIZE) \ $(LINK) -out:$@ -STACK:$(STACK_SIZE) \
$(MAP_OPTION) $(LFLAGS) $(LDFLAGS) \ $(MAP_OPTION) $(LFLAGS) $(LDFLAGS) \
@$(OBJDIR)/$(PROGRAM).lcf $(LDLIBS) @$(OBJDIR)/$(PROGRAM).lcf $(LDLIBS)
ifdef MT ifdef MT
$(MT) /manifest $(OBJDIR)/$(PROGRAM).exe.manifest /outputresource:$@;#1 $(MT) -manifest $(OBJDIR)/$(PROGRAM).exe.manifest /outputresource:$@;#1
endif endif
@$(call binary_file_verification,$@) @$(call binary_file_verification,$@)
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
......
...@@ -784,11 +784,22 @@ initial-image-jre:: initial-image-jre-setup \ ...@@ -784,11 +784,22 @@ initial-image-jre:: initial-image-jre-setup \
$(RT_JAR) $(RESOURCES_JAR) $(JSSE_JAR) $(JFR_JAR) \ $(RT_JAR) $(RESOURCES_JAR) $(JSSE_JAR) $(JFR_JAR) \
$(BUILDMETAINDEX_JARFILE) $(BUILDMETAINDEX_JARFILE)
@# Copy in bin directory @# Copy in bin directory
ifeq ($(USING_MSYS),true)
# No cpio in MinGW/MSYS
$(CD) $(OUTPUTDIR) && $(TAR) -cf - bin | ($(CD) $(JRE_IMAGE_DIR) && $(TAR) -xpf -)
else
$(CD) $(OUTPUTDIR) && $(FIND) bin -depth | $(CPIO) -pdum $(JRE_IMAGE_DIR) $(CD) $(OUTPUTDIR) && $(FIND) bin -depth | $(CPIO) -pdum $(JRE_IMAGE_DIR)
endif
@# CTE plugin security change require new empty directory lib/applet @# CTE plugin security change require new empty directory lib/applet
$(MKDIR) -p $(JRE_IMAGE_DIR)/lib/applet $(MKDIR) -p $(JRE_IMAGE_DIR)/lib/applet
@# Copy in lib directory @# Copy in lib directory
ifeq ($(USING_MSYS),true)
# No cpio in MinGW/MSYS
$(CD) $(OUTPUTDIR) && $(TAR) -cf - lib | ($(CD) $(JRE_IMAGE_DIR) && $(TAR) -xpf -)
else
$(CD) $(OUTPUTDIR) && $(FIND) lib -depth | $(CPIO) -pdum $(JRE_IMAGE_DIR) $(CD) $(OUTPUTDIR) && $(FIND) lib -depth | $(CPIO) -pdum $(JRE_IMAGE_DIR)
endif
ifeq ($(USING_CYGWIN),true) ifeq ($(USING_CYGWIN),true)
$(RM) -rf $(JRE_IMAGE_DIR)/[A-Za-z]: $(RM) -rf $(JRE_IMAGE_DIR)/[A-Za-z]:
$(RM) -rf $(OUTPUTDIR)/[A-Za-z]: $(RM) -rf $(OUTPUTDIR)/[A-Za-z]:
...@@ -919,11 +930,17 @@ endif ...@@ -919,11 +930,17 @@ endif
# only places from which we copy everything), but because the presence # only places from which we copy everything), but because the presence
# of this file causes cygwin's find to bomb out, thus breaking the build # of this file causes cygwin's find to bomb out, thus breaking the build
# in "install". # in "install".
initial-image-jdk-setup: initial-image-jdk-setup:
$(RM) -r $(JDK_IMAGE_DIR) $(RM) -r $(JDK_IMAGE_DIR)
$(MKDIR) -p $(JDK_IMAGE_DIR)/jre $(MKDIR) -p $(JDK_IMAGE_DIR)/jre
ifeq ($(USING_MSYS),true)
($(CD) $(JRE_IMAGE_DIR) && $(TAR) -cf - . \
| ($(CD) $(JDK_IMAGE_DIR)/jre && $(TAR) -xpf -))
else
($(CD) $(JRE_IMAGE_DIR) && $(FIND) . -depth -print \ ($(CD) $(JRE_IMAGE_DIR) && $(FIND) . -depth -print \
| $(CPIO) -pdum $(JDK_IMAGE_DIR)/jre ) | $(CPIO) -pdum $(JDK_IMAGE_DIR)/jre )
endif
ifeq ($(USING_CYGWIN),true) ifeq ($(USING_CYGWIN),true)
$(RM) -rf $(JRE_IMAGE_DIR)/[A-Za-z]: $(RM) -rf $(JRE_IMAGE_DIR)/[A-Za-z]:
$(RM) -rf $(JDK_IMAGE_DIR)/jre/[A-Za-z]: $(RM) -rf $(JDK_IMAGE_DIR)/jre/[A-Za-z]:
......
...@@ -169,15 +169,19 @@ CD = cd # intrinsic unix command ...@@ -169,15 +169,19 @@ CD = cd # intrinsic unix command
ifeq ($(PLATFORM),windows) ifeq ($(PLATFORM),windows)
ifdef USING_CYGWIN ifdef USING_CYGWIN
# Intrinsic unix command, with backslash-escaped character interpretation # Intrinsic unix command, with backslash-escaped character interpretation
ECHO = $(UNIXCOMMAND_PATH)echo -e ECHO = $(UNIXCOMMAND_PATH)echo -e
ZIPEXE = $(UNIXCOMMAND_PATH)zip ZIPEXE = $(UNIXCOMMAND_PATH)zip
UNZIP = $(UNIXCOMMAND_PATH)unzip UNZIP = $(UNIXCOMMAND_PATH)unzip
# Some CYGWIN nawk versions require BINMODE=w for proper '\r' interpretation # Some CYGWIN nawk versions require BINMODE=w for proper '\r' interpretation
NAWK = $(UNIXCOMMAND_PATH)awk -v BINMODE=w NAWK = $(UNIXCOMMAND_PATH)awk -v BINMODE=w
else else
ZIPEXE = $(UTILS_DEVTOOL_PATH)zip ZIPEXE = $(UTILS_DEVTOOL_PATH)zip
UNZIP = $(UTILS_DEVTOOL_PATH)unzip UNZIP = $(UTILS_DEVTOOL_PATH)unzip
NAWK = $(UNIXCOMMAND_PATH)awk NAWK = $(UNIXCOMMAND_PATH)awk
ifdef USING_MSYS
ECHO = $(UTILS_COMMAND_PATH)echo -e
AR = $(UTILS_DEVTOOL_PATH)ar
endif
endif endif
# Re-define some utilities # Re-define some utilities
LEX =# override GNU Make intrinsic: no lex on windows LEX =# override GNU Make intrinsic: no lex on windows
......
...@@ -112,6 +112,15 @@ define OptFullPath ...@@ -112,6 +112,15 @@ define OptFullPath
$(shell if [ "$1" != "" -a -d "$1" ]; then $(CYGPATH_CMD) "$1" 2> $(DEV_NULL); else echo "$1"; fi) $(shell if [ "$1" != "" -a -d "$1" ]; then $(CYGPATH_CMD) "$1" 2> $(DEV_NULL); else echo "$1"; fi)
endef endef
else else
ifdef USING_MSYS
DOSPATH_CMD:=$(shell cd $(JDK_TOPDIR) 2> $(DEV_NULL) && pwd)/make/tools/msys_build_scripts/dospath.sh
define FullPath
$(subst \,/,$(shell $(DOSPATH_CMD) $1))
endef
define OptFullPath
$(shell if [ "$1" != "" -a -d "$1" ]; then (cd $1 && pwd); else echo "$1"; fi)
endef
else
# Temporary until we upgrade to MKS 8.7, MKS pwd returns mixed mode path # Temporary until we upgrade to MKS 8.7, MKS pwd returns mixed mode path
define FullPath define FullPath
$(shell cd $1 2> $(DEV_NULL) && pwd) $(shell cd $1 2> $(DEV_NULL) && pwd)
...@@ -120,6 +129,7 @@ define OptFullPath ...@@ -120,6 +129,7 @@ define OptFullPath
$(shell if [ "$1" != "" -a -d "$1" ]; then (cd $1 && pwd); else echo "$1"; fi) $(shell if [ "$1" != "" -a -d "$1" ]; then (cd $1 && pwd); else echo "$1"; fi)
endef endef
endif endif
endif
# System drive # System drive
ifdef SYSTEMDRIVE ifdef SYSTEMDRIVE
...@@ -146,43 +156,47 @@ else ...@@ -146,43 +156,47 @@ else
ifdef USING_CYGWIN ifdef USING_CYGWIN
UNIXCOMMAND_PATH :=$(call PrefixPath,/usr/bin) UNIXCOMMAND_PATH :=$(call PrefixPath,/usr/bin)
else else
ifdef ROOTDIR ifdef USING_MSYS
xROOTDIR :="$(subst \,/,$(ROOTDIR))" UNIXCOMMAND_PATH :=$(call PrefixPath,/bin)
_rootdir :=$(call FullPath,$(xROOTDIR))
else else
xROOTDIR :="$(_system_drive)/mksnt" ifdef ROOTDIR
_rootdir :=$(call FullPath,$(xROOTDIR)) xROOTDIR :="$(subst \,/,$(ROOTDIR))"
endif _rootdir :=$(call FullPath,$(xROOTDIR))
ifneq ($(_rootdir),) else
UNIXCOMMAND_PATH :=$(call PrefixPath,$(_rootdir)/mksnt) xROOTDIR :="$(_system_drive)/mksnt"
endif _rootdir :=$(call FullPath,$(xROOTDIR))
endif endif
ifneq ($(_rootdir),)
UNIXCOMMAND_PATH :=$(call PrefixPath,$(_rootdir)/mksnt)
endif
endif # USING_MSYS
endif # USING_CYGWIN
endif endif
UNIXCOMMAND_PATH:=$(call AltCheckSpaces,UNIXCOMMAND_PATH) UNIXCOMMAND_PATH:=$(call AltCheckSpaces,UNIXCOMMAND_PATH)
# Get version of MKS or CYGWIN # Get version of MKS or CYGWIN
ifndef USING_CYGWIN ifdef USING_MKS
_MKS_VER :=$(shell $(MKSINFO) 2>&1 | $(GREP) Release | $(TAIL) -1 | $(SED) -e 's@.*\(Release.*\)@\1@') _MKS_VER :=$(shell $(MKSINFO) 2>&1 | $(GREP) Release | $(TAIL) -1 | $(SED) -e 's@.*\(Release.*\)@\1@')
MKS_VER :=$(call GetVersion,$(_MKS_VER)) MKS_VER :=$(call GetVersion,$(_MKS_VER))
# At this point, we can re-define FullPath to use DOSNAME_CMD # At this point, we can re-define FullPath to use DOSNAME_CMD
CHECK_MKS87:=$(call CheckVersions,$(MKS_VER),8.7) CHECK_MKS87:=$(call CheckVersions,$(MKS_VER),8.7)
TRY_DOSNAME:=false TRY_DOSNAME:=false
ifeq ($(CHECK_MKS87),same) ifeq ($(CHECK_MKS87),same)
TRY_DOSNAME:=true TRY_DOSNAME:=true
endif endif
# Newer should be ok # Newer should be ok
ifeq ($(CHECK_MKS87),newer) ifeq ($(CHECK_MKS87),newer)
TRY_DOSNAME:=true TRY_DOSNAME:=true
endif endif
ifeq ($(TRY_DOSNAME),true) ifeq ($(TRY_DOSNAME),true)
ifeq ($(shell $(UNIXCOMMAND_PATH)dosname -s $(_system_drive)/ 2> $(DEV_NULL)),$(_system_drive)/) ifeq ($(shell $(UNIXCOMMAND_PATH)dosname -s $(_system_drive)/ 2> $(DEV_NULL)),$(_system_drive)/)
_DOSNAME=$(UNIXCOMMAND_PATH)dosname _DOSNAME=$(UNIXCOMMAND_PATH)dosname
DOSNAME_CMD:=$(_DOSNAME) -s DOSNAME_CMD:=$(_DOSNAME) -s
define FullPath define FullPath
$(subst //,/,$(shell echo $1 | $(DOSNAME_CMD) 2> $(DEV_NULL))) $(subst //,/,$(shell echo $1 | $(DOSNAME_CMD) 2> $(DEV_NULL)))
endef endef
endif # test dosname -s endif # test dosname -s
endif # TRY_DOSNAME endif # TRY_DOSNAME
endif # MKS endif # MKS
# We try to get references to what we need via the default component # We try to get references to what we need via the default component
...@@ -440,10 +454,14 @@ else ...@@ -440,10 +454,14 @@ else
ifdef USING_CYGWIN ifdef USING_CYGWIN
DEVTOOLS_PATH :=$(UNIXCOMMAND_PATH) DEVTOOLS_PATH :=$(UNIXCOMMAND_PATH)
else else
xDEVTOOLS_PATH :="$(_system_drive)/utils" ifdef USING_MSYS
fxDEVTOOLS_PATH :=$(call FullPath,$(xDEVTOOLS_PATH)) DEVTOOLS_PATH :=$(UNIXCOMMAND_PATH)
DEVTOOLS_PATH :=$(call PrefixPath,$(fxDEVTOOLS_PATH)) else
endif xDEVTOOLS_PATH :="$(_system_drive)/utils"
fxDEVTOOLS_PATH :=$(call FullPath,$(xDEVTOOLS_PATH))
DEVTOOLS_PATH :=$(call PrefixPath,$(fxDEVTOOLS_PATH))
endif # USING_MSYS
endif # USING_CYGWIN
endif endif
DEVTOOLS_PATH:=$(call AltCheckSpaces,DEVTOOLS_PATH) DEVTOOLS_PATH:=$(call AltCheckSpaces,DEVTOOLS_PATH)
...@@ -636,7 +654,7 @@ HOTSPOT_LIB_PATH:=$(call AltCheckValue,HOTSPOT_LIB_PATH) ...@@ -636,7 +654,7 @@ HOTSPOT_LIB_PATH:=$(call AltCheckValue,HOTSPOT_LIB_PATH)
# Special define for checking the binaries # Special define for checking the binaries
# All windows dll and exe files should have been built with /NXCOMPAT # All windows dll and exe files should have been built with -NXCOMPAT
# and be setup for dynamic base addresses. # and be setup for dynamic base addresses.
# In addition, we should not be dependent on certain dll files that # In addition, we should not be dependent on certain dll files that
# we do not or cannot redistribute. # we do not or cannot redistribute.
...@@ -648,37 +666,37 @@ else ...@@ -648,37 +666,37 @@ else
BANNED_DLLS=msvcp100[.]dll|msvcr100d[.]dll|msvcrtd[.]dll BANNED_DLLS=msvcp100[.]dll|msvcr100d[.]dll|msvcrtd[.]dll
endif endif
# Check for /safeseh (only used on 32bit) # Check for -safeseh (only used on 32bit)
define binary_file_safeseh_verification # binary_file define binary_file_safeseh_verification # binary_file
( \ ( \
$(ECHO) "Checking for /SAFESEH usage in: $1" && \ $(ECHO) "Checking for -SAFESEH usage in: $1" && \
if [ "`$(DUMPBIN) /loadconfig $1 | $(EGREP) -i 'Safe Exception Handler Table'`" = "" ] ; then \ if [ "`$(DUMPBIN) -loadconfig $1 | $(EGREP) -i 'Safe Exception Handler Table'`" = "" ] ; then \
$(ECHO) "ERROR: Did not find 'Safe Exception Handler Table' in loadconfig: $1" ; \ $(ECHO) "ERROR: Did not find 'Safe Exception Handler Table' in loadconfig: $1" ; \
$(DUMPBIN) /loadconfig $1 ; \ $(DUMPBIN) -loadconfig $1 ; \
exit 6 ; \ exit 6 ; \
fi ; \ fi ; \
) )
endef endef
# Check for /NXCOMPAT usage # Check for -NXCOMPAT usage
define binary_file_nxcompat_verification # binary_file define binary_file_nxcompat_verification # binary_file
( \ ( \
$(ECHO) "Checking for /NXCOMPAT usage in: $1" && \ $(ECHO) "Checking for -NXCOMPAT usage in: $1" && \
if [ "`$(DUMPBIN) /headers $1 | $(EGREP) -i 'NX compatible'`" = "" ] ; then \ if [ "`$(DUMPBIN) -headers $1 | $(EGREP) -i 'NX compatible'`" = "" ] ; then \
$(ECHO) "ERROR: Did not find 'NX compatible' in headers: $1" ; \ $(ECHO) "ERROR: Did not find 'NX compatible' in headers: $1" ; \
$(DUMPBIN) /headers $1 ; \ $(DUMPBIN) -headers $1 ; \
exit 7 ; \ exit 7 ; \
fi ; \ fi ; \
) )
endef endef
# Check for /DYNAMICBASE usage # Check for -DYNAMICBASE usage
define binary_file_dynamicbase_verification # binary_file define binary_file_dynamicbase_verification # binary_file
( \ ( \
$(ECHO) "Checking for /DYNAMICBASE usage in: $1" && \ $(ECHO) "Checking for -DYNAMICBASE usage in: $1" && \
if [ "`$(DUMPBIN) /headers $1 | $(EGREP) -i 'Dynamic base'`" = "" ] ; then \ if [ "`$(DUMPBIN) -headers $1 | $(EGREP) -i 'Dynamic base'`" = "" ] ; then \
$(ECHO) "ERROR: Did not find 'Dynamic base' in headers: $1" ; \ $(ECHO) "ERROR: Did not find 'Dynamic base' in headers: $1" ; \
$(DUMPBIN) /headers $1 ; \ $(DUMPBIN) -headers $1 ; \
exit 8 ; \ exit 8 ; \
fi ; \ fi ; \
) )
...@@ -688,9 +706,9 @@ endef ...@@ -688,9 +706,9 @@ endef
define binary_file_dll_verification # binary_file define binary_file_dll_verification # binary_file
( \ ( \
$(ECHO) "Checking for banned dependencies in: $1" && \ $(ECHO) "Checking for banned dependencies in: $1" && \
if [ "`$(DUMPBIN) /dependents $1 | $(EGREP) -i '$(BANNED_DLLS)'`" != "" ] ; then \ if [ "`$(DUMPBIN) -dependents $1 | $(EGREP) -i '$(BANNED_DLLS)'`" != "" ] ; then \
$(ECHO) "ERROR: Found use of $(BANNED_DLLS)"; \ $(ECHO) "ERROR: Found use of $(BANNED_DLLS)"; \
$(DUMPBIN) /dependents $1 ; \ $(DUMPBIN) -dependents $1 ; \
exit 9 ; \ exit 9 ; \
fi ; \ fi ; \
) )
......
...@@ -70,6 +70,8 @@ PLATFORM_SHARED=done ...@@ -70,6 +70,8 @@ PLATFORM_SHARED=done
# LIBARCH32 solaris only: sparc or i386 # LIBARCH32 solaris only: sparc or i386
# LIBARCH64 solaris only: sparcv9 or amd64 # LIBARCH64 solaris only: sparcv9 or amd64
# USING_CYGWIN windows only: true or false # USING_CYGWIN windows only: true or false
# USING_MSYS windows only: true or false
# USING_MKS windows only: true or false
# ISHIELD_TEMP_MIN windows only: minimum disk space in temp area # ISHIELD_TEMP_MIN windows only: minimum disk space in temp area
# Only run uname once in this make session. # Only run uname once in this make session.
...@@ -306,6 +308,8 @@ endif ...@@ -306,6 +308,8 @@ endif
# Windows with and without CYGWIN will be slightly different # Windows with and without CYGWIN will be slightly different
ifeq ($(SYSTEM_UNAME), Windows_NT) ifeq ($(SYSTEM_UNAME), Windows_NT)
PLATFORM = windows PLATFORM = windows
USING_MKS = true
export USING_MKS
endif endif
ifneq (,$(findstring CYGWIN,$(SYSTEM_UNAME))) ifneq (,$(findstring CYGWIN,$(SYSTEM_UNAME)))
PLATFORM = windows PLATFORM = windows
...@@ -318,6 +322,11 @@ ifneq (,$(findstring CYGWIN,$(SYSTEM_UNAME))) ...@@ -318,6 +322,11 @@ ifneq (,$(findstring CYGWIN,$(SYSTEM_UNAME)))
export CYGWIN_HOME export CYGWIN_HOME
endif endif
endif endif
ifneq (,$(findstring MINGW,$(SYSTEM_UNAME)))
PLATFORM = windows
USING_MSYS = true
export USING_MSYS
endif
# Platform settings specific to Windows # Platform settings specific to Windows
ifeq ($(PLATFORM), windows) ifeq ($(PLATFORM), windows)
...@@ -395,11 +404,12 @@ ifeq ($(PLATFORM), windows) ...@@ -395,11 +404,12 @@ ifeq ($(PLATFORM), windows)
endif endif
ARCH_FAMILY = $(ARCH) ARCH_FAMILY = $(ARCH)
# Where is unwanted output to be delivered? # Where is unwanted output to be delivered?
# MKS uses the special file "NUL", cygwin uses the customary unix file. # MKS uses the special file "NUL"; Cygwin and MinGW/MSYS use the
ifeq ($(USING_CYGWIN),true) # customary unix file.
DEV_NULL = /dev/null ifeq ($(USING_MKS),true)
else
DEV_NULL = NUL DEV_NULL = NUL
else
DEV_NULL = /dev/null
endif endif
export DEV_NULL export DEV_NULL
# Classpath separator # Classpath separator
...@@ -440,28 +450,11 @@ ifeq ($(PLATFORM), windows) ...@@ -440,28 +450,11 @@ ifeq ($(PLATFORM), windows)
_MB_OF_MEMORY := \ _MB_OF_MEMORY := \
$(shell free -m | grep Mem: | awk '{print $$2;}' ) $(shell free -m | grep Mem: | awk '{print $$2;}' )
else else
# Windows 2000 has the mem utility, but two memory areas # Windows XP and higher has the systeminfo utility
# extended memory is what is beyond 1024M _MB_OF_MEMORY := \
_B_OF_EXT_MEMORY := \ $(shell systeminfo 2> $(DEV_NULL) | \
$(shell mem 2> $(DEV_NULL) | \ grep 'Total Physical Memory:' | \
grep 'total contiguous extended memory' | awk '{print $$1;}') awk '{print $$4;}' | sed -e 's@,@@')
ifeq ($(_B_OF_EXT_MEMORY),)
_B_OF_MEMORY := \
$(shell mem 2> $(DEV_NULL) | \
grep 'total conventional memory' | awk '{print $$1;}')
else
_B_OF_MEMORY := \
$(shell expr 1048576 '+' $(_B_OF_EXT_MEMORY) 2> $(DEV_NULL))
endif
ifeq ($(_B_OF_MEMORY),)
# Windows 2003 has the systeminfo utility use it if mem doesn't work
_MB_OF_MEMORY := \
$(shell systeminfo 2> $(DEV_NULL) | \
grep 'Total Physical Memory:' | \
awk '{print $$4;}' | sed -e 's@,@@')
else
_MB_OF_MEMORY := $(shell expr $(_B_OF_MEMORY) '/' 1024 2> $(DEV_NULL))
endif
endif endif
ifeq ($(shell expr $(_MB_OF_MEMORY) '+' 0 2> $(DEV_NULL)), $(_MB_OF_MEMORY)) ifeq ($(shell expr $(_MB_OF_MEMORY) '+' 0 2> $(DEV_NULL)), $(_MB_OF_MEMORY))
MB_OF_MEMORY := $(_MB_OF_MEMORY) MB_OF_MEMORY := $(_MB_OF_MEMORY)
......
...@@ -182,8 +182,13 @@ ifeq ($(PLATFORM),windows) ...@@ -182,8 +182,13 @@ ifeq ($(PLATFORM),windows)
ALL_SETTINGS+=$(call addRequiredVersionSetting,CYGWIN_VER) ALL_SETTINGS+=$(call addRequiredVersionSetting,CYGWIN_VER)
ALL_SETTINGS+=$(call addRequiredSetting,CYGPATH_CMD) ALL_SETTINGS+=$(call addRequiredSetting,CYGPATH_CMD)
else else
ALL_SETTINGS+=$(call addRequiredVersionSetting,MKS_VER) ifdef USING_MSYS
ALL_SETTINGS+=$(call addOptionalSetting,DOSNAME_CMD) ALL_SETTINGS+=$(call addRequiredSetting,USING_MSYS)
ALL_SETTINGS+=$(call addRequiredSetting,DOSPATH_CMD)
else
ALL_SETTINGS+=$(call addRequiredVersionSetting,MKS_VER)
ALL_SETTINGS+=$(call addOptionalSetting,DOSNAME_CMD)
endif
endif endif
endif endif
ifeq ($(PLATFORM),linux) ifeq ($(PLATFORM),linux)
......
...@@ -395,7 +395,7 @@ endif ...@@ -395,7 +395,7 @@ endif
ifeq ($(PLATFORM), windows) ifeq ($(PLATFORM), windows)
MKS_CHECK :=$(call CheckVersions,$(MKS_VER),$(REQUIRED_MKS_VER)) MKS_CHECK :=$(call CheckVersions,$(MKS_VER),$(REQUIRED_MKS_VER))
sane-mks: sane-mks:
ifndef USING_CYGWIN ifdef USING_MKS
ifeq ($(MKS_CHECK),missing) ifeq ($(MKS_CHECK),missing)
@$(call OfficialErrorMessage,MKS version,$(MKS_VER),$(REQUIRED_MKS_VER)) @$(call OfficialErrorMessage,MKS version,$(MKS_VER),$(REQUIRED_MKS_VER))
endif endif
...@@ -905,14 +905,25 @@ sane-unixcommand_path: ...@@ -905,14 +905,25 @@ sane-unixcommand_path:
"" >> $(ERROR_FILE) ; \ "" >> $(ERROR_FILE) ; \
fi fi
ifeq ($(PLATFORM), windows) ifeq ($(PLATFORM), windows)
@for utility in cpio ar file m4 ; do \ ifeq ($(USING_MSYS), true)
@for utility in $(AR) $(FILE) $(M4) ; do \
if [ ! -r "`$(WHICH) $${utility}`" ]; then \ if [ ! -r "`$(WHICH) $${utility}`" ]; then \
$(ECHO) "WARNING: You do not have the utility $${utility} in the \n" \ $(ECHO) "WARNING: You do not have the utility $${utility} in the \n" \
" directory $(UNIXCOMMAND_PATH). \n" \ " directory $(UNIXCOMMAND_PATH). \n" \
" The utilities cpio, ar, file, and m4 are required. \n" \ " The utilities ar, file and m4 are required. \n" \
"" >> $(WARNING_FILE) ; \ "" >> $(WARNING_FILE) ; \
fi; \ fi; \
done done
else
@for utility in $(AR) $(CPIO) $(FILE) $(M4) ; do \
if [ ! -r "`$(WHICH) $${utility}`" ]; then \
$(ECHO) "WARNING: You do not have the utility $${utility} in the \n" \
" directory $(UNIXCOMMAND_PATH). \n" \
" The utilities ar, cpio, file and m4 are required. \n" \
"" >> $(WARNING_FILE) ; \
fi; \
done
endif
endif endif
###################################################### ######################################################
...@@ -999,7 +1010,8 @@ ifeq ($(PLATFORM), windows) ...@@ -999,7 +1010,8 @@ ifeq ($(PLATFORM), windows)
" This is normally obtained from the WINDOWSSDKDIR." \ " This is normally obtained from the WINDOWSSDKDIR." \
"" >> $(ERROR_FILE) "" >> $(ERROR_FILE)
endif endif
ifeq ($(wildcard $(DUMPBIN)),) # MinGW/MSYS make 3.81 will not tolerate a path with a quoted substring
ifeq ($(wildcard $(subst ",,$(DUMPBIN))),)
@$(ECHO) "ERROR: Cannot find the DUMPBIN utility from path: $(DUMPBIN)\n" \ @$(ECHO) "ERROR: Cannot find the DUMPBIN utility from path: $(DUMPBIN)\n" \
" This is normally obtained from the COMPILER_PATH." \ " This is normally obtained from the COMPILER_PATH." \
"" >> $(ERROR_FILE) "" >> $(ERROR_FILE)
......
...@@ -176,17 +176,38 @@ else ...@@ -176,17 +176,38 @@ else
else else
windows_arch=i586 windows_arch=i586
fi fi
repo=`hg root | sed -e 's@\\\\@/@g'`
# We need to check if we are running a CYGWIN shell # We need to check if we are running a CYGWIN shell
if [ "$(uname -a | fgrep Cygwin)" != "" -a -f /bin/cygpath ] ; then if [ "$(echo ${osname} | fgrep Cygwin)" != "" -a -f /bin/cygpath ] ; then
# For CYGWIN, uname will have "Cygwin" in it, and /bin/cygpath should exist # For CYGWIN, uname will have "Cygwin" in it, and /bin/cygpath should exist
# Utility to convert to short pathnames without spaces # Utility to convert to short pathnames without spaces
cygpath="/usr/bin/cygpath -a -m -s" cygpath="/usr/bin/cygpath -a -m -s"
cygpathp="/usr/bin/cygpath -p"
# Most unix utilities are in the /usr/bin # Most unix utilities are in the /usr/bin
unixcommand_path="/usr/bin" unixcommand_path="/usr/bin"
# Make the prompt tell you CYGWIN # Make the prompt tell you CYGWIN
export PS1="CYGWIN:${COMPUTERNAME}:${USERNAME}[\!] " export PS1="CYGWIN:${COMPUTERNAME}:${USERNAME}[\!] "
elif [ "$(echo ${osname} | fgrep MINGW)" != "" ] ; then
# Utility to convert to short pathnames without spaces
cygpath="${repo}/make/tools/msys_build_scripts/dospath.sh"
if [ ! -f ${cygpath} ] ; then
echo "ERROR: Cannot find cygpath or equivalent on this machine"
exit 1
fi
# Utility to fix a path to MinGW/MSYS format - the equivalent of 'cygpath -p'
for tfile in "${repo}/make/scripts/fixpath.pl" "${repo}/../make/scripts/fixpath.pl"; do
if [ -f ${tfile} ] ; then
cygpathp="/bin/perl ${tfile} -m"
fi
done;
if [ -z "${cygpathp}" ] ; then
echo "ERROR: Cannot find make/scripts/fixpath.pl on this machine"
exit 1
fi
unixcommand_path="/usr/bin"
else else
echo "ERROR: Cannot find CYGWIN on this machine" echo "ERROR: Cannot find CYGWIN or MinGW/MSYS on this machine"
exit 1 exit 1
fi fi
if [ "${ALT_UNIXCOMMAND_PATH}" != "" ] ; then if [ "${ALT_UNIXCOMMAND_PATH}" != "" ] ; then
...@@ -204,17 +225,18 @@ else ...@@ -204,17 +225,18 @@ else
else else
sys_root=$(${cygpath} "C:/WINNT") sys_root=$(${cygpath} "C:/WINNT")
fi fi
path4sdk="${unixcommand_path};${sys_root}/system32;${sys_root};${sys_root}/System32/Wbem"
if [ ! -d "${sys_root}" ] ; then if [ ! -d "${sys_root}" ] ; then
echo "WARNING: No system root found at: ${sys_root}" echo "WARNING: No system root found at: ${sys_root}"
fi fi
# Build a : separated path making sure each segment is acceptable to ${osname}
path4sdk="${unixcommand_path}:"`${cygpathp} "${sys_root}/system32;${sys_root};${sys_root}/System32/Wbem"`
# Compiler setup (nasty part) # Compiler setup (nasty part)
# NOTE: You can use vcvars32.bat to set PATH, LIB, and INCLUDE. # NOTE: You can use vcvars32.bat to set PATH, LIB, and INCLUDE.
# NOTE: CYGWIN has a link.exe too, make sure the compilers are first # NOTE: CYGWIN has a link.exe too, make sure the compilers are first
# Use supplied vsvars.sh # Use supplied vsvars.sh
repo=`hg root`
if [ -f "${repo}/make/scripts/vsvars.sh" ] ; then if [ -f "${repo}/make/scripts/vsvars.sh" ] ; then
eval `sh ${repo}/make/scripts/vsvars.sh -v10` eval `sh ${repo}/make/scripts/vsvars.sh -v10`
elif [ -f "${repo}/../make/scripts/vsvars.sh" ] ; then elif [ -f "${repo}/../make/scripts/vsvars.sh" ] ; then
......
...@@ -37,11 +37,11 @@ ifeq ($(OPENJDK),true) ...@@ -37,11 +37,11 @@ ifeq ($(OPENJDK),true)
# Start with CFLAGS (which gets us the required -xarch setting on solaris) # Start with CFLAGS (which gets us the required -xarch setting on solaris)
ifeq ($(PLATFORM), windows) ifeq ($(PLATFORM), windows)
FT_OPTIONS = /nologo /c FT_OPTIONS = -nologo -c
FREETYPE_DLL = $(FREETYPE_LIB_PATH)/freetype.dll FREETYPE_DLL = $(FREETYPE_LIB_PATH)/freetype.dll
FT_LD_OPTIONS = $(FREETYPE_LIB_PATH)/freetype.lib FT_LD_OPTIONS = $(FREETYPE_LIB_PATH)/freetype.lib
ifdef MT ifdef MT
FT_LD_OPTIONS += /manifest FT_LD_OPTIONS += -manifest
endif endif
else else
FT_OPTIONS = $(CFLAGS) FT_OPTIONS = $(CFLAGS)
...@@ -72,11 +72,11 @@ $(FT_TEST): freetypecheck.c ...@@ -72,11 +72,11 @@ $(FT_TEST): freetypecheck.c
$(prep-target) $(prep-target)
ifeq ($(PLATFORM), windows) ifeq ($(PLATFORM), windows)
$(CC) $(FT_OPTIONS) $(CC_OBJECT_OUTPUT_FLAG)$(FT_OBJ) $< $(CC) $(FT_OPTIONS) $(CC_OBJECT_OUTPUT_FLAG)$(FT_OBJ) $<
$(LINK) $(FT_LD_OPTIONS) /OUT:$(FT_TEST) $(FT_OBJ) $(LINK) $(FT_LD_OPTIONS) -OUT:$(FT_TEST) $(FT_OBJ)
$(CP) $(FREETYPE_DLL) $(@D)/ $(CP) $(FREETYPE_DLL) $(@D)/
ifdef MT ifdef MT
$(CP) $(MSVCRNN_DLL_PATH)/$(MSVCRNN_DLL) $(@D)/ $(CP) $(MSVCRNN_DLL_PATH)/$(MSVCRNN_DLL) $(@D)/
$(MT) /manifest $(FT_TEST).manifest /outputresource:$(FT_TEST);#1 $(MT) -manifest $(FT_TEST).manifest -outputresource:$(FT_TEST);#1
endif endif
else else
@$(CC) $(FT_OPTIONS) -o $@ $< $(FT_LD_OPTIONS) @$(CC) $(FT_OPTIONS) -o $@ $< $(FT_LD_OPTIONS)
......
#
# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
# A shell script which converts its first argument, which must be an existing
# path name, into a DOS (aka 8.3) path name. If the path is a file, only the
# directory part of the whole path will be converted.
# This shell script executes the Visual Basic helper script 'dospath.vbs'
# which must be located in the same directory as this script itself.
# The Visual Basic script will be invoked trough the "Windows Script Host"
# which is available by default on Windows since Windows 98.
pushd `dirname "$0"` > /dev/null
ABS_PATH=`pwd`
popd > /dev/null
if [ -d "$1" ]; then
echo `cd "$1" && cscript.exe -nologo $ABS_PATH/dospath.vbs`;
elif [ -f "$1" ]; then
DIR=`dirname "$1"`;
echo `cd "$DIR" && cscript.exe -nologo $ABS_PATH/dospath.vbs`\\`basename "$1"`;
fi
'
' Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
'
' This code is free software; you can redistribute it and/or modify it
' under the terms of the GNU General Public License version 2 only, as
' published by the Free Software Foundation. Oracle designates this
' particular file as subject to the "Classpath" exception as provided
' by Oracle in the LICENSE file that accompanied this code.
'
' This code is distributed in the hope that it will be useful, but WITHOUT
' ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
' FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
' version 2 for more details (a copy is included in the LICENSE file that
' accompanied this code).
'
' You should have received a copy of the GNU General Public License version
' 2 along with this work; if not, write to the Free Software Foundation,
' Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
'
' Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
' or visit www.oracle.com if you need additional information or have any
' questions.
'
'
' Visual Basic Script which returns the DOS (aka 8.3) filename of the current
' directory.
' Only called from 'dospath.sh' during a Windows build under MinGW/MSYS.
'
Set fso=CreateObject("Scripting.FileSystemObject")
Set path = fso.GetFolder(".")
WScript.Echo path.ShortPath
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册