United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-6672405 : OPENJDK build: jdk7/jdk/make/tools/freetypecheck leaves dirt behind

Details
Type:
Bug
Submit Date:
2008-03-06
Status:
Closed
Updated Date:
2011-05-18
Project Name:
JDK
Resolved Date:
2011-05-18
Component:
infrastructure
OS:
generic
Sub-Component:
build
CPU:
generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
7
Fixed Versions:

Related Reports

Sub Tasks

Description
After a 'make sanity' run, freetypecheck.obj appeared in the makefile directory:

$ pwd
/cygdrive/g/tbell/jdk7/jdk/make/tools/freetypecheck
$ ls -ltr
total 12
-rwxr-xr-x 1 Administrator None 2160 Feb 21 14:15 freetypecheck.c
-rwxr-xr-x 1 Administrator None 2483 Feb 21 14:15 Makefile
-rwxr-xr-x 1 Administrator None 1626 Mar  6 14:43 freetypecheck.obj

Refer to attached file 'sanity.log' for all the output.

I am using VS2005 on this system instead of VS2003, but I don't think that is relevant.

                                    

Comments
EVALUATION

This may be fixed already, but the issue is understood and will be investiogated.
                                     
2008-03-19
SUGGESTED FIX

This may be fixed already, but the issue is understood and will be investiogated.
                                     
2008-03-19
EVALUATION

Nope, wasn't fixed. See suggested fix.
                                     
2008-03-29
SUGGESTED FIX

--- old/make/common/Defs.gmk	Fri Mar 28 16:30:29 2008
+++ new/make/common/Defs.gmk	Fri Mar 28 16:30:28 2008
@@ -303,6 +303,8 @@
 # for build tool jar files
 BUILDTOOLJARDIR     = $(OUTPUTDIR)/btjars
 ABS_BUILDTOOLJARDIR = $(ABS_OUTPUTDIR)/btjars
+# for generated tool class files
+BUILDTOOLBINDIR     = $(OUTPUTDIR)/btbins
 # for generated java source files
 GENSRCDIR           = $(OUTPUTDIR)/gensrc
 # for generated C source files (not javah)
--- old/make/common/shared/Sanity.gmk	Fri Mar 28 16:30:30 2008
+++ new/make/common/shared/Sanity.gmk	Fri Mar 28 16:30:30 2008
@@ -788,21 +788,17 @@
 
 ifdef OPENJDK
 
-#name of test program that prints out "Failed" if freetype is not good enough
-FREETYPE_VERSION_CHECK_NAME = freetype_versioncheck
-FREETYPE_VERSION_CHECK = $(TEMPDIR)/$(FREETYPE_VERSION_CHECK_NAME)$(EXE_SUFFIX)
+# The freetypecheck Makefile prints out "Failed" if not good enough
+$(TEMPDIR)/freetypeinfo: FRC
+	@$(prep-target)
+	@(($(CD) $(BUILDDIR)/tools/freetypecheck && $(MAKE)) || \
+	    $(ECHO) "Failed to build freetypecheck." ) > $@
 
-sane-freetype:
-	@-($(CD) $(BUILDDIR)/tools/freetypecheck && \
-	$(MAKE) REQUIRED_FREETYPE_VERSION=$(REQUIRED_FREETYPE_VERSION) \
-	        FT_TEST=$(FREETYPE_VERSION_CHECK_NAME) \
-	        FT_HEADERS=$(FREETYPE_HEADERS_PATH) \
-	        FT_LIB=$(FREETYPE_LIB_PATH) \
-	        XARCH=$(XARCH))
-	@if [ ! -r $(FREETYPE_VERSION_CHECK) -o \
-	  "`$(FREETYPE_VERSION_CHECK) | $(GREP) Fail`" != "" ]; then \
+sane-freetype: $(TEMPDIR)/freetypeinfo
+	@if [ "`$(CAT) $< | $(GREP) Fail`" != "" ]; then \
 	  $(ECHO) "ERROR: FreeType version " $(REQUIRED_FREETYPE_VERSION) \
-	          "or higher is required. \n" >> $(ERROR_FILE) ; \
+	          " or higher is required. \n" \
+		  "`$(CAT) $<`  \n" >> $(ERROR_FILE) ; \
 	fi
 
 else
--- old/make/tools/Makefile	Fri Mar 28 16:30:32 2008
+++ new/make/tools/Makefile	Fri Mar 28 16:30:31 2008
@@ -40,6 +40,7 @@
   dir_diff                  \
   dtdbuilder                \
   fontchecker               \
+  freetypecheck             \
   generate_break_iterator   \
   GenerateCharacter         \
   generatecurrencydata      \
@@ -58,4 +59,5 @@
 clean clobber::
 	$(RM) -r $(BUILDTOOLCLASSDIR)
 	$(RM) -r $(BUILDTOOLJARDIR)
