-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathMakefile
70 lines (58 loc) · 2.11 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# Copyright (c) 2005, 2006 Los Alamos National Security, LLC. This
# material was produced under U.S. Government contract DE-
# AC52-06NA25396 for Los Alamos National Laboratory (LANL), which is
# operated by the Los Alamos National Security, LLC (LANS) for the
# U.S. Department of Energy. The U.S. Government has rights to use,
# reproduce, and distribute this software. NEITHER THE GOVERNMENT NOR
# LANS MAKES ANY WARRANTY, EXPRESS OR IMPLIED, OR ASSUMES ANY
# LIABILITY FOR THE USE OF THIS SOFTWARE. If software is modified to
# produce derivative works, such modified software should be clearly
# marked, so as not to confuse it with the version available from
# LANL.
# Additionally, this program and the accompanying materials are made
# available under the terms of the Eclipse Public License v1.0 which
# accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
OFP_HOME=..
include $(OFP_HOME)/make.inc
JAVAC=javac
JAVA=java
JAR=jar
CD=cd
BUILDDIR=../../../build
PARDIR=../
export CLASSPATH=$(OFP_CLASSPATH):$CLASSPATH
TEST_DIRS=bug-reports rule-tests rule-f08-tests f08-tests caf_2.0 LOPe
define run-tests-recursive
@for dir in $(TEST_DIRS) ; do \
echo ; echo Running $@ in $$dir...; \
$(CD) $$dir; \
$(MAKE) $@; \
if [ $$? != 0 ]; then exit 1; fi; \
$(CD) ..; \
done
endef
check:
@echo
@echo "Checking for files in the OFP jar file..."
@$(JAR) tf $(OFP_BUILD_DIR)/$(OFP_JARFILE) | grep ActionEnums.h
@$(JAR) tf $(OFP_BUILD_DIR)/$(OFP_JARFILE) | grep FortranParserAction.h
@$(JAR) tf $(OFP_BUILD_DIR)/$(OFP_JARFILE) | grep token.c
@$(JAR) tf $(OFP_BUILD_DIR)/$(OFP_JARFILE) | grep token.h
@$(JAR) tf $(OFP_BUILD_DIR)/$(OFP_JARFILE) | grep c_actions_jni.c
@$(JAR) tf $(OFP_BUILD_DIR)/$(OFP_JARFILE) | grep jni_token_funcs.h
@$(JAR) tf $(OFP_BUILD_DIR)/$(OFP_JARFILE) | grep jni_token_funcs.c
$(run-tests-recursive)
runRuleTests:
$(run-tests-recursive)
runRuleTestsNoCheck:
$(run-tests-recursive)
runRuleTestsVerbose:
$(run-tests-recursive)
clean:
@for dir in $(TEST_DIRS) ; do \
echo Cleaning $$dir... ; \
$(CD) $$dir; \
$(MAKE) clean; \
$(CD) ..; \
done;