diff options
author | paltherr <paltherr@epfl.ch> | 2003-02-17 13:45:31 +0000 |
---|---|---|
committer | paltherr <paltherr@epfl.ch> | 2003-02-17 13:45:31 +0000 |
commit | 1726bf7568cb47e81c1b728d5d3618b52956f4e3 (patch) | |
tree | 485880bc2a266fccaf7832f17e48c2aba33ada5b | |
parent | 9ed4c257ab7fb84d64bbe57048f0e6427265ed9a (diff) | |
download | scala-1726bf7568cb47e81c1b728d5d3618b52956f4e3.tar.gz scala-1726bf7568cb47e81c1b728d5d3618b52956f4e3.tar.bz2 scala-1726bf7568cb47e81c1b728d5d3618b52956f4e3.zip |
- Added rules to compile runtime
- Added rules to generate files Function*.java
-rw-r--r-- | Makefile | 26 |
1 files changed, 26 insertions, 0 deletions
@@ -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) $@ ############################################################################## |