| 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 |
#This tests that 'a' references 'b' and 'b' references 'c' and 'a' requires |
| 25 |
#'b''s '1' configuration and 'c''s '1' configuration. |
| 26 |
#Additionally and 'b''s '1' configuration requires 'c''s '1' config. |
| 27 |
#This tests that two same required configuration does not conflict. |
| 28 |
# a |
| 29 |
# / \ |
| 30 |
# b:1/ \c:1 |
| 31 |
# / \ |
| 32 |
# b------>c |
| 33 |
# b:1=>c:1 |
| 34 |
|
| 35 |
MAKEPROG := ${MAKE} |
| 36 |
|
| 37 |
all: CheckTpd |
| 38 |
|
| 39 |
BuildTpd: |
| 40 |
$(TTCN3_DIR)/bin/ttcn3_makefilegen -F $(MFGEN_FLAGS) $(COVERAGE_FLAG) \ |
| 41 |
-t a.tpd -r -c -W -g |
| 42 |
|
| 43 |
CheckTpd: BuildTpd |
| 44 |
if [ ! -f "./a_binDefault/Makefile" ] || [ `grep -c "EXECUTABLE = binDefault" ./a_binDefault/Makefile` -ne 1 ]; \ |
| 45 |
then echo "Makefilegen required config test 9 failed: Overall verdict: fail" && exit 1; fi |
| 46 |
if [ ! -f "./b_bin1/Makefile" ] || [ `grep -c "EXECUTABLE = bin1" ./b_bin1/Makefile` -ne 1 ]; \ |
| 47 |
then echo "Makefilegen required config test 9 failed: Overall verdict: fail" && exit 1; fi |
| 48 |
if [ ! -f "./c_bin1/Makefile" ] || [ `grep -c "EXECUTABLE = bin1" ./c_bin1/Makefile` -ne 1 ]; \ |
| 49 |
then echo "Makefilegen required config test 9 failed: Overall verdict: fail" && exit 1; fi |
| 50 |
|
| 51 |
clean: |
| 52 |
-rm -rf a_binDefault b_bin1 c_bin1 |
| 53 |
|
| 54 |
distclean: clean |
| 55 |
-rm -f *.out |
| 56 |
|
| 57 |
.PHONY: all clean distclean BuildTpd CheckTpd |
| 58 |
|