+	$(RM) -r $(BUILDTOOLBINDIR)
 
--- old/make/tools/freetypecheck/Makefile	Fri Mar 28 16:30:33 2008
+++ new/make/tools/freetypecheck/Makefile	Fri Mar 28 16:30:32 2008
@@ -22,55 +22,58 @@
 # CA 95054 USA or visit www.sun.com if you need additional information or
 # have any questions.
 
-# Builds test program for freetype sanity check.
-#
-# Makefile should be called with following input parameters
-#   FT_TEST    - full name of test program
-#   FT_HEADERS - path to freetype headers
-#   FT_LIB     - location of directory with library
-#   XARCH      - xarch option if required
+# Builds and runs test program for freetype sanity check.
 
 BUILDDIR = ../..
 include $(BUILDDIR)/common/Defs.gmk
 
-#test program is expected in the TEMPDIR
-FT_TEST_PATH = $(TEMPDIR)/$(FT_TEST)
+# Default name
+FT_TEST = $(BUILDTOOLBINDIR)/freetype_versioncheck$(EXE_SUFFIX)
 
-all: $(FT_TEST_PATH)
+# Used on openjdk only
+ifdef OPENJDK
 
 # Start with CFLAGS (which gets us the required -xarch setting on solaris)
 ifeq ($(PLATFORM), windows)
-  FT_OPTIONS  =
+  FT_OPTIONS  = /nologo $(CC_OBJECT_OUTPUT_FLAG)$(TEMPDIR)
+  FREETYPE_DLL = $(FREETYPE_LIB_PATH)/freetype.dll
+  FT_LD_OPTIONS  = $(FREETYPE_LIB_PATH)/freetype.lib
 else
   FT_OPTIONS  = $(CFLAGS)
-endif
-
-FT_OPTIONS += -I$(FT_HEADERS) -I$(FT_HEADERS)/freetype2
-FT_OPTIONS += $(XARCH)
-
-#add runtime library search path
-ifeq ($(PLATFORM), windows)
-  FREETYPE_LIB=$(FT_LIB)/freetype.lib
-  FREETYPE_DLL=$(FT_LIB)/freetype.dll
-  DFLAG=/D
-else
-  FT_OPTIONS += -L$(FT_LIB)
-  DFLAG = -D
-
-  #add runtime lib search path to ensure test will be runnable
+  FT_LD_OPTIONS = -L$(FREETYPE_LIB_PATH)
+  # Add runtime lib search path to ensure test will be runnable
   ifeq ($(PLATFORM), solaris)
-    FT_OPTIONS += -R $(FT_LIB) -lfreetype
+    FT_LD_OPTIONS += -R $(FREETYPE_LIB_PATH) -lfreetype
   else #linux
-      FT_OPTIONS += -Wl,-rpath -Wl,$(FT_LIB) -lfreetype
+      FT_LD_OPTIONS += -Wl,-rpath -Wl,$(FREETYPE_LIB_PATH) -lfreetype
   endif
 endif
+FT_OPTIONS += -I$(FREETYPE_HEADERS_PATH)
+FT_OPTIONS += -I$(FREETYPE_HEADERS_PATH)/freetype2
+FT_OPTIONS += -DREQUIRED_FREETYPE_VERSION=$(REQUIRED_FREETYPE_VERSION)
+FT_LD_OPTIONS += $(LFLAGS_$(COMPILER_VERSION))
 
-FT_OPTIONS += $(DFLAG)REQUIRED_FREETYPE_VERSION=$(REQUIRED_FREETYPE_VERSION)
+# Create test program
+all: $(FT_TEST)
+	@$(FT_TEST)
 
-# On windows we need to copy dll to test dir
-#  ti ensure it will be found in runtime
-$(FT_TEST_PATH): freetypecheck.c
-	@$(CC) $(FT_OPTIONS) $(CC_PROGRAM_OUTPUT_FLAG)$@ $< $(FREETYPE_LIB) $(LFLAGS_$(COMPILER_VERSION))
+# On windows we need to copy dll to test dir to ensure it will be found
+#   at runtime
+$(FT_TEST): freetypecheck.c
+	@$(prep-target)
+	@$(CC) $(FT_OPTIONS) $(CC_PROGRAM_OUTPUT_FLAG)$@ $< $(FT_LD_OPTIONS)
 ifeq ($(PLATFORM), windows)
 	@$(CP) $(FREETYPE_DLL) `dirname $@`
 endif
+
+else
+
+# Inform user this is openjdk only
+all:
+	@$(ECHO) "The freetype files are not used with OpenJDK"
+
+endif
+
+clean::
+	$(RM) $(FT_TEST)
+
                                     
2008-03-29
EVALUATION

http://hg.openjdk.java.net/jdk7/build/jdk/rev/88d235789027
                                     
2008-04-01



Hardware and Software, Engineered to Work Together