6590549: Cygwin build of OpenJDK has problems and not very well documented
authorohair
Thu, 15 May 2008 13:04:31 -0700
changeset 530 dbf0077bad01
parent 470 c7ce5d308be7
child 531 8850388e2e16
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
jdk/make/common/shared/Defs-utils.gmk
jdk/make/java/java/Makefile
jdk/make/java/nio/Makefile
--- a/jdk/make/common/shared/Defs-utils.gmk	Wed May 14 14:06:58 2008 -0700
+++ b/jdk/make/common/shared/Defs-utils.gmk	Thu May 15 13:04:31 2008 -0700
@@ -148,13 +148,15 @@
     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
--- a/jdk/make/java/java/Makefile	Wed May 14 14:06:58 2008 -0700
+++ b/jdk/make/java/java/Makefile	Thu May 15 13:04:31 2008 -0700
@@ -394,7 +394,7 @@
 $(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
--- a/jdk/make/java/nio/Makefile	Wed May 14 14:06:58 2008 -0700
+++ b/jdk/make/java/nio/Makefile	Thu May 15 13:04:31 2008 -0700
@@ -191,7 +191,7 @@
 
 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 @@
 
 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 @@
 
 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 @@
     $(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)