Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] View of /branches/vis15/src/compiler/Makefile_mlton.in
ViewVC logotype

View of /branches/vis15/src/compiler/Makefile_mlton.in

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3731 - (download) (annotate)
Thu Apr 7 19:25:15 2016 UTC (3 years, 9 months ago) by jhr
File size: 2540 byte(s)
  Tweaking stats and other messages
# Makefile_mlton.in
#
# This code is part of the Diderot Project (http://diderot-language.cs.uchicago.edu)
#
# COPYRIGHT (c) 2015 The University of Chicago
# All rights reserved.
#
# @configure_input@
#
# A Makefile for when we are using mlton to build the compiler
#

#### Start of system configuration section. ####

#
# directories for the install target
#
PREFIX =		@prefix@
INSTALL_BINDIR =	$(PREFIX)/bin
INSTALL_LIBDIR =	$(PREFIX)/lib
INSTALL_INCDIR =	$(PREFIX)/include

#
# directories for the local-install target
#
SRCDIR =	@DIDEROT_ROOT@/src
LIBDIR =	@DIDEROT_ROOT@/lib
BINDIR =	@DIDEROT_ROOT@/bin

#
# configuration support
#
CONFIGDIR =	@DIDEROT_ROOT@/config

INSTALL =	@INSTALL@
SHELL =		@SHELL@
@SET_MAKE@

MLTON =		@MLTON@
MLTON_FLAGS =	-const 'Exn.keepHistory true'

#### End of system configuration section. ####

PROGRAM =		diderotc
ROOT_MLB =		driver/sources.mlb

#
# generated parser files
#
PARSER_FILES =		parser/diderot.grm.sml parser/diderot.lex.sml
#
# preprocess files that contain UTF-8 multibyte sequences
#
UTF8_FILES =	cfg-ir/dom-tree-fn.sml \
		ein/ein-pp.sml \
		parse-tree/operators.sml \
		typechecker/check-expr.sml
EXPANDED_FILES = $(patsubst %.sml,%_mlton.sml,$(UTF8_FILES))

CODE_FRAG_FILES =

.PHONY:		local-install
local-install:	$(PROGRAM)
	cp -p $(PROGRAM) $(BINDIR)

.PHONY:		install
install:	$(HEAP_IMAGE)
	cp -p $(PROGRAM) $(INSTALL_BINDIR)

.PHONY:		build
build:		$(PROGRAM)

$(PROGRAM): $(ROOT_MLB) $(CODE_FRAG_FILES) $(PARSER_FILES) $(EXPANDED_FILES)
	$(MLTON) $(MLTON_FLAGS) -output $(PROGRAM) $(ROOT_MLB)

.PHONY:		typecheck
typecheck:	$(ROOT_MLB) $(CODE_FRAG_FILES) $(PARSER_FILES) $(EXPANDED_FILES)
	$(MLTON) -stop tc $(MLTON_FLAGS) $(ROOT_MLB)

#
# Generate the scanner and parser from specs
#
parser/diderot.grm.sml: parser/diderot.grm
	cd parser; ml-antlr diderot.grm

parser/diderot.lex.sml: parser/diderot.lex
	cd parser; ml-ulex --strict-sml diderot.lex

#
# preprocess files that contain UTF-8 multibyte sequences
#

$(EXPANDED_FILES): %_mlton.sml: %.sml expand-utf8
	expand-utf8 < $< > $@

.phony:		UTF8
UTF8:
expand-utf8:	$(CONFIGDIR)/expand-utf8.c
	$(CC) -o expand-utf8 $(CONFIGDIR)/expand-utf8.c

#################### Cleanup ####################

CLEAN_SUBDIRS =

CLEAN_FILES +=		$(PROGRAM) \
                        $(CODE_FRAG_FILES) \
			$(PARSER_FILES) \
                        $(EXPANDED_FILES) \
			expand-utf8

DISTCLEAN_FILES +=	Makefile \
			common/paths.sml \
			common/size-of.sml \
			nrrd/run-dnorm.sml

DEVCLEAN_FILES =

include @DIDEROT_MKDIR@/clean-rules.gmk

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0