• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

build


Commit MetaInfo

Révision1ec845dc03e32fbaf87ee9bcbd174762d163e371 (tree)
l'heure2014-08-27 19:37:06
AuteurJerome Pilliet <pilliet@univ...>
CommiterChih-Wei Huang

Message de Log

Some changes added to compile and run with Java 6 and Java 7.

- correction of errors with Javac 6:
- target 1.5 and source empty.
- correction of errors with Javadoc 7:
- strange behavior when duplicate classes are given.

Change-Id: Ib814ede143f7799ef18e0fb1b733547519b8b0e5

Change Summary

Modification

--- a/core/combo/javac.mk
+++ b/core/combo/javac.mk
@@ -10,9 +10,9 @@
1010 # Whatever compiler is on this system.
1111 ifeq ($(BUILD_OS), windows)
1212 COMMON_JAVAC := development/host/windows/prebuilt/javawrap.exe -J-Xmx256m \
13- -target 1.5 -Xmaxerrs 9999999
13+ -target 1.5 -source 1.5 -Xmaxerrs 9999999
1414 else
15- COMMON_JAVAC := javac -J-Xmx512M -target 1.5 -Xmaxerrs 9999999
15+ COMMON_JAVAC := javac -J-Xmx512M -target 1.5 -source 1.5 -Xmaxerrs 9999999
1616 endif
1717
1818 # Eclipse.
@@ -26,7 +26,7 @@ endif
2626 ifeq ($(CUSTOM_JAVA_COMPILER), openjdk)
2727 # We set the VM options (like -Xmx) in the javac script.
2828 COMMON_JAVAC := prebuilt/common/openjdk/bin/javac -target 1.5 \
29- -Xmaxerrs 9999999
29+ -source 1.5 -Xmaxerrs 9999999
3030 $(info CUSTOM_JAVA_COMPILER=openjdk)
3131 endif
3232
--- a/core/droiddoc.mk
+++ b/core/droiddoc.mk
@@ -161,6 +161,9 @@ $(full_target): $(full_src_files) $(droiddoc_templates) $(droiddoc) $(html_dir_f
161161 $(call prepare-doc-source-list,$(PRIVATE_SRC_LIST_FILE),$(PRIVATE_JAVA_FILES), \
162162 $(PRIVATE_SOURCE_INTERMEDIATES_DIR) $(PRIVATE_ADDITIONAL_JAVA_DIR))
163163 $(hide) ( \
164+ head -1 $(PRIVATE_SRC_LIST_FILE) | tr " " "\n" | sort | uniq | tr "\n" " " > $(PRIVATE_SRC_LIST_FILE)_temp; \
165+ cat $(PRIVATE_SRC_LIST_FILE) | sed '1 d' >> $(PRIVATE_SRC_LIST_FILE)_temp; \
166+ mv $(PRIVATE_SRC_LIST_FILE)_temp $(PRIVATE_SRC_LIST_FILE); \
164167 javadoc \
165168 \@$(PRIVATE_SRC_LIST_FILE) \
166169 -J-Xmx1280m \
@@ -194,6 +197,9 @@ $(full_target): $(full_src_files) $(full_java_lib_deps)
194197 $(call prepare-doc-source-list,$(PRIVATE_SRC_LIST_FILE),$(PRIVATE_JAVA_FILES), \
195198 $(PRIVATE_SOURCE_INTERMEDIATES_DIR) $(PRIVATE_ADDITIONAL_JAVA_DIR))
196199 $(hide) ( \
200+ head -1 $(PRIVATE_SRC_LIST_FILE) | tr " " "\n" | sort | uniq | tr "\n" " " > $(PRIVATE_SRC_LIST_FILE)_temp; \
201+ cat $(PRIVATE_SRC_LIST_FILE) | sed '1 d' >> $(PRIVATE_SRC_LIST_FILE)_temp; \
202+ mv $(PRIVATE_SRC_LIST_FILE)_temp $(PRIVATE_SRC_LIST_FILE); \
197203 javadoc \
198204 $(PRIVATE_DROIDDOC_OPTIONS) \
199205 \@$(PRIVATE_SRC_LIST_FILE) \
--- a/core/main.mk
+++ b/core/main.mk
@@ -153,14 +153,14 @@ $(error stop)
153153 endif
154154
155155 # Check for the correct version of java
156-java_version := $(shell java -version 2>&1 | head -n 1 | grep '^java .*[ "]1\.6[\. "$$]')
156+java_version := $(shell java -version 2>&1 | head -n 1 | grep '^java .*[ "]1\.[67][\. "$$]')
157157 ifeq ($(strip $(java_version)),)
158158 $(info ************************************************************)
159159 $(info You are attempting to build with the incorrect version)
160160 $(info of java.)
161161 $(info $(space))
162162 $(info Your version is: $(shell java -version 2>&1 | head -n 1).)
163-$(info The correct version is: Java SE 1.6.)
163+$(info The correct version is: Java SE 1.6 or 1.7.)
164164 $(info $(space))
165165 $(info Please follow the machine setup instructions at)
166166 $(info $(space)$(space)$(space)$(space)https://source.android.com/source/download.html)
@@ -169,14 +169,14 @@ $(error stop)
169169 endif
170170
171171 # Check for the correct version of javac
172-javac_version := $(shell javac -version 2>&1 | head -n 1 | grep '[ "]1\.6[\. "$$]')
172+javac_version := $(shell javac -version 2>&1 | head -n 1 | grep '[ "]1\.[67][\. "$$]')
173173 ifeq ($(strip $(javac_version)),)
174174 $(info ************************************************************)
175175 $(info You are attempting to build with the incorrect version)
176176 $(info of javac.)
177177 $(info $(space))
178178 $(info Your version is: $(shell javac -version 2>&1 | head -n 1).)
179-$(info The correct version is: 1.6.)
179+$(info The correct version is: 1.6 or 1.7.)
180180 $(info $(space))
181181 $(info Please follow the machine setup instructions at)
182182 $(info $(space)$(space)$(space)$(space)https://source.android.com/source/download.html)