📄 verify.gmk
字号:
## Copyright 1990-2008 Sun Microsystems, Inc. All Rights Reserved.# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER# # This program is free software; you can redistribute it and/or# modify it under the terms of the GNU General Public License version# 2 only, as published by the Free Software Foundation.# # This program is distributed in the hope that it will be useful, but# WITHOUT ANY WARRANTY; without even the implied warranty of# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU# General Public License version 2 for more details (a copy is# included at /legal/license.txt).# # You should have received a copy of the GNU General Public License# version 2 along with this work; if not, write to the Free Software# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA# 02110-1301 USA# # Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa# Clara, CA 95054 or visit www.sun.com if you need additional# information or have any questions.######################################################################### Rules to verify that the Makefile variables are set properly.#######################################################################define verify_directory if [ -z "$($@)" ]; then \ echo "ERROR: $@ must be set"; \ exit -1; \ else \ if [ ! -d "$($@)" ]; then \ echo "ERROR: $@ ($($@)) does not point to a valid directory"; \ exit -1; \ fi \ fiendefdefine verify_satsa_directory if [ "$(USE_JSR_177)" = "true" ]; then \ $(verify_directory) \ fiendefdefine verify_jsr_211_directory if [ "$(USE_JSR_211)" = "true" ]; then \ $(verify_directory) \ fiendefdefine verify_jsr_82_directory if [ "$(USE_JSR_82)" = "true" ]; then \ $(verify_directory) \ fiendefdefine verify_jsr_75_directory if [ "$(USE_JSR_75)" = "true" ]; then \ $(verify_directory) \ fiendefdefine verify_jsr_172_directory if [ "$(USE_JSR_172)" = "true" ]; then \ $(verify_directory) \ fiendefdefine verify_jsr_226_directory if [ "$(USE_JSR_226)" = "true" ]; then \ $(verify_directory); \ if [ "$(USE_PISCES)" = "false" ]; then \ echo "ERROR: USE_PISCES should be "true""; \ exit -1; \ fi; \ if [ "$(USE_JSR_172)" = "false" ]; then \ echo "ERROR: USE_JSR_172 should be "true""; \ exit -1; \ fi; \ fiendef# IMPL_NOTE: NYIdefine verify_jsr_280_directory if [ "$(USE_JSR_280)" = "true" ]; then \ $(verify_directory) \ fiendefdefine verify_pisces_directory if [ "$(USE_PISCES)" = "true" ]; then \ $(verify_directory) \ fiendefdefine verify_jsr_179_directory if [ "$(USE_JSR_179)" = "true" ]; then \ $(verify_directory) ; \ fiendefdefine verify_jsr_180_directory if [ "$(USE_JSR_180)" = "true" ]; then \ $(verify_directory) \ fiendefdefine verify_jsr_184_directory if [ "$(USE_JSR_184)" = "true" ]; then \ $(verify_directory); \ fiendefdefine verify_jsr_205_directory if [ "$(USE_JSR_205)" = "true" ] ; then \ $(verify_directory) ; \ if [ "$(USE_JSR_120)" = "false" ]; then \ echo "ERROR: USE_JSR_120 should be "true" if USE_JSR_205 is set to true"; \ exit -1; \ fi; \ fiendefdefine verify_jsr_120_directory if [ "$(USE_JSR_120)" = "true" ] ; then \ $(verify_directory) \ fiendefdefine verify_jsr_229_directory if [ "$(USE_JSR_229)" = "true" ]; then \ $(verify_directory) \ fiendefdefine verify_jsr_230_directory if [ "$(USE_JSR_230)" = "true" ]; then \ $(verify_directory) \ fiendefdefine verify_jsr_234_directory if [ "$(USE_JSR_234)" = "true" ]; then \ $(verify_directory) ; \ fiendefdefine verify_jsr_256_directory if [ "$(USR_JSR_256)" = "true" ]; then \ $(verify_directory); \ fiendefdefine verify_jsr_257_directory if [ "$(USE_JSR_257)" = "true" ]; then \ $(verify_directory) \ fiendef define verify_jsr_281_directory if [ "$(USE_JSR_281)" = "true" ]; then \ $(verify_directory) \ fiendef define verify_jsr_290_directory if [ "$(USE_JSR_290)" = "true" ]; then \ $(verify_directory); \ fiendefdefine verify_midp_abb_directory if [ "$(USE_MIDP_ABB)" = "true" ]; then \ $(verify_directory) ; \ fiendefdefine verify_jsr_135_directory if [ "$(USE_JSR_135)" = "true" ]; then \ $(verify_directory) ; \ fiendefdefine verify_jsr_238_directory if [ "$(USE_JSR_238)" = "true" ]; then \ $(verify_directory) \ fiendefdefine verify_jsr_239_directory if [ "$(USE_JSR_239)" = "true" ]; then \ $(verify_directory) \ fiendefdefine verify_abstractions_directory if [ "$(USE_ABSTRACTIONS)" = "true" ]; then \ $(verify_directory) \ fiendefdefine verify_restricted_crypto_directory# if [ ! "$(USE_BINARY_CRYPTO)" = "true" ]; then \ if [ "$(USE_RESTRICTED_CRYPTO)" = "true" ]; then \ $(verify_directory) ; \# fi; \ fiendefdefine verify_crypto_output_directory if [ "$(USE_BINARY_CRYPTO)" = "true" ]; then \ $(verify_directory) ; \ fiendefdefine verify_jpeg_directory if [ "$(USE_JPEG)" = "true" ]; then \ $(verify_directory) \ fiendefdefine verify_tools_directory $(verify_directory) ; \ if [ ! -f "$(TOOLS_DIR)/tools.gmk" ]; then \ echo "ERROR: $@ ($($@)) does not contain tools.gmk"; \ exit -1; \ fiendefdefine verify_boolean if [ "$($@)" != "true" -a "$($@)" != "false" ]; then \ echo "ERROR: $@ ($($@)) is not set to a boolean value"; \ exit -1; \ fiendef# The JDK is considered valid if it is v1.3.1 or later#define verify_jdk if [ -x "$(JDK_DIR)/bin/java$(EXE)" ]; then \ jdk_ver="`$(JDK_DIR)/bin/java -version 2>&1`"; \ jdk_ver=`echo $$jdk_ver | awk -F'"' '{ print $$2 }'`; \ jdk_maj=`echo $$jdk_ver | cut -d. -f1`; \ jdk_min=`echo $$jdk_ver | cut -d. -f2`; \ if [ "$$jdk_maj" -ne "1" -o \( "$$jdk_min" -lt "3" \) ]; then \ echo "ERROR: JDK_DIR points to invalid JDK directory"; \ exit -1; \ fi; \ else \ echo "ERROR: JDK_DIR points to invalid JDK directory"; \ exit -1; \ fiendef# Verify if PCSL defines macro corresponding to MIDP boolean option# verify_pcsl_boolean <midp_option_value> <pcsl_macro_name>#define verify_pcsl_boolean @if [ "$(1)" = "true" ]; then \ if ! grep "^\#define $(2)\b" \ $(PCSL_TARGET_DIR)/inc/pcsl_config.h > /dev/null; then \ echo 'ERROR: $(2) should be defined'; \ exit -1; \ fi; \ fi endef# Verify if PCSL network module matches target platform# verify_pcsl_network_module <platform> <network_module>#define verify_pcsl_network_module if [ "$(TARGET_PLATFORM)" = "$(1)" ]; then \ if ! grep "^\#define NETWORK_MODULE[[:space:]]\+$(2)" \ $(PCSL_TARGET_DIR)/inc/pcsl_config.h > /dev/null; then \ echo 'ERROR: Mismatching PCSL networking module, should be "$(2)"'; \ exit -1; \ fi; \ fi endef# Verify if PCSL networking settings are consistent with MIDP settings#define verify_pcsl_networking @$(call verify_pcsl_network_module,linux_fb,bsd/generic) @$(call verify_pcsl_network_module,linux_qte,bsd/qte) @$(call verify_pcsl_boolean,true,PCSL_DATAGRAM)endef# Used in cygwin build to ensure that /tmp directory exists,# which may be not the case if Sun's cyg4me package is useddefine ensure_cygwin_tmp if [ ! -d "/tmp" ]; then \ mkdir /tmp; \ chmod a+rwx /tmp; \ fiendef# Verify that USE_STATIC_PROPERTIES setting is consistent between MIDP and JavaCall#define verify_javacall_properties if [ "$(USE_STATIC_PROPERTIES)" = "true" ]; then \ if [ ! -f "$(JAVACALL_OUTPUT_DIR)/javacall_static_properties.c" ]; then \ echo "ERROR: No javacall_static_properties.c found in JAVACALL_OUTPUT_DIR while USE_STATIC_PROPERTIES=true"; \ exit -1; \ fi; \ else \ if [ ! -f "$(JAVACALL_OUTPUT_DIR)/jwc_properties.ini" ]; then \ echo "ERROR: No jwc_properties.ini found in JAVACALL_OUTPUT_DIR while USE_STATIC_PROPERTIES=false"; \ exit -1; \ fi; \ fiendef## The master list of boolean options.## IMPL NOTE: The following options are used in various places around the# makefile system but they don't seem to be set by default, which would# cause an error if they were included here. These should either be set to# default values and added to the list, or they should be removed entirely.## ENABLE_CYGWIN# USE_JSR_172# USE_MESSAGE_STRINGS# USE_PORTING_DEMOS# USE_ROMIZED_DEMOS#BOOLEAN_OPTIONS = \ USE_NATIVE_APP_MANAGER \ USE_NATIVE_INSTALLER \ USE_NATIVE_SUITE_STORAGE \ USE_NATIVE_RMS \ USE_NAMS_TEST_SERVICE \ USE_RAW_AMS_IMAGES \ USE_RESTRICTED_CRYPTO \ USE_SSL \ USE_BINARY_CRYPTO \ USE_FIXED \ USE_CLDC_11 \ USE_MONET \ USE_STATIC_PROPERTIES \ USE_GCC \ USE_I3_TEST \ USE_IMAGE_CACHE \ USE_ICON_CACHE \ USE_JAVA_DEBUGGER \ USE_JAVA_PROFILER \ USE_MIDP_MALLOC \ USE_MULTIPLE_ISOLATES \ USE_DEBUG \ USE_GCOV \ USE_CLDC_RELEASE \ USE_NATIVE_PROFILER \ USE_NETWORK_INDICATOR \ USE_NUTS_FRAMEWORK \ USE_RMS_TREE_INDEX \ USE_MIDP_ABB \ USE_JSR_177 \ USE_JSR_75 \ USE_JSR_82 \ USE_JSR_120 \ USE_JSR_172 \ USE_JSR_226 \ USE_PISCES \ USE_JSR_179 \ USE_JSR_180 \ USE_JSR_184 \ USE_JSR_205 \ USE_JSR_211 \ USE_JSR_229 \ USE_JSR_230 \ USE_JSR_234 \ USE_JSR_135 \ USE_JSR_238 \ USE_JSR_239 \ USE_JSR_280 \ USE_JSR_256 \ USE_JSR_257 \ USE_JSR_281 \ USE_JSR_290 \ USE_ABSTRACTIONS \ USE_VERBOSE_MAKE \ USE_CONTROL_ARGS_FROM_JAD \ USE_JPEG \ USE_GCI \ USE_DIRECTDRAW \ USE_FILE_SYSTEM \ USE_NATIVE_PTI \ USE_MULTIPLE_DISPLAYS \ USE_VERIFY_ONCE \ USE_EXTENDED_ATTRIBUTES \ USE_VM_PROFILES \
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -