<commit_before># Copyright 2011 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Make include file that sets the build environment.  The external
# environment variables are defined by Xcode, allowing this build
# to be used within Xcode.
#
# The following environment variables are useful when building on
# the command-line:
#
# DEBUGGING_SYMBOLS=YES     Enable compiler's -g flag
# OPTIMIZATION_LEVEL=n      Sets compilers optimization; legal values are any
#                           -O option, such as 0-3 or s (-Os)
# WARNINGS='-Wfirst ...'    Add warning flags that aren't set by default
#                           (-Wflag-name) or turn off warnings that are set
#                           (-Wno-flag-name).
# CLANG_ENABLE_OBJC_ARC=YES Translate and build with ARC
# MAX_STACK_FRAMES          The maximum number of exception stack trace frames
# NO_STACK_FRAME_SYMBOLS    If set, exception stack traces only have addresses
#
# Author: <NAME>

APACHE_HARMONY_BASE = apache_harmony/classlib/modules
JRE_ROOT = $(APACHE_HARMONY_BASE)/luni/src/main/java
JRE_CONCURRENT_ROOT = $(APACHE_HARMONY_BASE)/concurrent/src/main/java
JRE_KERNEL_ROOT = $(APACHE_HARMONY_BASE)/luni-kernel/src/main/java
JRE_MATH_ROOT = $(APACHE_HARMONY_BASE)/math/src/main/java
JRE_NIO_ROOT = $(APACHE_HARMONY_BASE)/nio/src/main/java/common
JRE_TEST_ROOT = $(APACHE_HARMONY_BASE)/luni/src/test/api/common
JRE_MATH_TEST_ROOT = $(APACHE_HARMONY_BASE)/math/src/test/java
JRE_NIO_TEST_ROOT = $(APACHE_HARMONY_BASE)/nio/src/test/java/common
TEST_SUPPORT_ROOT = $(APACHE_HARMONY_BASE)/../support/src/test/java
MATH_TEST_SUPPORT_ROOT = $(APACHE_HARMONY_BASE)/math/src/test/java/tests/api
REGEX_TEST_ROOT = $(APACHE_HARMONY_BASE)/regex/src/test/java
CONCURRENT_TEST_ROOT = $(APACHE_HARMONY_BASE)/concurrent/src/test/java

ANDROID_BASE = android/libcore
ANDROID_JRE_ROOT = $(ANDROID_BASE)/luni/src/main/java
ANDROID_JRE_TEST_ROOT = $(ANDROID_BASE)/luni/src/test/java
ANDROID_TEST_SUPPORT_ROOT = $(ANDROID_BASE)/support/src/test/java
ANDROID_XML_ROOT = $(ANDROID_BASE)/xml/src/main/java

APPLE_ROOT = apple_apsl

MISC_TEST_ROOT = Tests
J2OBJC_ROOT = ..

ANDROID_INCLUDE = $(ANDROID_BASE)/include

include ../make/common.mk

CLASS_DIR = $(BUILD_DIR)/Classes
EMULATION_STAGE = /tmp/jre_emul
EMULATION_JAR = $(BUILD_DIR)/jre_emul.jar
EMULATION_JAR_DIST = $(DIST_JAR_DIR)/jre_emul.jar
EMULATION_LIB = $(BUILD_DIR)/libjre_emul.a
EMULATION_LIB_DIST = $(DIST_LIB_DIR)/libjre_emul.a
XCODE_LIB = $(CONFIGURATION_BUILD_DIR)/libjre_emul.a
MAIN_LIB = $(BUILD_DIR)/libj2objc_main.a
MAIN_LIB_DIST = $(DIST_LIB_DIR)/libj2objc_main.a
EMULATION_CLASS_DIR = Classes
TESTS_DIR = $(BUILD_DIR)/tests
STUBS_DIR = stub_classes

ifndef TRANSLATED_SOURCE_DIR
TRANSLATED_SOURCE_DIR = $(CLASS_DIR)
endif

JRE_SRC_ROOTS = $(JRE_ROOT) $(JRE_CONCURRENT_ROOT) \
    $(JRE_KERNEL_ROOT) $(JRE_MATH_ROOT) $(JRE_NIO_ROOT) $(ANDROID_JRE_ROOT) \
    $(ANDROID_XML_ROOT) $(EMULATION_CLASS_DIR)
