jdk/make/tools/swing-nimbus/Makefile
author peterz
Tue, 28 Apr 2009 21:41:04 +0400
changeset 2659 a4b6017f0117
parent 2658 43e06bc950ec
permissions -rw-r--r--
6835113: Nimbus Makefile issue Reviewed-by: prr
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2658
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
     1
#
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
     2
# Copyright 1998-2005 Sun Microsystems, Inc.  All Rights Reserved.
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
     4
#
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
     7
# published by the Free Software Foundation.  Sun designates this
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
     9
# by Sun in the LICENSE file that accompanied this code.
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    10
#
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    15
# accompanied this code).
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    16
#
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    20
#
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    21
# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    22
# CA 95054 USA or visit www.sun.com if you need additional information or
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    23
# have any questions.
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    24
#
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    25
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    26
#
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    27
# Makefile for building the Nimbus generator
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    28
#
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    29
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    30
BUILDDIR = ../..
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    31
PACKAGE = org.jdesktop.synthdesigner.generator
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    32
PRODUCT = tools
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    33
PROGRAM = nimbus_generator
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    34
include $(BUILDDIR)/common/Defs.gmk
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    35
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    36
BUILDTOOL_SOURCE_ROOT = classes
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    37
BUILDTOOL_MAIN        = $(PKGDIR)/Generator.java
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    38
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    39
#
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    40
# Files
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    41
#
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    42
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    43
MAIN_CLASS_FILE = $(BUILDTOOLCLASSDIR)/$(BUILDTOOL_MAIN:%.java=%.class)
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    44
SOURCE_FILES    = $(shell $(FIND) $(BUILDTOOL_SOURCE_ROOT) -name '*.java' -print)
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    45
2659
a4b6017f0117 6835113: Nimbus Makefile issue
peterz
parents: 2658
diff changeset
    46
TEMPLATE_FILES  = $(SHARE_SRC)/classes/javax/swing/plaf/nimbus/Defaults.template \
a4b6017f0117 6835113: Nimbus Makefile issue
peterz
parents: 2658
diff changeset
    47
                  $(SHARE_SRC)/classes/javax/swing/plaf/nimbus/PainterImpl.template \
a4b6017f0117 6835113: Nimbus Makefile issue
peterz
parents: 2658
diff changeset
    48
                  $(SHARE_SRC)/classes/javax/swing/plaf/nimbus/StateImpl.template
2658
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    49
TEMPLATE_DEST   = $(BUILDTOOLCLASSDIR)/org/jdesktop/synthdesigner/generator/resources
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    50
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    51
JIBX_FILES      = $(BUILDTOOL_SOURCE_ROOT)/org/jdesktop/swingx/designer/Designer.jibx.xml \
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    52
                  $(BUILDTOOL_SOURCE_ROOT)/org/jdesktop/synthdesigner/synthmodel/SynthModel.jibx.xml
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    53
JIBX_LIBS_CP    = $(JIBX_LIBS_PATH)/bcel.jar$(CLASSPATH_SEPARATOR)$(JIBX_LIBS_PATH)/xpp3.jar$(CLASSPATH_SEPARATOR)$(JIBX_LIBS_PATH)/jibx-bind.jar$(CLASSPATH_SEPARATOR)$(JIBX_LIBS_PATH)/jibx-run.jar
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    54
JIBX_LIBS_LIST  = $(subst $(CLASSPATH_SEPARATOR), ,$(JIBX_LIBS_CP))
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    55
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    56
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    57
#
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    58
# Rules
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    59
#
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    60
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    61
include $(BUILDDIR)/common/BuildToolJar.gmk
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    62
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    63
$(MAIN_CLASS_FILE): $(SOURCE_FILES) $(JIBX_LIBS_LIST)
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    64
	@$(MKDIR) -p $(BUILDTOOLCLASSDIR)
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    65
	$(BOOT_JAVAC_CMD) -classpath "$(JIBX_LIBS_CP)" \
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    66
	    -d $(BUILDTOOLCLASSDIR) -sourcepath $(BUILDTOOL_SOURCE_ROOT) \
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    67
	    $(SOURCE_FILES)
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    68
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    69
$(TEMPLATE_DEST): $(TEMPLATE_FILES)
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    70
	$(MKDIR) -p $(TEMPLATE_DEST)
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    71
	$(RM) $(TEMPLATE_DEST)/*.template
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    72
	$(CP) $(TEMPLATE_FILES) $(TEMPLATE_DEST)
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    73
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    74
$(BUILDTOOL_MANIFEST_FILE): $(MAIN_CLASS_FILE)
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    75
	$(ECHO) "Main-Class: $(BUILTTOOL_MAINCLASS)" > $@
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    76
	$(ECHO) "Class-Path: $(JIBX_LIBS_LIST:$(JIBX_LIBS_PATH)/%=%)" >> $@
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    77
	$(CP) $(JIBX_LIBS_LIST) $(BUILDTOOLJARDIR)
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    78
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    79
$(BUILDTOOL_JAR_FILE): $(MAIN_CLASS_FILE) $(TEMPLATE_DEST) \
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    80
    $(JIBX_FILES) $(BUILDTOOL_MANIFEST_FILE)
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    81
	@$(prep-target)
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    82
	$(BOOT_JAVA_CMD) \
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    83
	  -classpath "$(JIBX_LIBS_CP)$(CLASSPATH_SEPARATOR)$(BUILDTOOLCLASSDIR)" \
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    84
	  org.jibx.binding.Compile $(JIBX_FILES)
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    85
	$(BOOT_JAR_CMD) cfm $@ $(BUILDTOOL_MANIFEST_FILE) \
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    86
	    -C $(BUILDTOOLCLASSDIR) org \
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    87
	    $(BOOT_JAR_JFLAGS) || $(RM) $@
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    88
	@$(java-vm-cleanup)
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    89
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    90
clean clobber::
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents:
diff changeset
    91
	$(RM) -r $(TEMPLATE_DEST)