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

SCM Repository

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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3816 - (download) (annotate)
Wed May 4 16:34:21 2016 UTC (3 years, 6 months ago) by jhr
File size: 3148 byte(s)
  working on merge (configuration)
# Makefile.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@
#

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

#
# directories for the install target
#
PREFIX =		@prefix@
INSTALL_BINDIR =	$(PREFIX)/bin
INSTALL_HEAPDIR =	$(INSTALL_BINDIR)/.heap
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
HEAPDIR =	$(BINDIR)/.heap

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

#
# generator tools
#
MKMK =		$(SRCDIR)/compiler/gen/fragments/mkmk.sh
MKFRAGS =	$(SRCDIR)/compiler/gen/fragments/mkfrags.sh

#
# SML/NJ build tools
#
INSTALL_SMLNJ_WRAPPER = @INSTALL_SMLNJ_WRAPPER@
ML_BUILD =		@ML_BUILD@
ML_BUILD_FLAGS =	-Ctdp.instrument=true \$$smlnj-tdp/back-trace.cm
ML_MAKEDEPEND =		@ML_MAKEDEPEND@
ML_MAKEDEPEND_FLAGS =

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

PROGRAM =		diderotc
HEAP_IMAGE =		$(PROGRAM).@SMLNJ_HEAP_SUFFIX@
ROOT_CM =		driver/sources.cm
CM_FILES =		ast/sources.cm \
			basis/sources.cm \
			cfg-ir/sources.cm \
			common/sources.cm \
			driver/sources.cm \
			ein/sources.cm \
			fields/sources.cm \
			global-env/sources.cm \
			high-ir/sources.cm \
			low-ir/sources.cm \
			mid-ir/sources.cm \
			nrrd/sources.cm \
			options/sources.cm \
			parse-tree/sources.cm \
			parser/sources.cm \
			simple/sources.cm \
			simplify/sources.cm \
			translate/sources.cm \
			typechecker/sources.cm

CODE_FRAG_DIRS =	c-util

CODE_FRAG_FILES =	$(patsubst %,%/fragments.sml,$(CODE_FRAG_DIRS))
CODE_FRAG_MKFILES =	$(patsubst %,%/fragments.gmk,$(CODE_FRAG_DIRS))

.PHONY:		local-install
local-install:	$(HEAP_IMAGE)
	$(INSTALL_SMLNJ_WRAPPER) $(PROGRAM) $(BINDIR)

.PHONY:		install
install:	$(HEAP_IMAGE)
	$(INSTALL_SMLNJ_WRAPPER) $(PROGRAM) $(INSTALL_BINDIR)

.PHONY:		build
build:		$(HEAP_IMAGE)

$(HEAP_IMAGE):	.depend $(CODE_FRAG_MKFILES)
	$(ML_BUILD) $(ML_BUILD_FLAGS) $(ROOT_CM) Main.main $(PROGRAM)
	touch $(HEAP_IMAGE)

#
# Rules for generating the fragment dependency and source files
#

c-util/fragments.gmk: c-util/fragments/CATALOG $(wildcard c-util/fragments/*in)
	$(MKMK) c-util

c-util/fragments.sml:
	$(MKFRAGS) c-util

#
# Dependency file rules
#
.depend:	$(CM_FILES) $(CODE_FRAG_FILES)
	touch .depend
	$(ML_MAKEDEPEND) $(ML_MAKEDEPEND_FLAGS) -n -f .depend $(ROOT_CM) $(HEAP_IMAGE) || rm -f .depend

ifneq ($(MAKECMDGOALS),clean)
ifneq ($(MAKECMDGOALS),devclean)
ifneq ($(MAKECMDGOALS),distclean)
sinclude .depend
sinclude c-util/fragments.gmk
endif
endif
endif

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

CLEAN_SUBDIRS =

CLEAN_FILES +=		$(HEAP_IMAGE) \
			*/*.grm.sml \
			*/*.lex.sml \
                        $(CODE_FRAG_FILES) \
                        $(CODE_FRAG_MKFILES) \
			.depend

DISTCLEAN_FILES +=	Makefile \
			common/paths.sml \
			common/size-of.sml \
			c-util/fragments/config.in \
			nrrd/run-dnorm.sml \
			options/version.sml \
			$(MKMK) $(MKFRAGS)

DEVCLEAN_FILES =

include @DIDEROT_MKDIR@/clean-rules.gmk

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