JRE_SRC = $(subst $(eval) ,:,$(JRE_SRC_ROOTS))
TEST_SRC_ROOTS = $(JRE_TEST_ROOT) $(JRE_MATH_TEST_ROOT) $(JRE_NIO_TEST_ROOT) \
    $(TEST_SUPPORT_ROOT) $(MATH_TEST_SUPPORT_ROOT) $(REGEX_TEST_ROOT) \
    $(CONCURRENT_TEST_ROOT) $(MISC_TEST_ROOT) $(ANDROID_TEST_SUPPORT_ROOT)
TEST_SRC = $(subst $(eval) ,:,$(TEST_SRC_ROOTS))
vpath %.java $(JRE_SRC):$(TEST_SRC):$(STUBS_DIR)

CLANG=$(XCRUN) clang

# J2ObjC settings
J2OBJC := USE_SYSTEM_BOOT_PATH=TRUE $(DIST_DIR)/j2objc --mem-debug \
   -classpath $(EMULATION_JAR) -d $(TRANSLATED_SOURCE_DIR) $(J2OBJC_DEBUGFLAGS)

# Clang warnings
WARNINGS := $(WARNINGS) -Wall -Werror

ifeq ("$(strip $(XCODE_VERSION_MAJOR))", "0500")
WARNINGS := $(WARNINGS) -Wno-unsequenced
OBJCFLAGS := -DSET_MIN_IOS_VERSION
endif

# The -fobjc flags match XCode (a link fails without them because of
# missing symbols of the form OBJC_CLASS_$_[classname]).
OBJCFLAGS := $(WARNINGS) $(OBJCFLAGS) -DU_DISABLE_RENAMING=1 \
  -fobjc-abi-version=2 -fobjc-legacy-dispatch $(DEBUGFLAGS) \
  -I/System/Library/Frameworks/ExceptionHandling.framework/Headers \
  -I$(ANDROID_INCLUDE) -I$(ICU4C_I18N_INCLUDE) -I$(ICU4C_COMMON_INCLUDE) \
  -I$(APPLE_ROOT)<commit_msg>Added j2objc encoding flag so JRE sources with Unicode chars build. 	Change on 2013/08/27 by tball <<EMAIL>> ------------- Created by MOE: http://code.google.com/p/moe-java MOE_MIGRATED_REVID=51472544<commit_after># Copyright 2011 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Make include file that sets the build environment.  The external
# environment variables are defined by Xcode, allowing this build
# to be used within Xcode.
#
# The following environment variables are useful when building on
# the command-line:
#
# DEBUGGING_SYMBOLS=YES     Enable compiler's -g flag
# OPTIMIZATION_LEVEL=n      Sets compilers optimization; legal values are any
#                           -O option, such as 0-3 or s (-Os)
# WARNINGS='-Wfirst ...'    Add warning flags that aren't set by default
#                           (-Wflag-name) or turn off warnings that are set
#                           (-Wno-flag-name).
# CLANG_ENABLE_OBJC_ARC=YES Translate and build with ARC
# MAX_STACK_FRAMES          The maximum number of exception stack trace frames
# NO_STACK_FRAME_SYMBOLS    If set, exception stack traces only have addresses
#
# Author: <NAME>

APACHE_HARMONY_BASE = apache_harmony/classlib/modules
JRE_ROOT = $(APACHE_HARMONY_BASE)/luni/src/main/java
JRE_CONCURRENT_ROOT = $(APACHE_HARMONY_BASE)/concurrent/src/main/java
JRE_KERNEL_ROOT = $(APACHE_HARMONY_BASE)/luni-kernel/src/main/java
JRE_MATH_ROOT = $(APACHE_HARMONY_BASE)/math/src/main/java
JRE_NIO_ROOT = $(APACHE_HARMONY_BASE)/nio/src/main/java/common
JRE_TEST_ROOT = $(APACHE_HARMONY_BASE)/luni/src/test/api/common
JRE_MATH_TEST_ROOT = $(APACHE_HARMONY_BASE)/math/src/test/java
JRE_NIO_TEST_ROOT = $(APACHE_HARMONY_BASE)/nio/src/test/java/common
TEST_SUPPORT_ROOT = $(APACHE_HARMONY_BASE)/../support/src/test/java
MATH_TEST_SUPPORT_ROOT = $(APACHE_HARMONY_BASE)/math/src/test/java/tests/api
REGEX_TEST_ROOT = $(APACHE_HARMONY_BASE)/regex/src/test/java
CONCURRENT_TEST_ROOT = $(APACHE_HARMONY_BASE)/concurrent/src/test/java

