annotate make/common/internal/BinaryPlugs.gmk @ 381:b6d6877c1155

6719955: Update copyright year Summary: Update copyright year for files that have been modified in 2008 Reviewed-by: ohair, tbell
author xdono
date Wed, 02 Jul 2008 12:55:45 -0700
parents 91087975bff7
children e35680499077
rev   line source
duke@0 1 #
xdono@381 2 # Copyright 2007-2008 Sun Microsystems, Inc. All Rights Reserved.
duke@0 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
duke@0 4 #
duke@0 5 # This code is free software; you can redistribute it and/or modify it
duke@0 6 # under the terms of the GNU General Public License version 2 only, as
duke@0 7 # published by the Free Software Foundation. Sun designates this
duke@0 8 # particular file as subject to the "Classpath" exception as provided
duke@0 9 # by Sun in the LICENSE file that accompanied this code.
duke@0 10 #
duke@0 11 # This code is distributed in the hope that it will be useful, but WITHOUT
duke@0 12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
duke@0 13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
duke@0 14 # version 2 for more details (a copy is included in the LICENSE file that
duke@0 15 # accompanied this code).
duke@0 16 #
duke@0 17 # You should have received a copy of the GNU General Public License version
duke@0 18 # 2 along with this work; if not, write to the Free Software Foundation,
duke@0 19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
duke@0 20 #
duke@0 21 # Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
duke@0 22 # CA 95054 USA or visit www.sun.com if you need additional information or
duke@0 23 # have any questions.
duke@0 24 #
duke@0 25
duke@0 26 ########################################################################
duke@0 27
duke@0 28 # Definitions for openjdk plugs (used by both import and export)
duke@0 29
duke@0 30 # Names of native shared libraries
duke@0 31
duke@0 32 PLUG_JSOUND_LIBRARY=$(LIB_PREFIX)jsoundhs.$(LIBRARY_SUFFIX)
duke@0 33 PLUG_LIBRARY_NAMES = \
duke@0 34 $(PLUG_JSOUND_LIBRARY)
duke@0 35
duke@0 36 # Sub-directory where native shared libraries are located (e.g. jre/bin or...)
duke@0 37
duke@0 38 PLUG_LOCATION_SUBDIR=$(ARCH_VM_SUBDIR)
duke@0 39
duke@0 40 # Explicit classfile lists
duke@0 41
duke@0 42 # WARNING: These classlists will not work with pattern rules, only used in
duke@0 43 # shell commands.
duke@0 44 # The \$$ patterns will fail in pattern rules, which want $$,
duke@0 45 # but the $$ fails in shell commands.
duke@0 46 # The shell commands are more important.
duke@0 47 # Also, the $1 pattern in these names causes problems with the
duke@0 48 # GNU make define feature, so you can't use these in define's.
duke@0 49
duke@0 50 PLUG_JMF_CLASS_NAMES = \
duke@0 51 com/sun/jmx/snmp/SnmpDataTypeEnums.class \
duke@0 52 com/sun/jmx/snmp/SnmpDefinitions.class \
duke@0 53 com/sun/jmx/snmp/SnmpOid.class \
duke@0 54 com/sun/jmx/snmp/SnmpOidDatabase.class \
duke@0 55 com/sun/jmx/snmp/SnmpOidDatabaseSupport.class \
duke@0 56 com/sun/jmx/snmp/SnmpOidRecord.class \
duke@0 57 com/sun/jmx/snmp/SnmpOidTable.class \
duke@0 58 com/sun/jmx/snmp/SnmpOidTableSupport.class \
duke@0 59 com/sun/jmx/snmp/SnmpParameters.class \
duke@0 60 com/sun/jmx/snmp/SnmpPduPacket.class \
duke@0 61 com/sun/jmx/snmp/SnmpPeer.class \
duke@0 62 com/sun/jmx/snmp/SnmpTimeticks.class \
duke@0 63 com/sun/jmx/snmp/SnmpVarBind.class \
duke@0 64 com/sun/jmx/snmp/SnmpVarBindList.class \
duke@0 65 com/sun/jmx/snmp/Timestamp.class \
duke@0 66 com/sun/jmx/snmp/daemon/SendQ.class \
duke@0 67 com/sun/jmx/snmp/daemon/SnmpInformRequest.class \
duke@0 68 com/sun/jmx/snmp/daemon/SnmpQManager.class \
duke@0 69 com/sun/jmx/snmp/daemon/SnmpRequestCounter.class \
duke@0 70 com/sun/jmx/snmp/daemon/SnmpResponseHandler.class \
duke@0 71 com/sun/jmx/snmp/daemon/SnmpSendServer.class \
duke@0 72 com/sun/jmx/snmp/daemon/SnmpSession.class \
duke@0 73 com/sun/jmx/snmp/daemon/SnmpSocket.class \
duke@0 74 com/sun/jmx/snmp/daemon/SnmpTimerServer.class \
duke@0 75 com/sun/jmx/snmp/daemon/WaitQ.class
duke@0 76
duke@0 77 PLUG_SOUND_CLASS_NAMES = \
duke@0 78 com/sun/media/sound/AbstractPlayer.class \
duke@0 79 com/sun/media/sound/CircularBuffer.class \
duke@0 80 com/sun/media/sound/HeadspaceInstrument.class \
duke@0 81 com/sun/media/sound/HeadspaceMixer\$$1.class \
duke@0 82 com/sun/media/sound/HeadspaceMixer\$$MidiLine.class \
duke@0 83 com/sun/media/sound/HeadspaceMixer\$$MidiLineInfo.class \
duke@0 84 com/sun/media/sound/HeadspaceMixer\$$MixerInfo.class \
duke@0 85 com/sun/media/sound/HeadspaceMixer\$$MixerReverbControl\$$MixerReverbType.class \
duke@0 86 com/sun/media/sound/HeadspaceMixer\$$MixerReverbControl.class \
duke@0 87 com/sun/media/sound/HeadspaceMixer.class \
duke@0 88 com/sun/media/sound/HeadspaceMixerProvider.class \
duke@0 89 com/sun/media/sound/HeadspaceSample.class \
duke@0 90 com/sun/media/sound/HeadspaceSoundbank.class \
duke@0 91 com/sun/media/sound/HsbParser.class \
duke@0 92 com/sun/media/sound/MixerClip\$$1.class \
duke@0 93 com/sun/media/sound/MixerClip\$$MixerClipApplyReverbControl.class \
duke@0 94 com/sun/media/sound/MixerClip\$$MixerClipGainControl.class \
duke@0 95 com/sun/media/sound/MixerClip\$$MixerClipMuteControl.class \
duke@0 96 com/sun/media/sound/MixerClip\$$MixerClipPanControl.class \
duke@0 97 com/sun/media/sound/MixerClip\$$MixerClipSampleRateControl.class \
duke@0 98 com/sun/media/sound/MixerClip.class \
duke@0 99 com/sun/media/sound/MixerMidiChannel.class \
duke@0 100 com/sun/media/sound/MixerSequencer\$$1.class \
duke@0 101 com/sun/media/sound/MixerSequencer\$$ControllerVectorElement.class \
duke@0 102 com/sun/media/sound/MixerSequencer\$$MixerSequencerInfo.class \
duke@0 103 com/sun/media/sound/MixerSequencer\$$RecordingTrack.class \
duke@0 104 com/sun/media/sound/MixerSequencer.class \
duke@0 105 com/sun/media/sound/MixerSequencerProvider.class \
duke@0 106 com/sun/media/sound/MixerSourceLine\$$1.class \
duke@0 107 com/sun/media/sound/MixerSourceLine\$$MixerSourceLineApplyReverbControl.class \
duke@0 108 com/sun/media/sound/MixerSourceLine\$$MixerSourceLineGainControl.class \
duke@0 109 com/sun/media/sound/MixerSourceLine\$$MixerSourceLineMuteControl.class \
duke@0 110 com/sun/media/sound/MixerSourceLine\$$MixerSourceLinePanControl.class \
duke@0 111 com/sun/media/sound/MixerSourceLine\$$MixerSourceLineSampleRateControl.class \
duke@0 112 com/sun/media/sound/MixerSourceLine.class \
duke@0 113 com/sun/media/sound/MixerSynth\$$1.class \
duke@0 114 com/sun/media/sound/MixerSynth\$$MixerSynthInfo.class \
duke@0 115 com/sun/media/sound/MixerSynth\$$SynthReceiver.class \
duke@0 116 com/sun/media/sound/MixerSynth.class \
duke@0 117 com/sun/media/sound/MixerSynthProvider.class \
duke@0 118 com/sun/media/sound/MixerThread.class \
duke@0 119 com/sun/media/sound/RmfFileReader.class \
duke@0 120 com/sun/media/sound/SimpleInputDevice\$$1.class \
duke@0 121 com/sun/media/sound/SimpleInputDevice\$$InputDeviceDataLine.class \
duke@0 122 com/sun/media/sound/SimpleInputDevice\$$InputDevicePort.class \
duke@0 123 com/sun/media/sound/SimpleInputDevice\$$InputDevicePortInfo.class \
duke@0 124 com/sun/media/sound/SimpleInputDevice.class \
duke@0 125 com/sun/media/sound/SimpleInputDeviceProvider\$$1.class \
duke@0 126 com/sun/media/sound/SimpleInputDeviceProvider\$$InputDeviceInfo.class \
duke@0 127 com/sun/media/sound/SimpleInputDeviceProvider.class
duke@0 128
duke@0 129 # Class list temp files (used by both import and export of plugs)
duke@0 130
duke@0 131 PLUG_TEMPDIR=$(ABS_TEMPDIR)/plugs
prr@290 132 PLUG_CLASS_AREAS = jmf sound
duke@0 133 PLUG_CLISTS = $(PLUG_CLASS_AREAS:%=$(PLUG_TEMPDIR)/%.clist)
duke@0 134
duke@0 135 # Create jargs file command
duke@0 136
duke@0 137 define plug-create-jargs
duke@0 138 @$(prep-target)
duke@0 139 $(SED) -e "s@^@-C $(CLASSDESTDIR) @" $< > $@
duke@0 140 endef # plug-create-clist-jargs
duke@0 141
duke@0 142 # Create clist (class name list) and jargs file (input to jar)
duke@0 143 # Need these files to avoid long command lines which fail on some systems.
duke@0 144
duke@0 145 $(PLUG_TEMPDIR)/jmf.clist:
duke@0 146 @$(prep-target)
duke@0 147 @for i in $(PLUG_JMF_CLASS_NAMES) ; do \
duke@0 148 $(ECHO) "$$i" >> $@; \
duke@0 149 done
duke@0 150 $(PLUG_TEMPDIR)/sound.clist:
duke@0 151 @$(prep-target)
duke@0 152 @for i in $(PLUG_SOUND_CLASS_NAMES) ; do \
duke@0 153 $(ECHO) "$$i" >> $@ ; \
duke@0 154 done
duke@0 155 $(PLUG_TEMPDIR)/all.clist: $(PLUG_CLISTS)
duke@0 156 @$(prep-target)
duke@0 157 $(CAT) $(PLUG_CLISTS) > $@
duke@0 158 $(PLUG_TEMPDIR)/jmf.jargs: $(PLUG_TEMPDIR)/jmf.clist
duke@0 159 $(plug-create-jargs)
duke@0 160 $(PLUG_TEMPDIR)/sound.jargs: $(PLUG_TEMPDIR)/sound.clist
duke@0 161 $(plug-create-jargs)
duke@0 162 $(PLUG_TEMPDIR)/all.jargs: $(PLUG_TEMPDIR)/all.clist
duke@0 163 $(plug-create-jargs)
duke@0 164
duke@0 165 #
duke@0 166 # Specific to OPENJDK import of binary plugs
duke@0 167 #
duke@0 168
duke@0 169 ifdef OPENJDK
duke@0 170
duke@0 171 # Import
duke@0 172
duke@0 173 PLUG_IMPORT_DIR=$(BINARY_PLUGS_PATH)
duke@0 174 PLUG_IMPORT_JARFILE=$(BINARY_PLUGS_JARFILE)
duke@0 175
duke@0 176 # Import file command
duke@0 177
duke@0 178 define import-binary-plug-file
duke@0 179 @$(ECHO) "PLUG IMPORT: $(@F)"
duke@0 180 $(install-file)
duke@0 181 endef # import-binary-plug-file
duke@0 182
duke@0 183 # Import classes command
duke@0 184
duke@0 185 define import-binary-plug-classes
duke@0 186 @$(MKDIR) -p $(CLASSDESTDIR)
duke@0 187 @$(CAT) $1 | $(SED) -e 's/^/PLUG IMPORT: /'
duke@0 188 ($(CD) $(CLASSDESTDIR) && $(BOOT_JAR_CMD) xf $(PLUG_IMPORT_JARFILE) @$1)
duke@0 189 endef # import-binary-plug-classes
duke@0 190
duke@0 191 # Import specific area classes (the classes are always created)
duke@0 192
duke@0 193 import-binary-plug-jmf-classes: $(PLUG_IMPORT_JARFILE) $(PLUG_TEMPDIR)/jmf.clist
duke@0 194 $(call import-binary-plug-classes,$(PLUG_TEMPDIR)/jmf.clist)
duke@0 195 import-binary-plug-sound-classes: $(PLUG_IMPORT_JARFILE) $(PLUG_TEMPDIR)/sound.clist
duke@0 196 $(call import-binary-plug-classes,$(PLUG_TEMPDIR)/sound.clist)
duke@0 197
duke@0 198 # Import all classes from the jar file
duke@0 199
duke@0 200 import-binary-plug-jar: \
duke@0 201 import-binary-plug-jmf-classes \
prr@290 202 import-binary-plug-sound-classes
duke@0 203
duke@0 204 # Import native libraries
duke@0 205
duke@0 206 $(LIB_LOCATION)/$(PLUG_JSOUND_LIBRARY): \
duke@0 207 $(PLUG_IMPORT_DIR)/$(PLUG_LOCATION_SUBDIR)/$(PLUG_JSOUND_LIBRARY)
duke@0 208 $(import-binary-plug-file)
duke@0 209
duke@0 210 # Rules only used by lower level makefiles
duke@0 211
duke@0 212 import-binary-plug-jsound-library: \
duke@0 213 $(LIB_LOCATION)/$(PLUG_JSOUND_LIBRARY)
duke@0 214
duke@0 215 # Binary plug start/complete messages
duke@0 216
duke@0 217 import-binary-plugs-started:
duke@0 218 @$(ECHO) "BinaryPlugs import started: `date`"
duke@0 219 @$(ECHO) "BINARY_PLUGS_PATH=$(BINARY_PLUGS_PATH)"
duke@0 220 import-binary-plugs-completed:
duke@0 221 @$(ECHO) "BinaryPlugs import completed: `date`"
duke@0 222
duke@0 223 # Import lib files (only if they don't exist already)
duke@0 224
duke@0 225 import-binary-plugs-libs: \
duke@0 226 $(PLUG_LIBRARY_NAMES:%=$(LIB_LOCATION)/%)
duke@0 227
duke@0 228 # Import everything
duke@0 229
duke@0 230 import-binary-plugs: \
duke@0 231 import-binary-plugs-started \
duke@0 232 import-binary-plugs-libs \
duke@0 233 import-binary-plug-jar \
duke@0 234 import-binary-plugs-completed
duke@0 235
duke@0 236 # All these targets are phony (no filenames)
duke@0 237
duke@0 238 .PHONY: import-binary-plugs-started \
duke@0 239 import-binary-plugs-completed \
duke@0 240 import-binary-plugs-libs \
duke@0 241 import-binary-plugs \
duke@0 242 import-binary-plug-jar \
duke@0 243 import-binary-plug-jmf-classes \
duke@0 244 import-binary-plug-sound-classes \
duke@0 245 import-binary-plug-jsound-library
duke@0 246
duke@0 247 else # !OPENJDK
duke@0 248
duke@0 249 #
duke@0 250 # Specific to exporting binary plugs for OPENJDK (e.g. OPENJDK is NOT defined)
duke@0 251 #
duke@0 252
duke@0 253 # Export names (See make/common/Defs.gmk for BINARY_PLUGS_JARNAME definition)
duke@0 254
duke@0 255 PLUG_EXPORT_DIRNAME=openjdk-binary-plugs-image
duke@0 256 PLUG_EXPORT_DIR=$(OUTPUTDIR)/$(PLUG_EXPORT_DIRNAME)
duke@0 257 PLUG_EXPORT_JARFILE=$(PLUG_EXPORT_DIR)/jre/lib/$(BINARY_PLUGS_JARNAME)
duke@0 258
duke@0 259 # Export file command
duke@0 260
duke@0 261 define export-binary-plug-file
duke@0 262 @$(ECHO) "PLUG EXPORT: $(@F)"
duke@0 263 $(install-file)
duke@0 264 endef # export-binary-plug-file
duke@0 265
duke@0 266 # OpenJDK Binary Plug License
duke@0 267
duke@0 268 $(PLUG_EXPORT_DIR)/LICENSE: $(CLOSED_SHARE_SRC)/doc/openjdk/binary-plugs/LICENSE
duke@0 269 $(export-binary-plug-file)
duke@0 270 export-binary-plugs-license: $(PLUG_EXPORT_DIR)/LICENSE
duke@0 271
duke@0 272 # Create jar file of plug classes (always created)
duke@0 273
duke@0 274 $(PLUG_EXPORT_JARFILE): $(PLUG_TEMPDIR)/all.clist $(PLUG_TEMPDIR)/all.jargs
duke@0 275 @$(prep-target)
duke@0 276 @$(ECHO) "PLUG EXPORT: $(@F)"
duke@0 277 @$(CAT) $(PLUG_TEMPDIR)/all.clist | $(SED) -e 's/^/PLUG EXPORT: /'
duke@0 278 $(BOOT_JAR_CMD) cf $@ @$(PLUG_TEMPDIR)/all.jargs
duke@0 279 export-binary-plugs-jar: $(PLUG_EXPORT_JARFILE)
duke@0 280
duke@0 281 # Export native libraries
duke@0 282
duke@0 283 $(PLUG_EXPORT_DIR)/$(PLUG_LOCATION_SUBDIR)/$(PLUG_JSOUND_LIBRARY): \
duke@0 284 $(LIB_LOCATION)/$(PLUG_JSOUND_LIBRARY)
duke@0 285 $(export-binary-plug-file)
duke@0 286
duke@0 287 # Export binary plug start/complete messages
duke@0 288
duke@0 289 export-binary-plugs-started:
duke@0 290 @$(ECHO) "BinaryPlugs export started: `date`"
duke@0 291 @$(ECHO) "PLUG_EXPORT_DIR=$(PLUG_EXPORT_DIR)"
duke@0 292 $(RM) -r $(PLUG_EXPORT_DIR)
duke@0 293 @$(MKDIR) -p $(PLUG_EXPORT_DIR)
duke@0 294 @$(MKDIR) -p $(PLUG_TEMPDIR)
duke@0 295 export-binary-plugs-completed:
duke@0 296 @$(RM) -r $(PLUG_TEMPDIR)
duke@0 297 @$(ECHO) "BinaryPlugs export completed: `date`"
duke@0 298
duke@0 299 # Export lib files (only if they don't exist already)
duke@0 300
duke@0 301 export-binary-plugs-libs: \
duke@0 302 $(PLUG_LIBRARY_NAMES:%=$(PLUG_EXPORT_DIR)/$(PLUG_LOCATION_SUBDIR)/%)
duke@0 303
duke@0 304 # Export everything
duke@0 305
duke@0 306 export-binary-plugs: \
duke@0 307 export-binary-plugs-started \
duke@0 308 export-binary-plugs-libs \
duke@0 309 export-binary-plugs-license \
duke@0 310 export-binary-plugs-jar \
duke@0 311 export-binary-plugs-completed
duke@0 312
duke@0 313 # All these targets are phony (no filenames)
duke@0 314
duke@0 315 .PHONY: export-binary-plugs-started \
duke@0 316 export-binary-plugs-license \
duke@0 317 export-binary-plugs-jar \
duke@0 318 export-binary-plugs-libs \
duke@0 319 export-binary-plugs-completed \
duke@0 320 export-binary-plugs
duke@0 321
duke@0 322 # Rules that test the export and import of plugs (only when you can export)
duke@0 323
duke@0 324 TEST_OUTPUTDIR=$(ABS_OUTPUTDIR)/../$(PLATFORM)-$(ARCH)-testing-plugs
duke@0 325 TEST_PLUG_COPY=$(TEST_OUTPUTDIR)/$(PLUG_EXPORT_DIRNAME)-testcopy
duke@0 326
duke@0 327 # Run export-binary-plugs first, then use this rule to test an import
duke@0 328
duke@0 329 test-binary-plugs: $(TEST_PLUG_COPY)
duke@0 330 $(RM) -r $(TEST_OUTPUTDIR)/$(PLUG_EXPORT_DIRNAME)
duke@0 331 $(MKDIR) -p $(TEST_OUTPUTDIR)
duke@0 332 @$(ECHO) "Testing import of plugs"
duke@0 333 ($(CD) $(JDK_TOPDIR)/make && \
duke@0 334 $(MAKE) OPENJDK=true \
duke@0 335 ALT_OUTPUTDIR=$(TEST_OUTPUTDIR) \
duke@0 336 ALT_JDK_IMPORT_PATH=$(JDK_IMPORT_PATH) \
duke@0 337 ALT_BINARY_PLUGS_PATH=$(TEST_PLUG_COPY) \
duke@0 338 import-binary-plugs )
duke@0 339 $(RM) -r $(TEST_OUTPUTDIR)
duke@0 340 @$(ECHO) "Testing of plugs was successful"
duke@0 341
duke@0 342 $(TEST_PLUG_COPY):
duke@0 343 @$(ECHO) "Creating test plug copy"
duke@0 344 $(RM) -r $@
duke@0 345 $(MKDIR) -p $(@D)
duke@0 346 $(CP) -r -p $(PLUG_EXPORT_DIR) $@
duke@0 347
duke@0 348 .PHONY: test-binary-plugs
duke@0 349
duke@0 350 endif # !OPENJDK
duke@0 351