handle environmental variables when we create folders dynamically to
[deliverable/titan.core.git] / regression_test / cfgFile / module_parameters / assignment / Makefile
1 ##############################################################################
2 # Copyright (c) 2000-2016 Ericsson Telecom AB
3 # All rights reserved. This program and the accompanying materials
4 # are made available under the terms of the Eclipse Public License v1.0
5 # which accompanies this distribution, and is available at
6 # http://www.eclipse.org/legal/epl-v10.html
7 #
8 # Contributors:
9 # Balasko, Jeno
10 # Beres, Szabolcs
11 # Raduly, Csaba
12 # Szabados, Kristof
13 #
14 ##############################################################################
15 TOPDIR := ../../../
16 include $(TOPDIR)/Makefile.regression
17
18 FILES := assignment.ttcn assignment.cfg
19 RUNNABLE := assignment
20 CFG := assignment.cfg
21 DIR_SINGLE := dir_single_mode
22 DIR_PARALLEL := dir_parallel_mode
23 GENERATED_DIRS := $(DIR_SINGLE) $(DIR_PARALLEL)
24
25 COVERAGE_FLAG :=
26 ifeq ($(COVERAGE), yes)
27 COVERAGE_FLAG += -C
28 endif
29
30 ifdef DYN
31 ifeq ($(PLATFORM), WIN32)
32 export PATH:=$(TTCN3_DIR)/lib:$(PATH):$(ABS_SRC)/$(DIR_SINGLE):$(ANS_SRC)/$(DIR_PARALLEL)
33 else
34 export LD_LIBRARY_PATH:=$(LD_LIBRARY_PATH):$(ABS_SRC)/$(DIR_SINGLE):$(ANS_SRC)/$(DIR_PARALLEL)
35 endif
36 endif
37
38 MAKE_PROG := $(MAKE)
39
40 # List of fake targets:
41 .PHONY: all clean run run_single run_parallel runall
42
43 all: $(GENERATED_DIRS)
44
45 dir_single_mode:
46 mkdir $@
47 cd $@ && for file in $(FILES); do ln -s ../$$file || exit; done
48 cd $@ && $(TTCN3_DIR)/bin/ttcn3_makefilegen $(COVERAGE_FLAG) -s ./* && $(MAKE_PROG)
49
50 dir_parallel_mode:
51 mkdir $@
52 cd $@ && for file in $(FILES); do ln -s ../$$file || exit; done
53 cd $@ && $(TTCN3_DIR)/bin/ttcn3_makefilegen $(COVERAGE_FLAG) ./* && $(MAKE_PROG)
54
55 run: $(GENERATED_DIRS)
56 cd $(DIR_SINGLE) && ./$(RUNNABLE) $(CFG)
57 cd $(DIR_PARALLEL) && $(TTCN3_DIR)/bin/ttcn3_start $(RUNNABLE) $(CFG)
58
59 # To run all tests, possibly in parallel
60 run_single: $(DIR_SINGLE)
61 cd $(DIR_SINGLE) && ./$(RUNNABLE) $(CFG)
62 run_parallel: $(DIR_PARALLEL)
63 cd $(DIR_PARALLEL) && $(TTCN3_DIR)/bin/ttcn3_start $(RUNNABLE) $(CFG)
64 runall: run_single run_parallel
65
66 clean distclean:
67 rm -rf $(GENERATED_DIRS)
68
This page took 0.030992 seconds and 5 git commands to generate.