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