summaryrefslogtreecommitdiff
path: root/Examples/test-suite/d/Makefile.in
diff options
context:
space:
mode:
Diffstat (limited to 'Examples/test-suite/d/Makefile.in')
-rw-r--r--Examples/test-suite/d/Makefile.in18
1 files changed, 11 insertions, 7 deletions
diff --git a/Examples/test-suite/d/Makefile.in b/Examples/test-suite/d/Makefile.in
index 61c2749dc..3333df110 100644
--- a/Examples/test-suite/d/Makefile.in
+++ b/Examples/test-suite/d/Makefile.in
@@ -3,17 +3,22 @@
#######################################################################
LANGUAGE = d
+
srcdir = @srcdir@
top_srcdir = ../@top_srcdir@
top_builddir = ../@top_builddir@
+ifeq (,$(D_VERSION))
+ D_VERSION = @DDEFAULTVERSION@
+endif
+
ifeq (2,$(D_VERSION))
VERSIONSUFFIX = .2
else
VERSIONSUFFIX = .1
endif
-TESTSUFFIX = _runme$(VERSIONSUFFIX).d
+SCRIPTSUFFIX = _runme$(VERSIONSUFFIX).d
CPP_TEST_CASES = \
d_nativepointers \
@@ -21,10 +26,9 @@ CPP_TEST_CASES = \
include $(srcdir)/../common.mk
-# Override some variables from common.mk:
-
+# Overridden variables here
+SRCDIR = ../$(srcdir)/
TARGETSUFFIX = _wrap
-
SWIGOPT+=-splitproxy -package $*
# Rules for the different types of tests
@@ -45,7 +49,7 @@ SWIGOPT+=-splitproxy -package $*
# Makes a directory for the testcase if it does not exist
setup = \
- if [ -f $(srcdir)/$(TESTPREFIX)$*$(TESTSUFFIX) ]; then \
+ if [ -f $(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then \
echo "$(ACTION)ing $(LANGUAGE) testcase $* (with run test)" ; \
else \
echo "$(ACTION)ing $(LANGUAGE) testcase $*" ; \
@@ -60,11 +64,11 @@ setup = \
# Compiles D files then runs the testcase. A testcase is only run if
# a file is found which has _runme.d appended after the testcase name.
run_testcase = \
- if [ -f $(srcdir)/$(TESTPREFIX)$*$(TESTSUFFIX) ]; then \
+ if [ -f $(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then \
cd $*$(VERSIONSUFFIX) && \
$(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile \
DFLAGS='-of$*_runme' \
- DSRCS='../$(srcdir)/$(TESTPREFIX)$*$(TESTSUFFIX) `find $* -name *.d`' d_compile && \
+ DSRCS='../$(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) `find $* -name *.d`' d_compile && \
env LD_LIBRARY_PATH=".:$$LD_LIBRARY_PATH" $(RUNTOOL) ./$*_runme; \
else \
cd $*$(VERSIONSUFFIX) && \