From 33f0d7c7e0f6eb12137b399c6a20a45e57fb7467 Mon Sep 17 00:00:00 2001 From: michelou Date: Tue, 30 Aug 2005 11:40:12 +0000 Subject: - initial version. --- support/make/rmic.mk | 96 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 support/make/rmic.mk (limited to 'support') diff --git a/support/make/rmic.mk b/support/make/rmic.mk new file mode 100644 index 0000000000..dd0233e610 --- /dev/null +++ b/support/make/rmic.mk @@ -0,0 +1,96 @@ +############################################################-*-Makefile-*-#### +# RMIC - Generate Stubs for Java Class Files +############################################################################## +# $Id$ + +############################################################################## +# Usage +# +# make rmic [target=] {=} +# +############################################################################## +# Variables +# +# RMIC_COMPILER = compiler name, for example RMIC +# $(RMIC_COMPILER) = compiler command +# $(RMIC_COMPILER)_FLAGS = compiler-specific compilation flags +# RMIC_FLAGS += compilation flags +# RMIC_CLASSPATH = location of user class files +# RMIC_BOOTCLASSPATH = location of bootstrap class files +# RMIC_EXTDIRS = location of installed extensions +# RMIC_OUTPUTDIR = directory where to place generated class files +# RMIC_CLASSES += files to compile +# +# All variables may have target specific values which override the +# normal value. Those values are specified by variables whose name is +# prefixed with the target name. For example, to override the value of +# the variable RMIC_CLASSPATH with target COMPILER, one may define the +# variable COMPILER_RMIC_CLASSPATH. +# +############################################################################## +# Examples +# +# Compile file "objects/main/lib/scala/scala/runtime/distributed/ChannelImpl" +# +# make rmic RMIC_CLASSES=objects/main/lib/scala/scala/runtime/distributed/ChannelImpl +# +# +# Compile the whole runtime +# +# make rmic target=RUNTIME +# +# +# A Makefile rule that compiles all modified files from the runtime +# +# .latest-runtime : $(RUNTIME_RMIC_CLASSES) +# @$(MAKE) rmic target=RUNTIME RUNTIME_RMIC_CLASSES='$?' +# touch $@ +# +############################################################################## + +############################################################################## +# Defaults + +RMIC_COMPILER ?= RMIC +CYGWIN_PATH ?= $(1) +CYGWIN_FILE ?= $(1) +RMIC ?= rmic + +############################################################################## +# Values + +rmic_COMPILER = $(call RMIC_LOOKUP,RMIC_COMPILER) +rmic_compiler = $(call RMIC_LOOKUP,$(rmic_COMPILER)) +rmic_FLAGS = $(call RMIC_LOOKUP,RMIC_FLAGS) +rmic_CLASSPATH = $(call RMIC_LOOKUP,RMIC_CLASSPATH) +rmic_BOOTCLASSPATH = $(call RMIC_LOOKUP,RMIC_BOOTCLASSPATH) +rmic_EXTDIRS = $(call RMIC_LOOKUP,RMIC_EXTDIRS) +rmic_OUTPUTDIR = $(call RMIC_LOOKUP,RMIC_OUTPUTDIR) +rmic_CLASSES = $(call RMIC_LOOKUP,RMIC_CLASSES) + +############################################################################## +# Command + +rmic += $(rmic_compiler) +rmic += $(rmic_FLAGS) +rmic += $(rmic_CLASSPATH:%=-classpath $(call CYGWIN_PATH,%)) +rmic += $(rmic_BOOTCLASSPATH:%=-bootclasspath $(call CYGWIN_PATH,%)) +rmic += $(rmic_EXTDIRS:%=-extdirs $(call CYGWIN_PATH,%)) +rmic += $(rmic_OUTPUTDIR:%=-d $(call CYGWIN_FILE,%)) +rmic += $(rmic_CLASSES) + +############################################################################## +# Functions + +RMIC_LOOKUP = $(if $($(target)_$(1)),$($(target)_$(1)),$($(1))) + +############################################################################## +# Rules + +rmic : + @[ -d "$(rmic_OUTPUTDIR)" ] || $(MKDIR) -p "$(rmic_OUTPUTDIR)" + $(strip $(rmic)) + +.PHONY : rmic + +############################################################################## -- cgit v1.2.3