Rules.gmk revision 0
#
# Copyright 1995-2007 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Sun designates this
# particular file as subject to the "Classpath" exception as provided
# by Sun in the LICENSE file that accompanied this code.
#
# This code 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 in the LICENSE file that
# accompanied this code).
#
# 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 USA or visit www.sun.com if you need additional information or
# have any questions.
#
#
#
# Rules shared by all Java makefiles.
#
# Used to apply to source file $<, checks code conventions, issues warnings.
$(ECHO) "WARNING: File contains tabs, ^M, or ^L characters: $<"; \
fi; \
fi; \
fi
# Make sure the default rule is all
#
# Directory set up. (Needed by deploy workspace)
#
$(CLASSDESTDIR) $(CLASSHDRDIR) $(OBJDIR) $(OUTPUTDIR) $(BINDIR) $(LIBDIR) $(LIBDIR)/$(LIBARCH) $(TEMPDIR) $(EXTDIR):
$(MKDIR) -p $@
#
# All source tree areas for java/properties files (a few may be closed)
#
else
ALL_CLASSES_SRC = \
#
# If AUTO_FILES_PROPERTIES_DIRS used, automatically find properties files
#
$(shell \
if [ -d $$dir ] ; then \
if [ -d $$sdir ] ; then \
fi ; \
done \
); \
fi; \
done \
)
else
endif # AUTO_FILES_PROPERTIES_DIRS
# Add any automatically found properties files to the properties file list
#
# Get Resources help
#
#
# Compiling .java files.
#
#
# Automatically add to FILES_java if AUTO_FILES_JAVA_DIRS is defined
#
# There are two basic types of sources, normal source files and the
# generated ones. The Normal sources will be located in:
# $(ALL_CLASSES_SRC)
# The generated sources, which might show up late to dinner, are at:
# $(GENSRCDIR)
# and since they could be generated late, we need to be careful that
# we look for these sources late and not use the ':=' assignment which
# might miss their generation.
# Filter out these files or directories
# First list is the normal sources that should always be there,
# by using the ':=', which means we do this processing once.
FILES_java_find_filters1 = $(AUTO_FILES_JAVA_SOURCE_FILTERS1:%=-name % -prune -o)
FILES_java_auto1 := \
$(shell \
if [ -d $$dir ] ; then \
if [ -d $$sdir ] ; then \
fi ; \
done \
); \
fi; \
done \
)
# Second list is the generated sources that should be rare, but will likely
# show up late and we need to look for them at the last minute, so we
# cannot use the ':=' assigment here. But if this gets expanded multiple
# times, the if tests should make them relatively cheap.
FILES_java_find_filters2 = $(AUTO_FILES_JAVA_SOURCE_FILTERS2:%=-name % -prune -o)
FILES_java_auto2 = \
$(shell \
if [ -d $$dir ] ; then \
if [ -d $$sdir ] ; then \
fi ; \
done \
); \
fi; \
done \
)
else
# Add all found java sources to FILES_java macro (if AUTO_FILES_JAVA_DIRS used)
# File that will hold java source names that need compiling
# Add a java source to the list
$(check-conventions)
#Redirect zh_HK java files to tmp directory which created from zh_TW
#$(CLASSDESTDIR)/%_zh_HK.class: $(JDK_L10N_TMP_OUTPUTDIR)/%_zh_HK.java
# @$(add-java-file)
else
#
# Rules for closed files
#
# the closed files.
#
# Rule ordering in this Makefile is important: some targets depend
# on closed files replacing open ones, and thus the closed file rules
# must be found before the open ones.
#
# Don't reorder without consulting teams that depend on this behavior.
#
#Redirect zh_HK java files to tmp directory which created from zh_TW
# List of class files needed
# Got to include exported files.
# Construct list of java sources we need to compile
# Note that we slip resources in so that compiled properties files get created:
@$(TOUCH) $@
@$(RM) $(JAVA_SOURCE_LIST)
# Make sure all newer sources are compiled (in a batch)
@$(MKDIR) -p $(CLASSDESTDIR)
$(CAT) $(JAVA_SOURCE_LIST); \
$(ECHO) "# Running javac:"; \
fi
$(RM) $(JAVA_SOURCE_LIST)
DONT_CLOBBER_CLASSES = true
else
DONT_CLOBBER_CLASSES = false
done
else
else
$(RM) $(JAVA_SOURCE_LIST)
#
# C and C++ make dependencies
#
#
# Running Javah to generate stuff into CClassHeaders.
#
# Fix when deploy workspace makefiles don't depend on this name
#CLASSHDR_DOTFILE=$(CLASSHDRDIR)/.classheaders
$(CLASSHDR_DOTFILE): $(CLASSES_export)
@$(ECHO) "# Running javah:"
$(JAVAH_CMD) -d $(CLASSHDRDIR)/ \
@$(TOUCH) $@
$(RM) $(CLASSHDR_DOTFILE)
$(RM) -r $(CLASSHDRDIR)
else # FILES_export
endif # FILES_export
#
# Default dependencies
#