From c720eb081e7ffac433e49e521805da9b0f1b355b Mon Sep 17 00:00:00 2001 From: ohair Date: Thu, 15 May 2008 13:04:31 -0700 Subject: [PATCH] 6590549: Cygwin build of OpenJDK has problems and not very well documented Summary: Just the Makefile changes to fix a cygwin nawk BINMODE=w problem. Reviewed-by: igor, tbell --- make/common/shared/Defs-utils.gmk | 4 +++- make/java/java/Makefile | 2 +- make/java/nio/Makefile | 8 ++++---- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/make/common/shared/Defs-utils.gmk b/make/common/shared/Defs-utils.gmk index 3886ee65c..fe0ab8831 100644 --- a/make/common/shared/Defs-utils.gmk +++ b/make/common/shared/Defs-utils.gmk @@ -148,13 +148,15 @@ ifeq ($(PLATFORM),windows) ECHO = $(UNIXCOMMAND_PATH)echo -e ZIPEXE = $(UNIXCOMMAND_PATH)zip UNZIP = $(UNIXCOMMAND_PATH)unzip + # Some CYGWIN nawk versions require BINMODE=w for proper '\r' interpretation + NAWK = $(UNIXCOMMAND_PATH)awk -v BINMODE=w else ZIPEXE = $(UTILS_DEVTOOL_PATH)zip UNZIP = $(UTILS_DEVTOOL_PATH)unzip + NAWK = $(UNIXCOMMAND_PATH)awk endif # Re-define some utilities LEX =# override GNU Make intrinsic: no lex on windows - NAWK = $(UNIXCOMMAND_PATH)awk endif # Linux specific diff --git a/make/java/java/Makefile b/make/java/java/Makefile index 06e112e83..863ee1a30 100644 --- a/make/java/java/Makefile +++ b/make/java/java/Makefile @@ -394,7 +394,7 @@ LOCALES_GEN_SH = localelist.sh $(GENSRCDIR)/sun/util/CoreResourceBundleControl.java: \ $(SHARE_SRC)/classes/sun/util/CoreResourceBundleControl-XLocales.java $(LOCALES_GEN_SH) @$(prep-target) - NAWK=$(NAWK) SED=$(SED) $(SH) $(LOCALES_GEN_SH) "$(JRE_NONEXIST_LOCALES)" \ + NAWK="$(NAWK)" SED="$(SED)" $(SH) $(LOCALES_GEN_SH) "$(JRE_NONEXIST_LOCALES)" \ $< $@ clean:: $(RM) $(GENSRCDIR)/sun/util/CoreResourceBundleControl.java diff --git a/make/java/nio/Makefile b/make/java/nio/Makefile index 0a9070f82..635d80ce8 100644 --- a/make/java/nio/Makefile +++ b/make/java/nio/Makefile @@ -191,7 +191,7 @@ sources: $(SPP) $(FILES_genout) GEN_BUFFER_SH = genBuffer.sh -GEN_BUFFER_CMD = SPP="$(SPP_CMD)" NAWK=$(NAWK) SED=$(SED) SH=$(SH) \ +GEN_BUFFER_CMD = SPP="$(SPP_CMD)" NAWK="$(NAWK)" SED="$(SED)" SH="$(SH)" \ $(SH) $(GEN_BUFFER_SH) # Public abstract buffer classes @@ -582,7 +582,7 @@ $(BUF_GEN)/ByteBufferAsDoubleBuffer%L.java: $(BUF_SRC)/ByteBufferAs-X-Buffer.jav GEN_CODER_SH = genCoder.sh -GEN_CODER_CMD = SPP="$(SPP_CMD)" SED=$(SED) NAWK=$(NAWK) SH=$(SH) $(SH) $(GEN_CODER_SH) +GEN_CODER_CMD = SPP="$(SPP_CMD)" SED="$(SED)" NAWK="$(NAWK)" SH="$(SH)" $(SH) $(GEN_CODER_SH) $(CS_GEN)/CharsetDecoder.java: $(CS_SRC)/Charset-X-Coder.java $(GEN_CODER_SH) $(prep-target) @@ -602,7 +602,7 @@ $(CS_GEN)/CharsetEncoder.java: $(CS_SRC)/Charset-X-Coder.java $(GEN_CODER_SH) GEN_EX_SH = genExceptions.sh -GEN_EX_CMD = NAWK=$(NAWK) SH=$(SH) $(SH) $(GEN_EX_SH) +GEN_EX_CMD = NAWK="$(NAWK)" SH="$(SH)" $(SH) $(GEN_EX_SH) $(CH_GEN)/%Exception.java: genExceptions.sh $(CH_SRC)/exceptions $(prep-target) @@ -635,7 +635,7 @@ $(SCS_GEN)/StandardCharsets.java: genCharsetProvider.sh \ $(HASHER_JARFILE) $(SCS_SRC)/standard-charsets $(prep-target) @$(RM) $@.temp - NAWK=$(NAWK) TEMPDIR=$(TEMPDIR) SH=$(SH) \ + NAWK="$(NAWK)" TEMPDIR="$(TEMPDIR)" SH="$(SH)" \ HASHER="$(BOOT_JAVA_CMD) -jar $(HASHER_JARFILE)" \ $(SH) -e genCharsetProvider.sh $(SCS_SRC)/standard-charsets $(SCS_GEN) -- GitLab