| 1 |
############################################################################## |
| 2 |
# Copyright (c) 2000-2021 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 v2.0 |
| 5 |
# which accompanies this distribution, and is available at |
| 6 |
# https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html |
| 7 |
# |
| 8 |
# Contributors: |
| 9 |
# Szabo, Bence Janos |
| 10 |
# |
| 11 |
############################################################################## |
| 12 |
TOPDIR := ../../../.. |
| 13 |
include $(TOPDIR)/Makefile.regression |
| 14 |
|
| 15 |
ifdef LCOV |
| 16 |
COVERAGE_FLAG := -C |
| 17 |
endif |
| 18 |
|
| 19 |
# ${MAKEPROG} has the same content as the built-in ${MAKE}, |
| 20 |
# except the special handling of ${MAKE} does not apply. |
| 21 |
# If we used ${MAKE} in the rules below, 'make -n' would succeed once, |
| 22 |
# then fail on every subsequent invocation until a 'make clean' is done. |
| 23 |
|
| 24 |
# Hierarchy |
| 25 |
# a--->e-------------> |
| 26 |
# | | |
| 27 |
# | | |
| 28 |
# b<-------< | |
| 29 |
# | | |f:1 |
| 30 |
# c |f:1=>b:1 | |
| 31 |
# | | | |
| 32 |
# d <---------f |
| 33 |
# d refers both b and e |
| 34 |
#Result will be: a:Default, b:1, c:Default, d:Default, e:Default, f:1 |
| 35 |
MAKEPROG := ${MAKE} |
| 36 |
|
| 37 |
all: CheckTpd |
| 38 |
|
| 39 |
BuildTpd: |
| 40 |
$(TTCN3_DIR)/bin/ttcn3_makefilegen $(MFGEN_FLAGS) $(COVERAGE_FLAG) \ |
| 41 |
-t a/a.tpd -FWrZH |
| 42 |
|
| 43 |
CheckTpd: BuildTpd |
| 44 |
if [ ! -f "./a/a_binDefault/Makefile" ] || [ ! -L "./a/a_binDefault/aDefault.ttcn" ] || [ -L "./a/a_binDefault/a1.ttcn" ]; \ |
| 45 |
then echo "Makefilegen required config test 8 failed: Overall verdict: fail" && exit 1; fi |
| 46 |
if [ ! -f "./b/b_bin1/Makefile" ] || [ ! -L "./b/b_bin1/b1.ttcn" ] || [ -L "./b/b_bin1/bDefault.ttcn" ]; \ |
| 47 |
then echo "Makefilegen required config test 8 failed: Overall verdict: fail" && exit 1; fi |
| 48 |
if [ ! -f "./c/c_binDefault/Makefile" ] || [ ! -L "./c/c_binDefault/cDefault.ttcn" ] || [ -L "./c/c_binDefault/c1.ttcn" ]; \ |
| 49 |
then echo "Makefilegen required config test 8 failed: Overall verdict: fail" && exit 1; fi |
| 50 |
if [ ! -f "./d/d_binDefault/Makefile" ] || [ ! -L "./d/d_binDefault/dDefault.ttcn" ] || [ -L "./d/d_binDefault/d1.ttcn" ]; \ |
| 51 |
then echo "Makefilegen required config test 8 failed: Overall verdict: fail" && exit 1; fi |
| 52 |
if [ ! -f "./e/e_binDefault/Makefile" ] || [ ! -L "./e/e_binDefault/eDefault.ttcn" ] || [ -L "./e/e_binDefault/e1.ttcn" ]; \ |
| 53 |
then echo "Makefilegen required config test 8 failed: Overall verdict: fail" && exit 1; fi |
| 54 |
if [ ! -f "./f/f_bin1/Makefile" ] || [ ! -L "./f/f_bin1/f1.ttcn" ] || [ -L "./f/f_bin1/fDefault.ttcn" ]; \ |
| 55 |
then echo "Makefilegen required config test 8 failed: Overall verdict: fail" && exit 1; fi |
| 56 |
|
| 57 |
clean: |
| 58 |
-rm -rf a/a_binDefault b/b_bin1 c/c_binDefault d/d_binDefault e/e_binDefault f/f_bin1 |
| 59 |
|
| 60 |
distclean: clean |
| 61 |
-rm -f *.out |
| 62 |
|
| 63 |
.PHONY: all clean distclean BuildTpd CheckTpd |
| 64 |
|