1.1 --- a/common/makefiles/devkit/Makefile Wed Oct 09 18:51:32 2013 -0700 1.2 +++ b/common/makefiles/devkit/Makefile Thu Oct 10 14:58:19 2013 +0200 1.3 @@ -25,12 +25,12 @@ 1.4 1.5 ########################################################################################## 1.6 # 1.7 -# This Makefile, together with Tools.gmk, can be used to compile a set of 1.8 -# gcc based cross compilation, portable, self contained packages, capable 1.9 +# This Makefile, together with Tools.gmk, can be used to compile a set of 1.10 +# gcc based cross compilation, portable, self contained packages, capable 1.11 # of building OpenJDK. 1.12 -# 1.13 -# In addition to the makefiles, access to Oracle Linux installation 1.14 -# media is required. This has been tested against Oracle Enterprise Linux 1.15 +# 1.16 +# In addition to the makefiles, access to Oracle Linux installation 1.17 +# media is required. This has been tested against Oracle Enterprise Linux 1.18 # 5.5. Set variables RPM_DIR_x86_64 and RPM_DIR_i686 respectively to point 1.19 # to directory containing the RPMs. 1.20 # 1.21 @@ -43,9 +43,9 @@ 1.22 # 1.23 # To build the full set of crosstools, use a command line looking like this: 1.24 # 1.25 -# make tars RPM_DIR_x86_64=/tmp/oel55-x86_64/Server/ RPM_DIR_i686=/tmp/oel55-i686/Server/ 1.26 +# make tars RPM_DIR_x86_64=/tmp/oel55-x86_64/Server/ RPM_DIR_i686=/tmp/oel55-i686/Server/ 1.27 # 1.28 -# To create a x86_64 package without the redundant i686 cross compiler, do 1.29 +# To create a x86_64 package without the redundant i686 cross compiler, do 1.30 # like this: 1.31 # 1.32 # make tars platforms=x86_64-unknown-linux-gnu RPM_DIR_x86_64=/tmp/oel55-x86_64/Server/ RPM_DIR_i686=/tmp/oel55-i686/Server/ 1.33 @@ -54,70 +54,68 @@ 1.34 # Main makefile which iterates over all host and target platforms. 1.35 # 1.36 1.37 -os := $(shell uname -o) 1.38 -cpu := x86_64 1.39 +os := $(shell uname -o) 1.40 +cpu := x86_64 1.41 #$(shell uname -p) 1.42 1.43 # 1.44 # This wrapper script can handle exactly these platforms 1.45 # 1.46 -platforms := $(foreach p,x86_64 i686,$(p)-unknown-linux-gnu) 1.47 -#platforms := $(foreach p,x86_64,$(p)-unknown-linux-gnu) 1.48 +platforms := $(foreach p,x86_64 i686,$(p)-unknown-linux-gnu) 1.49 +#platforms := $(foreach p,x86_64,$(p)-unknown-linux-gnu) 1.50 1.51 # Figure out what platform this is building on. 1.52 -me := $(cpu)-$(if $(findstring Linux,$(os)),unknown-linux-gnu) 1.53 +me := $(cpu)-$(if $(findstring Linux,$(os)),unknown-linux-gnu) 1.54 1.55 $(info Building on platform $(me)) 1.56 1.57 -all compile : $(platforms) 1.58 +all compile : $(platforms) 1.59 1.60 ifeq (,$(SKIP_ME)) 1.61 -$(foreach p,$(filter-out $(me),$(platforms)),$(eval $(p) : $$(me))) 1.62 + $(foreach p,$(filter-out $(me),$(platforms)),$(eval $(p) : $$(me))) 1.63 endif 1.64 1.65 -OUTPUT_ROOT = $(abspath ../../../build/devkit) 1.66 -RESULT = $(OUTPUT_ROOT)/result 1.67 +OUTPUT_ROOT = $(abspath ../../../build/devkit) 1.68 +RESULT = $(OUTPUT_ROOT)/result 1.69 1.70 -submakevars = HOST=$@ BUILD=$(me) \ 1.71 - RESULT=$(RESULT) PREFIX=$(RESULT)/$@ \ 1.72 - OUTPUT_ROOT=$(OUTPUT_ROOT) 1.73 -$(platforms) : 1.74 - @echo 'Building compilers for $@' 1.75 - @echo 'Targets: $(platforms)' 1.76 - for p in $@ $(filter-out $@,$(platforms)); do \ 1.77 - $(MAKE) -f Tools.gmk all $(submakevars) \ 1.78 - TARGET=$$p || exit 1 ; \ 1.79 - done 1.80 - @echo 'Building ccache program for $@' 1.81 - $(MAKE) -f Tools.gmk ccache $(submakevars) TARGET=$@ 1.82 - @echo 'All done"' 1.83 +submakevars = HOST=$@ BUILD=$(me) \ 1.84 + RESULT=$(RESULT) PREFIX=$(RESULT)/$@ \ 1.85 + OUTPUT_ROOT=$(OUTPUT_ROOT) 1.86 +$(platforms) : 1.87 + @echo 'Building compilers for $@' 1.88 + @echo 'Targets: $(platforms)' 1.89 + for p in $@ $(filter-out $@,$(platforms)); do \ 1.90 + $(MAKE) -f Tools.gmk all $(submakevars) \ 1.91 + TARGET=$$p || exit 1 ; \ 1.92 + done 1.93 + @echo 'Building ccache program for $@' 1.94 + $(MAKE) -f Tools.gmk ccache $(submakevars) TARGET=$@ 1.95 + @echo 'All done"' 1.96 1.97 $(foreach a,i686 x86_64,$(eval $(a) : $(filter $(a)%,$(platforms)))) 1.98 1.99 -ia32 : i686 1.100 -today := $(shell date +%Y%m%d) 1.101 +ia32 : i686 1.102 +today := $(shell date +%Y%m%d) 1.103 1.104 1.105 define Mktar 1.106 -$(1)_tar = $$(RESULT)/sdk-$(1)-$$(today).tar.gz 1.107 -$$($(1)_tar) : PLATFORM = $(1) 1.108 -TARFILES += $$($(1)_tar) 1.109 -$$($(1)_tar) : $(1) $$(shell find $$(RESULT)/$(1)) 1.110 + $(1)_tar = $$(RESULT)/sdk-$(1)-$$(today).tar.gz 1.111 + $$($(1)_tar) : PLATFORM = $(1) 1.112 + TARFILES += $$($(1)_tar) 1.113 + $$($(1)_tar) : $(1) $$(shell find $$(RESULT)/$(1)) 1.114 endef 1.115 1.116 $(foreach p,$(platforms),$(eval $(call Mktar,$(p)))) 1.117 1.118 -tars : all $(TARFILES) 1.119 -onlytars : $(TARFILES) 1.120 -%.tar.gz : 1.121 - @echo 'Creating compiler package $@' 1.122 - cd $(RESULT)/$(PLATFORM) && tar -czf $@ * 1.123 - touch $@ 1.124 +tars : all $(TARFILES) 1.125 +onlytars : $(TARFILES) 1.126 +%.tar.gz : 1.127 + @echo 'Creating compiler package $@' 1.128 + cd $(RESULT)/$(PLATFORM) && tar -czf $@ * 1.129 + touch $@ 1.130 1.131 -clean : 1.132 +clean : 1.133 rm -rf build result 1.134 1.135 -FORCE : 1.136 -.PHONY : $(configs) $(platforms) 1.137 - 1.138 - 1.139 +FORCE : 1.140 +.PHONY : $(configs) $(platforms)