summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chill_run.cc9
-rw-r--r--configure.ac41
-rw-r--r--graph.hh2
-rw-r--r--test-chill/Makefile381
-rw-r--r--test-chill/testchill/chill.py3
5 files changed, 188 insertions, 248 deletions
diff --git a/chill_run.cc b/chill_run.cc
index a3c9180..45d2345 100644
--- a/chill_run.cc
+++ b/chill_run.cc
@@ -359,7 +359,6 @@ int main( int argc, char* argv[] )
#endif
#ifdef BUILD_ROSE
((IR_cudaroseCode *)(ir_code))->commit_loop(myloop, lnum);
- ((IR_roseCode*)(ir_code))->finalizeRose();
#elif BUILD_SUIF
((IR_cudasuifCode *)(ir_code))->commit_loop(myloop, lnum);
#endif
@@ -375,16 +374,14 @@ int main( int argc, char* argv[] )
lnum_end = get_loop_num_end(L);
DEBUG_PRINT("calling ROSE code gen? loop num %d - %d\n", lnum_start, lnum_end);
#endif
-
+#endif
#ifdef BUILD_ROSE
finalize_loop(lnum_start, lnum_end);
//((IR_roseCode*)(ir_cide))->commit_loop(myloop, lnum);
((IR_roseCode*)(ir_code))->finalizeRose();
- #elif BUILD_SUIF
- ((IR_suifCode*)(ir_code))->commit_loop(myloop, lnum);
+ //#elif BUILD_SUIF
+ //((IR_suifCode*)(ir_code))->commit_loop(myloop, lnum);
#endif
-
-#endif
delete ir_code;
}
#ifdef PYTHON
diff --git a/configure.ac b/configure.ac
index f40c87c..6f79d1b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -19,46 +19,35 @@ AM_PATH_PYTHON([2.7],[
[`${PYTHON} -c "from distutils import sysconfig; print(sysconfig.get_python_inc())"`])
AC_SUBST([PYTHON_LIBDIR],
[`${PYTHON} -c "from distutils import sysconfig; print(sysconfig.get_config_var('LIBDIR'))"`])
- AC_SUBST([python_builds],[yes])],[
- AC_SUBST([python_builds],[no])])
+ AC_SUBST([with_python],["yes"])],[
+ AC_SUBST([with_python],["no"])])
-#AC_ARG_ENABLE([cuda],[
-# AS_HELP_STRING([--enable-cuda],[builds cudachill])],[
-# AS_IF([test "x$enableval" != xno],[
-# AC_SUBST([enable_cuda],[yes])])])
-
AC_ARG_ENABLE([cuda],[
- AS_HELP_STRING([--enable-cuda],[builds cudachill])
- ],[
+ AS_HELP_STRING([--enable-cuda],[builds cudachill])],[
AS_IF([test "x$enableval" != xno],[
- AC_SUBST([enable_cuda],[yes])])])
-
+ AC_SUBST([enable_cuda],[yes])],[])])
AM_CONDITIONAL([CUDACHILL_OPT],[test "x$enable_cuda" == xyes])
AC_ARG_ENABLE([coverage],[
- AS_HELP_STRING([--enable-coverage],[enables coverage testing])
- ],[
+ AS_HELP_STRING([--enable-coverage],[enables coverage testing])],[
+
AS_IF(["x$enableval" != xno],[
AC_SUBST([enable_coverage],[yes])
AC_SUBST([CFLAGS],["-g -fprofile-arcs -ftest-coverage"])
AC_SUBST([CPPFLAGS],["-g -fprofile-arcs -ftest-coverage"])],[])])
AC_ARG_WITH([rose],[
- AS_HELP_STRING([--with-rose],[set rose home])
- ],[
+ AS_HELP_STRING([--with-rose],[set rose home])],[
AC_SUBST([ROSEHOME], [$withval])
- AC_DEFINE([BUILD_ROSE],[],[Use ROSE])
- ],[
+ AC_DEFINE([BUILD_ROSE],[],[Use ROSE])],[
AC_SUBST([ROSEHOME], ["${ROSEHOME}"])
AC_DEFINE([BUILD_ROSE],[],[Use ROSE])])
AC_ARG_WITH([boost],[
- AS_HELP_STRING([--with-boost],[set boost home])
- ],[
- AC_SUBST([BOOSTHOME], [$withval])
- ],[
+ AS_HELP_STRING([--with-boost],[set boost home])],[
+ AC_SUBST([BOOSTHOME], [$withval])],[
AC_SUBST([BOOSTHOME], ["${BOOSTHOME}"])])
AC_ARG_WITH([omega],[
@@ -67,8 +56,7 @@ AC_ARG_WITH([omega],[
AC_SUBST([OMEGAHOME], ["$(pwd)/omega"])])
AC_ARG_WITH([python],[
- AS_HELP_STRING([--with-python],[set python as the interface languge])
- ],[
+ AS_HELP_STRING([--with-python],[set python as the interface languge])],[
AC_SUBST([interface_lang],[python])
],[
AC_SUBST([interface_lang],[default])])
@@ -80,18 +68,13 @@ AC_ARG_WITH([lua],[
],[
AC_SUBST([LUAHOME], ["${LUAHOME}"])])
-AC_ARG_WITH([script],[
- AS_HELP_STRING([--with-script],[set the legacy scripting language as the interface language (CHiLL only)]),
- ],[
- AC_SUBST([interface_lang],[default])])
-
#AC_ARG_WITH([interface],[
# AS_HELP_STRING([--with-interface],[select interface language])],[
# AC_SUBST([interface_lang],[$withval])],[
# AC_SUBST([interface_lang],[default])])
AS_IF([test "x$interface_lang" == xdefault],[
- AS_IF([test "x$enable_cuda" == xyes],[
+ AS_IF([test "x$enable_cuda" != xno],[
AC_SUBST([use_python],[no])
AC_SUBST([use_lua],[yes])
],[
diff --git a/graph.hh b/graph.hh
index a7b80e9..504c147 100644
--- a/graph.hh
+++ b/graph.hh
@@ -76,7 +76,7 @@ template<typename VertexType, typename EdgeType>
std::ostream& operator<<(std::ostream &os, const Graph<VertexType, EdgeType> &g) {
for (int i = 0; i < g.vertex.size(); i++)
for (typename Graph<VertexType,EdgeType>::EdgeList::const_iterator j = g.vertex[i].second.begin(); j != g.vertex[i].second.end(); j++) {
- os << "s" << i << "->" << j->first << ":";
+ os << i+1 << "->" << j->first+1 << ":";
for (typename std::vector<EdgeType>::const_iterator k = j->second.begin(); k != j->second.end(); k++)
os << " " << *k;
os << std::endl;
diff --git a/test-chill/Makefile b/test-chill/Makefile
index 7f2c8b5..d7238e8 100644
--- a/test-chill/Makefile
+++ b/test-chill/Makefile
@@ -1,251 +1,210 @@
-
-.SUFFIXES:
-.PHONY: all depend depend-cuda-chill clean veryclean cuda-chill
-.PHONY: chill
-
-CC = g++
-CFLAGS = -g -Wno-write-strings
-DEPENDENCE_CFLAGS = -M
-OMEGAHOME=./omega
-
-ifdef TEST_COVERAGE
- CFLAGS := $(CFLAGS) -fprofile-arcs -ftest-coverage
-endif
-
-# TODO auto-generate using config.h generated by autoconf?
-CHILLVERSION = "\"0.2.0\""
-PYTHON=python #=$(shell `which python` )
-PYVERSION=$(shell $(PYTHON) -c "import sys; print(sys.version[:3])") # 2.6
-PYTHONVER = python$(PYVERSION)
-PYTHONINCLUDE = $(shell $(PYTHON) -c "from distutils import sysconfig; print(sysconfig.get_python_inc())")
-PYTHONLIBDIR = $(shell $(PYTHON) -c "from distutils import sysconfig; print(sysconfig.get_config_var('LIBDIR'))")
-PYTHONCONFIG = $(shell $(PYTHON) -c "from distutils import sysconfig; print(sysconfig.get_config_var('LIBPL'))")
-# SCRIPT_LANG = lua <-- supplied by the command line
-
-
-# this creates a LUAHOME even if you don't have such a directory
-ifeq ($(strip $(wildcard $(LUAHOME))),)
-LUAHOME = $(HOME)/lua
-endif
-LUA_PATH = -L${LUAHOME}/lib
-
-
-# where do include files live
-INC_PATH = -I${PYTHONINCLUDE} -I${OMEGAHOME}/include -I${LUAHOME}/include
-
-# where do libraries live
-LIB_PATH = -L${OMEGAHOME}/code_gen/obj -L${OMEGAHOME}/omega_lib/obj
-# seemingly not needed -L${PYTHONCONFIG}
-
-
-
-CORE_LIBS = -lm -lcodegen -lomega
-RUNNER_LIBS = -llua -ldl -lreadline -lhistory -lpthread -ldl -lutil -lm -l${PYTHONVER}
-
-TDLHOME = ${ROSEHOME}/libltdl
-
-BOOST_DATE_TIME_LIB = -lboost_date_time
-BOOST_FILESYSTEM_LIB = -lboost_filesystem
-BOOST_LDFLAGS = -L${BOOSTHOME}/lib
-BOOST_PROGRAM_OPTIONS_LIB = -lboost_program_options
-BOOST_REGEX_LIB = -lboost_regex
-BOOST_SYSTEM_LIB = -lboost_system
-BOOST_THREAD_LIB = -lboost_thread
-BOOST_WAVE_LIB = -lboost_wave
-
-ROSE_LIBS = -lrose $(BOOST_LDFLAGS) $(BOOST_DATE_TIME_LIB)\
- $(BOOST_THREAD_LIB) $(BOOST_FILESYSTEM_LIB) $(BOOST_PROGRAM_OPTIONS_LIB)\
- $(BOOST_REGEX_LIB) $(BOOST_SYSTEM_LIB) $(BOOST_SERIALIZATION_LIB) \
- $(BOOST_WAVE_LIB) -lrt -ldl
-
-
-# Source files common to both chill and cuda-chill
-CORE_SRCS = dep.cc omegatools.cc irtools.cc loop.cc loop_basic.cc loop_datacopy.cc loop_unroll.cc loop_tile.cc loop_extra.cc
-LIB_SRCS = $(CORE_SRCS)
-
-# files that will be generated by bison, flex, and make that need to be removed at clean.
-GENERATED_SRCS = parser.tab.hh parser.tab.cc parse_expr.yy.cc parse_expr.ll.hh parse_expr.tab.cc parse_expr.tab.hh Makefile.deps
-# object files that are specific to lua or python builds. -- This is used so that SCRIPT_LANG does not need to be specified during clean
-ORPHAN_OBJS = chill_run_util.o chillmodule.o parse_expr.tab.o parse_expr.yy.o
-
-# files used in chill and cuda-chill interfaces
-ifeq ($(SCRIPT_LANG),lua)
- RUNNER_SRCS = chill_run.cc chill_env.cc
-else
- ifeq ($(SCRIPT_LANG),python)
- RUNNER_SRCS = chill_run.cc chillmodule.cc
- else
- RUNNER_SRCS = chill_run.cc chill_env.cc
- endif
+### ###
+### SVN variables ###
+### ###
+SVN_USER=dhuth
+
+### ###
+### Notification ###
+### (not implemented yet) ###
+NOTIFY_ON_FAILURE=False
+
+
+
+### Derived variables from config ###
+CHILLHOME?=$(STAGING_DIR)/chill
+SVN_CHILL=svn+ssh://$(SVN_USER)@shell.cs.utah.edu/uusoc/facility/res/hallresearch/svn_repo/resRepo/projects/chill
+SVN_CHILL_DEV=$(SVN_CHILL)/branches/cuda-chill-rose
+SVN_CHILL_RELEASE=$(SVN_CHILL)/release
+CHILL_DEV_SRC=$(STAGING_DIR)/chill-dev
+CHILL_RELEASE_SRC=$(STAGING_DIR)/chill-release
+OMEGAHOME?=$(STAGING_DIR)/omega
+SVN_OMEGA=svn+ssh://$(SVN_USER)@shell.cs.utah.edu/uusoc/facility/res/hallresearch/svn_repo/resRepo/projects/omega
+SVN_OMEGA_DEV=$(SVN_OMEGA)/branches/cuda-omega-rose
+SVN_OMEGA_RELEASE=$(SVN_OMEGA)/release
+OMEGA_DEV_SRC=$(STAGING_DIR)/omega-dev
+OMEGA_RELEASE_SRC=$(STAGING_DIR)/omega-release
+
+
+### Staging ###
+STAGING_DIR=$(shell pwd)/.staging
+STAGING_DIR_BIN=$(STAGING_DIR)/bin
+STAGING_DIR_WD=$(STAGING_DIR)/wd
+
+
+### Local ###
+UNIT_TEST_DIR=$(shell pwd)/unit-tests/
+CHILL_DEV_TESTCASE_DIR=$(shell pwd)/test-cases/chill
+CHILL_DEV_TESTCASES_SCRIPT=$(shell find $(CHILL_DEV_TESTCASE_DIR) -name "*.script")
+CHILL_DEV_TESTCASES_STDOUT=$(patsubst %.script,%.stdout,$(CHILL_DEV_TESTCASES_SCRIPT))
+
+### Python environment variables ###
+PYTHON_2:=$(shell which python)
+PYTHON_3:=$(shell which python3)
+
+ifneq ($(PYTHON_3),)
+PYTHON_3_VERSION=$(shell $(PYTHON_3) -c "import sysconfig; print(sysconfig.get_config_var('VERSION'))")
endif
-
-# files used in chill but not cuda-chill
-IR_CHILL_SRCS = ir_rose.cc ir_rose_utils.cc
-ifeq ($(SCRIPT_LANG),lua)
- YACC_SRCS = parse_expr.yy.cc parse_expr.tab.cc
- CHILL_RUNNER_SRCS = chill_run_util.cc
- CHILL_SRCS = $(CORE_SRCS) $(IR_CHILL_SRCS) $(CHILL_RUNNER_SRCS) $(RUNNER_SRCS)
-else
- ifeq ($(SCRIPT_LANG),python)
- YACC_SRCS = parse_expr.yy.cc parse_expr.tab.cc
- CHILL_RUNNER_SRCS = chill_run_util.cc
- CHILL_SRCS = $(CORE_SRCS) $(IR_CHILL_SRCS) $(CHILL_RUNNER_SRCS) $(RUNNER_SRCS)
- else
- YACC_SRCS = lex.yy.cc parser.tab.cc
- CHILL_RUNNER_SRCS =
- CHILL_SRCS = $(CORE_SRCS) $(IR_CHILL_SRCS) $(YACC_SRCS) $(RUNNER_SRCS)
- endif
+PYTHON_2_VERSION=$(shell $(PYTHON_2) -c "import sysconfig; print sysconfig.get_config_var('VERSION')")
+PYTHON_VERSION=$(firstword $(PYTHON_3_VERSION) $(PYTHON_2_VERSION))
+PYTHON=$(shell which python$(PYTHON_VERSION))
+### ---------------------------- ###
+
+
+EXPORT=export CHILL_DEV_SRC=$(CHILL_DEV_SRC); \
+ export CHILL_RELEASE_SRC=$(CHILL_RELEASE_SRC); \
+ export OMEGA_DEV_SRC=$(OMEGA_DEV_SRC); \
+ export OMEGA_RELEASE_SRC=$(OMEGA_RELEASE_SRC); \
+ export STAGING_DIR_BIN=$(STAGING_DIR_BIN); \
+ export STAGING_DIR_WD=$(STAGING_DIR_WD);
+
+### deump environment ###
+# define quiet to shut this part up #
+ifndef quiet
+$(info notify on failure? $(NOTIFY_ON_FAILURE))
+$(info staging directory $(STAGING_DIR))
+$(info binary directory $(STAGING_DIR_BIN))
+$(info working directory $(STAGING_DIR_WD))
+$(info omega home $(OMEGAHOME))
+$(info chill home $(CHILLHOME))
+$(info chill svn dev repo $(SVN_CHILL_DEV))
+$(info chill svn release repo $(SVN_CHILL_RELEASE))
+$(info chill dev src $(CHILL_DEV_SRC))
+$(info chill release src $(CHILL_RELEASE_SRC))
+$(info omega svn dev repo $(SVN_OMEGA_DEV))
+$(info omega svn release repo $(SVN_OMEGA_RELEASE))
+$(info omega dev src $(OMEGA_DEV_SRC))
+$(info omega release src $(OMEGA_RELEASE_SRC))
+$(info python $(PYTHON))
+$(info unit tests $(UNIT_TEST_DIR))
+#$(info chill-dev test cases $(CHILL_DEV_TESTCASES_SCRIPT))
+#$(info chill-dev test case stdouts $(CHILL_DEV_TESTCASES_STDOUT))
endif
+### ----------------- ###
-# source files for cuda-chill but not chill
-CUDACHILL_ONLY_SRCS = mem_mapping_utils.cc loop_cuda_rose.cc
-IR_CUDACHILL_SRCS = ir_rose.cc ir_rose_utils.cc ir_cudarose.cc ir_cuda_rose_utils.cc
-CUDACHILL_RUNNER_SRCS =
-CUDACHILL_SRCS = $(CORE_SRCS) $(CUDACHILL_ONLY_SRCS) $(IR_CUDACHILL_SRCS) $(RUNNER_SRCS) $(CUDACHILL_RUNNER_SRCS)
-
-# set interface language flags
-ifeq ($(SCRIPT_LANG),lua)
- RUNNER_EXTRA_CFLAGS = -DLUA
-else
- ifeq ($(SCRIPT_LANG),python)
- RUNNER_EXTRA_CFLAGS = -DPYTHON
- endif
-endif
-
-depend-cuda-chill: CFLAGS := $(CFLAGS) -DCUDACHILL
-cuda-chill: CFLAGS := $(CFLAGS) -DCUDACHILL
-
-ALL_SRCS = $(CORE_SRCS) $(YACC_SRCS) $(IR_CHILL_SRCS) $(CUDACHILL_ONLY_SRCS) $(IR_CUDACHILL_SRCS) $(RUNNER_SRCS) $(CHILL_RUNNER_SRCS) $(CUDACHILL_RUNNER_SRCS)
-ALL_OBJS = $(ALL_SRCS:.cc=.o) $(ORPHAN_OBJS)
-
-RUNNER_DEFINES = -DLUA_USE_LINUX -DCHILL_BUILD_VERSION=$(CHILLVERSION) -DCHILL_BUILD_DATE="\"$(CHILL_BUILD_DATE)\""
-
-
-YACC_EXTRA_CFLAGS =
-
-#####################################################################
-# compiler intermediate code specific definitions
-#####################################################################
-
+DIRTY_EXTS=pyc o log pickle
+DIRTY_FILES=$(foreach de,$(DIRTY_EXTS),$(shell find . -name "*.$(de)"))
+DIRTY_DIRS=$(shell find . -name '__pycache__' -and -type d) $(STAGING_DIR) pylang coverage_report
+CORE_TESTS:=_extract util gcov _cpp_validate_env cpp_validate test __main__
+OMEGA_TESTS:=omega
+CHILL_TESTS:=chill
-#LIBS := $(LIBS) $(ROSE_LIBS)
-LIB_PATH := $(LIB_PATH) -L${ROSEHOME}/lib -L${TDLHOME}
-#LIB_SRCS := $(LIB_SRCS) # $(IR_SRCS)
-INC_PATH := $(INC_PATH) -I${ROSEHOME}/include -I${BOOSTHOME}/include
-YACC_EXTRA_CFLAGS := -DBUILD_ROSE
-RUNNER_EXTRA_CFLAGS := $(RUNNER_EXTRA_CFLAGS) -DBUILD_ROSE
+CORE_TESTS:=$(addsuffix .py,$(addprefix unit-tests/test_,$(CORE_TESTS)))
+OMEGA_TESTS:=$(addsuffix .py,$(addprefix unit-tests/test_,$(OMEGA_TESTS)))
+CHILL_TESTS:=$(addsuffix .py,$(addprefix unit-tests/test_,$(CHILL_TESTS)))
-
-#####################################################################
-# build rules
-#####################################################################
-
-YACC_OBJS = $(YACC_SRCS:.cc=.o)
-RUNNER_OBJS = $(RUNNER_SRCS:.cc=.o)
-CHILL_RUNNER_OBJS = $(CHILL_RUNNER_SRCS:.cc=.o)
-CUDACHILL_RUNNER_OBJS = $(CUDACHILL_RUNNER_SRCS:.cc=.o)
-LIB_OBJS = $(LIB_SRCS:.cc=.o)
-IR_CHILL_OBJS = $(IR_CHILL_SRCS:.cc=.o)
-IR_CUDACHILL_OBJS = $(IR_CUDACHILL_SRCS:.cc=.o)
-CUDACHILL_ONLY_OBJS = $(CUDACHILL_ONLY_SRCS:.cc=.o)
-
-CHILL_OBJS = $(CHILL_SRCS:.cc=.o)
-CUDACHILL_OBJS = $(CUDACHILL_SRCS:.cc=.o)
+### The all target ###
+.PHONY: all
+all:
+ $(MAKE) clean quiet=1
+ $(MAKE) install quiet=1
-all:
- $(MAKE) depend-chill
- $(MAKE) chill
- $(MAKE) depend-cuda-chill
- $(MAKE) cuda-chill
+### This will install the chill_test module ###
+.PHONY: install
+install: pylang
+ $(PYTHON) makeparser.py
+ #TODO: maybe run a setup or something
-# can't these be combined to a superset of all source files?
-depend: depend-cuda-chill
-depend-chill: $(LIB_SRCS) $(RUNNER_SRCS) $(CHILL_RUNNER_SRCS) $(YACC_SRCS)
- $(CC) $(DEPENDENCE_CFLAGS) $(INC_PATH) $(LIB_SRCS) $(RUNNER_SRCS) $(CHILL_RUNNER_SRCS) $(YACC_SRCS) > Makefile.deps
+### This will uninstall teh chill_test module ###
+.PHONY: uninstall
+uninstall:
+ #TODO: can python modules be uninstalled?
-depend-cuda-chill: $(LIB_SRCS) $(RUNNER_SRCS) $(CUDACHILL_RUNNER_SRCS)
- $(CC) $(DEPENDENCE_CFLAGS) $(INC_PATH) $(LIB_SRCS) $(RUNNER_SRCS) $(CUDACHILL_RUNNER_SRCS) > Makefile.deps
-libchill_xform.a: $(LIB_OBJS) $(IR_CHILL_OBJS)
- ar -rs $@ $(LIB_OBJS) $(IR_CHILL_OBJS)
-libcudachill_xform.a: $(LIB_OBJS) $(IR_CUDACHILL_OBJS) $(CUDACHILL_ONLY_OBJS)
- ar -rs $@ $(LIB_OBJS) $(IR_CUDACHILL_OBJS) $(CUDACHILL_ONLY_OBJS)
+### Simply removes all files listed in DIRTY_FILES ###
+.PHONY: clean
+clean:
+ rm -rf $(DIRTY_FILES)
+ rm -rf $(DIRTY_DIRS)
-%.o: %.cc
- $(CC) $(CFLAGS) $(INC_PATH) $< -c -o $@
+pylang:
+ git clone https://github.com/dhuth/pylang.git pylang-tmp
+ $(PYTHON) pylang-tmp/make_grammar_parsers.py
+ cp -r pylang-tmp/pylang pylang
+ rm -rf pylang-tmp
-clean:
- @rm -fr $(ALL_OBJS) $(YACC_SRCS) $(GENERATED_SRCS)
+### Test the test harness ###
+.PHONY: test
+test: $(STAGING_DIR_BIN) $(OMEGA_DEV_SRC) $(OMEGA_RELEASE_SRC) $(CHILL_DEV_SRC) $(CHILL_RELEASE_SRC)
+ @echo "-----------------------------------------------------------"
+ @echo "Note: This target tests the test suite it's self, not chill"
+ @echo "To test chill, run python -m testchill ..."
+ @echo "-----------------------------------------------------------"
+ - $(EXPORT) $(PYTHON) -m unittest $(OMEGA_TESTS) $(CORE_TESTS) $(CHILL_TESTS)
+ @ rm -rf $(STAGING_DIR)
-veryclean:
- @rm -fr $(ALL_OBJS) $(YACC_SRCS) libchill_xform.a libcudachill_xform.a chill cuda-chill
+.PHONY: test-chill
+test-chill: $(STAGING_DIR_BIN) $(OMEGA_DEV_SRC) $(OMEGA_RELEASE_SRC) $(CHILL_DEV_SRC) $(CHILL_RELEASE_SRC)
+ - $(EXPORT) $(PYTHON) -m unittest $(OMEGA_TESTS) $(CHILL_TESTS)
+ @ rm -rf $(STAGING_DIR)
-cuda-chill: libcudachill_xform.a $(CUDACHILL_RUNNER_OBJS) $(RUNNER_OBJS)
- $(CC) $(CFLAGS) $(LIB_PATH) $(LUA_PATH) $(CUDACHILL_RUNNER_OBJS) $(RUNNER_OBJS) $< $(CORE_LIBS) $(ROSE_LIBS) $(RUNNER_LIBS) -o $@
-ifeq ($(SCRIPT_LANG),lua)
-chill: libchill_xform.a $(CHILL_RUNNER_OBJS) $(RUNNER_OBJS) $(YACC_OBJS)
- $(CC) $(CFLAGS) $(LIB_PATH) $(LUA_PATH) $(YACC_OBJS) $(CHILL_RUNNER_OBJS) $(RUNNER_OBJS) $< $(CORE_LIBS) $(ROSE_LIBS) $(RUNNER_LIBS) -o $@
-else
-ifeq ($(SCRIPT_LANG),python)
-chill: libchill_xform.a $(CHILL_RUNNER_OBJS) $(RUNNER_OBJS) $(YACC_OBJS)
- $(CC) $(CFLAGS) $(LIB_PATH) $(YACC_OBJS) $(CHILL_RUNNER_OBJS) $(RUNNER_OBJS) $< $(CORE_LIBS) $(ROSE_LIBS) $(RUNNER_LIBS) -o $@
+.PHONY: test-omega
+test-omega: $(STAGING_DIR_BIN) $(OMEGA_DEV_SRC) $(OMEGA_RELEASE_SRC)
+ - $(EXPORT) $(PYTHON) -m unittest $(OMEGA_TESTS)
+ @ rm -rf $(STAGING_DIR)
-else
-chill: libchill_xform.a $(YACC_OBJS)
- $(CC) $(CFLAGS) $(LIB_PATH) $(YACC_OBJS) $< $(CORE_LIBS) $(ROSE_LIBS) -o $@
-endif
-endif
+.PHONY: test-core
+test-core: $(STAGING_DIR_BIN) $(OMEGA_DEV_SRC) $(OMEGA_RELEASE_SRC) $(CHILL_DEV_SRC) $(CHILL_RELEASE_SRC) make-omega
+ - $(EXPORT) $(PYTHON) -m unittest $(CORE_TESTS)
+ @ rm -rf $(STAGING_DIR)
-lex.yy.cc: parser.ll parser.tab.hh
- flex++ parser.ll
-lex.yy.o: lex.yy.cc
- $(CC) $(CFLAGS) -c $< -o $@
+.PHONY:
+test-core-%: $(STAGING_DIR_BIN)
+ - $(EXPORT) $(PYTHON) -m unittest unit-tests/test_$*.py
-parser.tab.hh parser.tab.cc: parser.yy
- bison -t -d $<
-parser.tab.o: parser.tab.cc
- $(CC) $(CFLAGS) $(YACC_EXTRA_CFLAGS) $(INC_PATH) -DCHILL_BUILD_DATE="\"$(CHILL_BUILD_DATE)\"" -c $< -o $@
+.PHONY: test-debug
+debug:
+ @### NOTHING ###
-parse_expr.tab.cc: parse_expr.yy
- bison -t -d parse_expr.yy
+### benchmarking (don't use if your're not me) ###
+$(CHILL_DEV_TESTCASES_STDOUT): %.stdout: %.script
+ $(EXPORT) cd $(STAGING_DIR_WD); $(STAGING_DIR_BIN)/chill $< > $@
-parse_expr.tab.o: parse_expr.tab.cc
- $(CC) $(CFLAGS) $(YACC_CFLAGS) $(INC_PATH) -o $@ -c parse_expr.tab.cc
-parse_expr.yy.cc: parse_expr.tab.cc parse_expr.ll
- flex -o parse_expr.yy.cc parse_expr.ll
+.PHONY: benchmark-dev
+benchmark-dev: test-chill $(CHILL_DEV_TESTCASES_STDOUT)
+ # do nothing
-parse_expr.yy.o: parse_expr.yy.cc
- $(CC) $(CFLAGS) $(YACC_CFLAGS) $(INC_PATH) -o $@ -c parse_expr.yy.cc
-$(RUNNER_SRCS:.cc=.o): %.o: %.cc
- $(CC) $(CFLAGS) $(RUNNER_EXTRA_CFLAGS) $(INC_PATH) $(RUNNER_DEFINES) $< -c -o $@
+### checking out and making directories ###
+$(STAGING_DIR_BIN):
+ mkdir -p $(STAGING_DIR_BIN)
+ mkdir -p $(STAGING_DIR_WD)
-$(CHILL_RUNNER_SRCS:.cc=.o): %.o: %.cc
- $(CC) $(CFLAGS) $(RUNNER_EXTRA_CFLAGS) $(INC_PATH) $(RUNNER_DEFINES) $< -c -o $@
+$(CHILL_DEV_SRC): $(OMEGA_DEV_SRC) $(STAGING_DIR_BIN)
+ svn export $(SVN_CHILL_DEV) $(CHILL_DEV_SRC)
-$(CUDACHILL_RUNNER_SRCS:.cc=.o): %.o %.cc
- $(CC) $(CFLAGS) $(RUNNER_EXTRA_CFLAGS) $(INC_PATH) $(RUNNER_DEFINES) $< -c -o $@
+$(CHILL_RELEASE_SRC): $(OMEGA_RELEASE_SRC) $(STAGIN_DIR_BIN)
+ svn export $(SVN_CHILL_RELEASE) $(CHILL_RELEASE_SRC)
+$(OMEGA_DEV_SRC): $(STAGING_DIR_BIN)
+ svn export $(SVN_OMEGA_DEV) $(OMEGA_DEV_SRC)
+ #cd $(OMEGA_DEV_SRC); $(MAKE) depend
+ #cd $(OMEGA_DEV_SRC); $(MAKE)
-$(IR_SRCS:.cc=.o): %.o: %.cc
- $(CC) -Wno-write-strings $(CFLAGS) $(INC_PATH) $< -c -o $@
+$(OMEGA_RELEASE_SRC): $(STAGING_DIR_BIN)
+ svn export $(SVN_OMEGA_RELEASE) $(OMEGA_RELEASE_SRC)
+ #cd $(OMEGA_RELEASE_SRC); $(MAKE) depend
+ #cd $(OMEGA_RELEASE_SRC): $(MAKE)
-ifeq ($(shell test -f Makefile.deps && echo "true"), true)
-include Makefile.deps
-endif
+.PHONY: make-omega
+make-omega:
+ cd $(OMEGA_DEV_SRC); $(MAKE) depend
+ cd $(OMEGA_DEV_SRC); $(MAKE)
+ cd $(OMEGA_RELEASE_SRC); $(MAKE) depend
+ cd $(OMEGA_RELEASE_SRC); $(MAKE)
-CHILL_BUILD_DATE = $(shell date +%m/%d/%Y)
+#$(STAGING_DIR):
+# mkdir -p $(STAGING_DIR)
diff --git a/test-chill/testchill/chill.py b/test-chill/testchill/chill.py
index 833d524..0e30149 100644
--- a/test-chill/testchill/chill.py
+++ b/test-chill/testchill/chill.py
@@ -146,12 +146,13 @@ class BuildChillTestCase(test.TestCase):
util.shell('rm', ['-f', '*.gcda'], wd=self.config.chill_dir)
util.shell('make clean', wd=self.config.chill_dir)
+ util.shell('make veryclean', wd=self.config.chill_dir)
def run(self):
"""
Build chill
"""
- util.shell('make', ['distclean'], wd=self.config.chill_dir)
+ util.shell('make', ['clean'], wd=self.config.chill_dir)
util.shell('./configure', self.config.config_args, wd=self.config.chill_dir)
util.shell('make', [], wd=self.config.chill_dir)