ANDROID_BASE = android/libcore
ANDROID_JRE_ROOT = $(ANDROID_BASE)/luni/src/main/java
ANDROID_JRE_TEST_ROOT = $(ANDROID_BASE)/luni/src/test/java
ANDROID_TEST_SUPPORT_ROOT = $(ANDROID_BASE)/support/src/test/java
ANDROID_XML_ROOT = $(ANDROID_BASE)/xml/src/main/java

APPLE_ROOT = apple_apsl

MISC_TEST_ROOT = Tests
J2OBJC_ROOT = ..

ANDROID_INCLUDE = $(ANDROID_BASE)/include

include ../make/common.mk

CLASS_DIR = $(BUILD_DIR)/Classes
EMULATION_STAGE = /tmp/jre_emul
EMULATION_JAR = $(BUILD_DIR)/jre_emul.jar
EMULATION_JAR_DIST = $(DIST_JAR_DIR)/jre_emul.jar
EMULATION_LIB = $(BUILD_DIR)/libjre_emul.a
EMULATION_LIB_DIST = $(DIST_LIB_DIR)/libjre_emul.a
XCODE_LIB = $(CONFIGURATION_BUILD_DIR)/libjre_emul.a
MAIN_LIB = $(BUILD_DIR)/libj2objc_main.a
MAIN_LIB_DIST = $(DIST_LIB_DIR)/libj2objc_main.a
EMULATION_CLASS_DIR = Classes
TESTS_DIR = $(BUILD_DIR)/tests
STUBS_DIR = stub_classes

ifndef TRANSLATED_SOURCE_DIR
TRANSLATED_SOURCE_DIR = $(CLASS_DIR)
endif

JRE_SRC_ROOTS = $(JRE_ROOT) $(JRE_CONCURRENT_ROOT) \
    $(JRE_KERNEL_ROOT) $(JRE_MATH_ROOT) $(JRE_NIO_ROOT) $(ANDROID_JRE_ROOT) \
    $(ANDROID_XML_ROOT) $(EMULATION_CLASS_DIR)
JRE_SRC = $(subst $(eval) ,:,$(JRE_SRC_ROOTS))
TEST_SRC_ROOTS = $(JRE_TEST_ROOT) $(JRE_MATH_TEST_ROOT) $(JRE_NIO_TEST_ROOT) \
    $(TEST_SUPPORT_ROOT) $(MATH_TEST_SUPPORT_ROOT) $(REGEX_TEST_ROOT) \
    $(CONCURRENT_TEST_ROOT) $(MISC_TEST_ROOT) $(ANDROID_TEST_SUPPORT_ROOT)
TEST_SRC = $(subst $(eval) ,:,$(TEST_SRC_ROOTS))
vpath %.java $(JRE_SRC):$(TEST_SRC):$(STUBS_DIR)

CLANG=$(XCRUN) clang

# J2ObjC settings
J2OBJC := USE_SYSTEM_BOOT_PATH=TRUE $(DIST_DIR)/j2objc --mem-debug \
   -classpath $(EMULATION_JAR) -d $(TRANSLATED_SOURCE_DIR) \
   $(J2OBJC_DEBUGFLAGS) -encoding ISO-8859-1

# Clang warnings
WARNINGS := $(WARNINGS) -Wall -Werror

ifeq ("$(strip $(XCODE_VERSION_MAJOR))", "0500")
WARNINGS := $(WARNINGS) -Wno-unsequenced
OBJCFLAGS := -DSET_MIN_IOS_VERSION
endif

# The -fobjc flags match XCode (a link fails without them because of
# missing symbols of the form OBJC_CLASS_$_[classname]).
OBJCFLAGS := $(WARNINGS) $(OBJCFLAGS) -DU_DISABLE_RENAMING=1 \
  -fobjc-abi-version=2 -fobjc-legacy-dispatch $(DEBUGFLAGS) \
  -I/System/Library/Frameworks/ExceptionHandling.framework/Headers \
  -I$(ANDROID_INCLUDE) -I$(ICU4C_I18N_INCLUDE) -I$(ICU4C_COMMON_INCLUDE) \
  -I$(APPLE_ROOT)
{'fraction_non_alphanumeric': 0.11494981510829372, 'fraction_numerical': 0.008029582673005811, 'mean_word_length': 5.033142128744423, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6779082', 'n_tokens_mistral': 3594, 'n_tokens_neox': 3528, 'n_words': 720}