- Added rules to compile runtime

- Added rules to generate files Function*.java


git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@243 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
This commit is contained in:
paltherr 2003-02-17 13:45:31 +00:00
parent 9091c07c6d
commit 1a28ae8789
1 changed files with 26 additions and 0 deletions

View File

@ -16,6 +16,7 @@ ROOT = .
# project
PROJECT_NAME = scala
PROJECT_ROOT = $(ROOT)
PROJECT_SOURCES += $(RUNTIME_SOURCES)
PROJECT_SOURCES += $(COMPILER_SOURCES)
PROJECT_OUTPUTDIR = $(PROJECT_ROOT)/classes
PROJECT_CLASSPATH = $(PROJECT_OUTPUTDIR)
@ -33,6 +34,20 @@ SCRIPTS_WRAPPER_ALIASES += siris-debug
SCRIPTS_WRAPPER_ALIASES += surus
SCRIPTS_WRAPPER_ALIASES += surus-debug
# automatic generation of Function<n>.java and Tuple<n>.scala files
TEMPLATE_EXPANDER = ./bin/expand-template
FUNCTION_PREFIX = $(RUNTIME_ROOT)
FUNCTION_FILES += $(filter $(FUNCTION_PREFIX)/Function%.java,$(RUNTIME_SOURCES))
FUNCTION_TEMPLATE = $(FUNCTION_PREFIX)/Function.tmpl
FUNCTION_RULES = $(FUNCTION_PREFIX)/Function.scm
# scala runtime
RUNTIME_ROOT = $(PROJECT_SOURCEDIR)/scala
RUNTIME_LIST = $(call READLIST,$(PROJECT_LISTDIR)/runtime.lst)
RUNTIME_SOURCES += $(RUNTIME_LIST:%=$(RUNTIME_ROOT)/%)
RUNTIME_JC_COMPILER += PICO
# scala compiler
COMPILER_ROOT = $(PROJECT_SOURCEDIR)/scalac
COMPILER_LIST = $(call READLIST,$(PROJECT_LISTDIR)/compiler.lst)
@ -102,6 +117,7 @@ make += $(MAKE) MAKELEVEL=$(MAKELEVEL) --no-print-directory
# Commands
all : scripts
all : runtime
all : compiler
force :
@ -110,13 +126,16 @@ force :
clean :
$(RM) -f .latest-compiler
$(RM) -f .latest-runtime
$(RM) -rf $(PROJECT_OUTPUTDIR)
$(RM) -f $(FUNCTION_FILES)
distclean : clean
$(RM) -f .latest-*
$(RM) -f $(SCRIPTS_WRAPPER_LINKS)
scripts : $(SCRIPTS_WRAPPER_LINKS)
runtime : .latest-runtime
compiler : .latest-compiler
.PHONY : all
@ -124,11 +143,16 @@ compiler : .latest-compiler
.PHONY : clean
.PHONY : distclean
.PHONY : scripts
.PHONY : runtime
.PHONY : compiler
##############################################################################
# Targets
.latest-runtime : $(RUNTIME_SOURCES)
@$(MAKE) .do-jc source=RUNTIME JC_FILES='$?'
touch $@
.latest-compiler : $(COMPILER_SOURCES)
@$(make) .do-jc source=COMPILER JC_FILES='$?'
touch $@
@ -139,6 +163,8 @@ compiler : .latest-compiler
$(SCRIPTS_WRAPPER_LINKS):
$(LN) -s $(SCRIPTS_WRAPPER_NAME) $@;
$(FUNCTION_FILES): $(FUNCTION_TEMPLATE) $(FUNCTION_RULES)
$(TEMPLATE_EXPANDER) $(FUNCTION_RULES) $(FUNCTION_TEMPLATE) $@
##############################################################################