small fix for makefile for building on linux

Jonathan Gibbons Jonathan.Gibbons at Sun.COM
Thu May 31 11:33:02 PDT 2007


Dalibor,

Thank  you for your suggestions.

j2se/src/share/opensource/javac/Makefile is a file was used in the initial Subversion release of the compiler. It is still used in the source bundle available on the OpenJDK site. As such, it is placed in the root directory of that bundle, which is why SRC_CLASSES is as it is. We have also been working on stopping the transitive compilation of the j2se source tree, and you should see those fixes soon.

Your point about echo vs printf is well taken.

Going forward, we will be focussing on the build.xml file for the compiler, in make/netbeans/compiler.

-- Jon






Dalibor Topic wrote:
> hi,
>
> the attached fix is a small fixlet that lets me use the makefile again 
> for building javac.
>
> the patch does three things:
>
> * setting SRC_CLASSES to the relative path of the source directories, and
>
> * setting ECHO to printf, as that's more useful for posixy systems 
> (and avoids having the build fail due to a spurious -e in the 
> javac.srcfiles file when using bash 3.2.17), and
>
> * using BUILD_CLASSES as the location of properties on the classpath, 
> rather than SRC_CLASSES, to avoid wasting time rebuilding the 
> transitive closure of the class library used by javac (and adapting 
> the makefile to deal with things like native or generated classes in 
> that).
>
> cheers,
> dalibor topic
> ------------------------------------------------------------------------
>
> Index: j2se/src/share/opensource/javac/Makefile
> ===================================================================
> --- j2se/src/share/opensource/javac/Makefile	(revision 237)
> +++ j2se/src/share/opensource/javac/Makefile	(working copy)
> @@ -34,7 +34,7 @@
>  DIST_JAVAC = $(DIST)
>  ABS_DIST_JAVAC = $(shell cd $(DIST_JAVAC) ; pwd)
>  SRC_BIN = src/bin
> -SRC_CLASSES = src/share/classes
> +SRC_CLASSES = ../../../../../j2se/src/share/classes
>  
>  #--------------------------------------------------------------------------------
>  #
> @@ -70,7 +70,7 @@
>  # Platform settings specific to Linux
>  ifeq ($(SYSTEM_UNAME), Linux)
>    # Intrinsic unix command, with backslash-escaped character interpretation
> -  ECHO           = echo -e
> +  ECHO           = printf "%s "
>    PLATFORM       = linux
>  endif
>  
> @@ -145,7 +145,7 @@
>  	$(MKDIR) -p $(BUILD_BOOTCLASSES)
>  	$(JAVAC) -d $(BUILD_BOOTCLASSES) -source $(COMPILER_SOURCE_LEVEL) -g:source,lines @$(BUILD_JAVAC_SRCFILES)
>  	$(MKDIR) -p $(BUILD_CLASSES)
> -	$(JAVA) -cp $(BUILD_BOOTCLASSES):$(SRC_CLASSES) com.sun.tools.javac.Main \
> +	$(JAVA) -cp $(BUILD_BOOTCLASSES):$(BUILD_CLASSES) com.sun.tools.javac.Main \
>  		-d $(BUILD_CLASSES) -g:source,lines @$(BUILD_JAVAC_SRCFILES)
>  	( $(ECHO) "Main-Class: com.sun.tools.javac.Main" ; \
>  	  $(ECHO) "Built-By: $$USER" ; \
>   

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20070531/475ca341/attachment.html 


More information about the compiler-dev mailing list