diff --git a/make/common/Defs-embedded.gmk b/make/common/Defs-embedded.gmk index ce574a74b602af7fe11b2025e22969e05abe9a5a..de449f82b5a0f704218e9abafa73b0738c7eb168 100644 --- a/make/common/Defs-embedded.gmk +++ b/make/common/Defs-embedded.gmk @@ -60,5 +60,10 @@ ifeq ($(PLATFORM), linux) endif endif +# NIO Platform specific source file location +ifdef CROSS_COMPILE_ARCH + NIO_PLATFORM_CLASSES_ROOT_DIR = $(CLOSED_PLATFORM_SRC)/classes/ +endif + endif # JAVASE_EMBEDDED diff --git a/make/java/nio/Makefile b/make/java/nio/Makefile index 4c55385607ee405e40377be0594a25d805c76f2c..cedc64bfa467916275d90f78de6d6709e4c45916 100644 --- a/make/java/nio/Makefile +++ b/make/java/nio/Makefile @@ -255,7 +255,7 @@ FILES_export += \ sun/nio/fs/LinuxWatchService.java \ sun/nio/fs/UnixCopyFile.java \ sun/nio/fs/UnixNativeDispatcher.java - + FILES_gen += \ sun/nio/fs/UnixConstants.java endif # PLATFORM = linux @@ -771,7 +771,7 @@ $(CS_GEN)/CharsetEncoder.java: $(CHARSET_X_CODER_TEMPLATE) $(GEN_CODER_SH) # GEN_EX_SH = genExceptions.sh - + GEN_EX_CMD = NAWK="$(NAWK)" SH="$(SH)" $(SH) $(GEN_EX_SH) $(CH_GEN)/%Exception.java: genExceptions.sh $(CH_SRC)/exceptions @@ -820,14 +820,19 @@ $(TEMPDIR)/$(GENSOR_SRC) : $(GENSOR_SRC) $(GENSOR_EXE) : $(TEMPDIR)/$(GENSOR_SRC) $(prep-target) - ($(CD) $(TEMPDIR); $(HOST_CC) $(CPPFLAGS) $(LDDFLAGS) \ + ($(CD) $(TEMPDIR); $(CC) $(CPPFLAGS) $(LDDFLAGS) \ -o genSocketOptionRegistry$(EXE_SUFFIX) $(GENSOR_SRC)) +ifdef NIO_PLATFORM_CLASSES_ROOT_DIR +$(SCH_GEN)/SocketOptionRegistry.java: $(NIO_PLATFORM_CLASSES_ROOT_DIR)/sun/nio/ch/SocketOptionRegistry-$(PLATFORM)-$(ARCH).java + $(prep-target) + $(CP) $< $@ +else $(SCH_GEN)/SocketOptionRegistry.java: $(GENSOR_EXE) $(prep-target) NAWK="$(NAWK)" SH="$(SH)" $(SH) -e addNotices.sh "$(SOR_COPYRIGHT_YEARS)" > $@ $(GENSOR_EXE) >> $@ - +endif # # Generated sun.nio.cs SingleByte classes # @@ -851,12 +856,18 @@ GENUC_COPYRIGHT_YEARS = $(shell $(CAT) $(GENUC_SRC) | \ $(GENUC_EXE) : $(GENUC_SRC) $(prep-target) - $(HOST_CC) $(CPPFLAGS) -o $@ $(GENUC_SRC) + $(CC) $(CPPFLAGS) -o $@ $(GENUC_SRC) +ifdef NIO_PLATFORM_CLASSES_ROOT_DIR +$(SFS_GEN)/UnixConstants.java: $(NIO_PLATFORM_CLASSES_ROOT_DIR)/sun/nio/fs/UnixConstants-$(PLATFORM)-$(ARCH).java + $(prep-target) + $(CP) $< $@ +else $(SFS_GEN)/UnixConstants.java: $(GENUC_EXE) $(prep-target) NAWK="$(NAWK)" SH="$(SH)" $(SH) -e addNotices.sh "$(GENUC_COPYRIGHT_YEARS)" > $@ $(GENUC_EXE) >> $@ +endif GENSC_SRC = $(PLATFORM_SRC)/native/sun/nio/fs/genSolarisConstants.c @@ -867,11 +878,17 @@ GENSC_COPYRIGHT_YEARS = $(shell $(CAT) $(GENSC_SRC) | \ $(GENSC_EXE) : $(GENSC_SRC) $(prep-target) - $(HOST_CC) $(CPPFLAGS) -o $@ $(GENSC_SRC) + $(CC) $(CPPFLAGS) -o $@ $(GENSC_SRC) +ifdef NIO_PLATFORM_CLASSES_ROOT_DIR +$(SFS_GEN)/SolarisConstants.java: $(NIO_PLATFORM_CLASSES_ROOT_DIR)/sun/nio/fs/SolarisConstants-$(PLATFORM)-$(ARCH).java + $(prep-target) + $(CP) $< $@ +else $(SFS_GEN)/SolarisConstants.java: $(GENSC_EXE) $(prep-target) NAWK="$(NAWK)" SH="$(SH)" $(SH) -e addNotices.sh "$(GENSC_COPYRIGHT_YEARS)" > $@ $(GENSC_EXE) >> $@ +endif .PHONY: sources