Debian Codegraph @

regression_test/compileonly/mfgen-tpd/diff_tpd_name_error/Makefile

raw
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 ifdef LCOV
14 COVERAGE_FLAG := -C
15 endif
16
17 # ${MAKEPROG} has the same content as the built-in ${MAKE},
18 # except the special handling of ${MAKE} does not apply.
19 # If we used ${MAKE} in the rules below, 'make -n' would succeed once,
20 # then fail on every subsequent invocation until a 'make clean' is done.
21
22
23 MAKEPROG := ${MAKE}
24
25 all: CheckTpd
26
27 BuildTpd:
28 $(TTCN3_DIR)/bin/ttcn3_makefilegen -f $(MFGEN_FLAGS) $(COVERAGE_FLAG) \
29 -t a.tpd -r -c -W -g 2>&1 | tee output
30
31 CheckTpd: BuildTpd
32 if [ `grep -c "c.tpd's name attribute should be the same as the referenced project's name" ./output` -ne 2 ]; \
33 then echo "Makefilegen different tpd name in referenced project test failed: Overall verdict: fail" && exit 1; fi
34 if [ `grep -c "b.tpd's name attribute should be the same as the referenced project's name" ./output` -ne 1 ]; \
35 then echo "Makefilegen different tpd name in referenced project test failed: Overall verdict: fail" && exit 1; fi
36 if [ `grep -c "a.tpd's name attribute should be the same as the referenced project's name" ./output` -ne 1 ]; \
37 then echo "Makefilegen different tpd name in referenced project test failed: Overall verdict: fail" && exit 1; fi
38
39 clean:
40 -rm -rf output a_binDefault b_binDefault c_binDefault
41
42 distclean: clean
43 -rm -f *.out
44
45 .PHONY: all clean distclean BuildTpd CheckTpd
46