Sync with 5.4.3
[deliverable/titan.core.git] / regression_test / compileonly / mfgen-tpd / Makefile
1 ###############################################################################
2 # Copyright (c) 2000-2015 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 TOPDIR := ../..
9 include $(TOPDIR)/Makefile.regression
10
11 ifdef LCOV
12 COVERAGE_FLAG := -C
13 endif
14
15 # ${MAKEPROG} has the same content as the built-in ${MAKE},
16 # except the special handling of ${MAKE} does not apply.
17 # If we used ${MAKE} in the rules below, 'make -n' would succeed once,
18 # then fail on every subsequent invocation until a 'make clean' is done.
19 MAKEPROG := ${MAKE}
20
21 DIRLIST := buildconfig_param invalid_buildconfig_param invalid_buildconfig_tpd HP79745 HQ56829 HQ56834 HQ56848 library HR30356 flagTest HR30365 dependency_check
22
23 # The default target.
24 ifeq ($(findstring c,$(MFGEN_FLAGS)),) # no -c
25 # Build in "reverse" order to reduce false positives
26 all: BuildConsumer BuildSupplier BuildSubplier HP35732 HQ56829 BuildDirs HQ60308 SearchPaths
27 else
28 # Build from supplier to consumer because central dirs must be ready
29 # when the toplevel is built
30 all: BuildSubplier BuildSupplier BuildConsumer COMMON NAS HP35732 HQ56829 BuildDirs SearchPaths
31
32 .NOTPARALLEL:
33 endif
34
35 WORKING_DIR := $(shell pwd)
36
37 # The run target is not normally used in compileonly.
38 # It can be built manually.
39 run:
40 perl runner.pl
41
42 BuildDirs:
43 @for dir in $(DIRLIST); do $(MAKE) -C $$dir || exit; done
44
45 BuildConsumer: /tmp/issue
46 @echo -e "#\n# Build Consumer\n#"
47 mkdir -p consumer/bin && cd consumer/bin \
48 && if [ ! -h handmade.ttcn ]; then ln -s ../../handmade.ttcn ./ ; else : ; fi\
49 && $(TTCN3_DIR)/bin/ttcn3_makefilegen -fD $(MFGEN_FLAGS) $(COVERAGE_FLAG) -t ../consumer-ref-supplier-Default.tpd handmade.ttcn \
50 && $(MAKEPROG)
51
52 BuildSupplier:
53 @echo -e "#\n# Build Supplier\n#"
54 mkdir -p supplier/bin && cd supplier/bin \
55 && $(TTCN3_DIR)/bin/ttcn3_makefilegen -fD $(MFGEN_FLAGS) $(COVERAGE_FLAG) -t ../supplier24.tpd \
56 && $(MAKEPROG)
57
58 BuildSubplier: /tmp/issue
59 @echo -e "#\n# Build Subplier (leaf project)\n#"
60 mkdir -p subplier/bin && cd subplier/bin \
61 && $(TTCN3_DIR)/bin/ttcn3_makefilegen -fD $(MFGEN_FLAGS) $(COVERAGE_FLAG) -t ../subplier.tpd \
62 && $(MAKEPROG)
63
64 HP35732:
65 mkdir -p $@ && cd $@ \
66 && $(TTCN3_DIR)/bin/ttcn3_makefilegen -fD $(MFGEN_FLAGS) $(COVERAGE_FLAG) -t ../NAS_EPS_v9.7.0_CNL113729/test/NAS_EPS_v9.7.0_CNL113729_test.tpd \
67 && $(MAKEPROG)
68
69 HQ56829 HQ56834 HQ56848:
70 $(MAKEPROG) -C $@
71
72 HQ60308:
73 cd $@ \
74 && $(TTCN3_DIR)/bin/ttcn3_makefilegen -fD -t counter.tpd \
75 && $(MAKEPROG)
76
77 COMMON:
78 mkdir -p COMMON/bin && cd COMMON/bin \
79 && $(TTCN3_DIR)/bin/ttcn3_makefilegen -fD $(MFGEN_FLAGS) $(COVERAGE_FLAG) -t ../ProtocolModules_Common.tpd \
80 && $(MAKEPROG)
81
82 NAS:
83 mkdir -p NAS_EPS_v9.7.0_CNL113729/bin && cd NAS_EPS_v9.7.0_CNL113729/bin \
84 && $(TTCN3_DIR)/bin/ttcn3_makefilegen -fD $(MFGEN_FLAGS) $(COVERAGE_FLAG) -t ../NAS_EPS_v9.7.0_CNL113729.tpd \
85 && $(MAKEPROG)
86
87 SearchPaths:
88 cd search_paths/main && \
89 $(TTCN3_DIR)/bin/ttcn3_makefilegen -fg -t Main.tpd -I/something -I$(WORKING_DIR)/search_paths/dep3/Test3/ -I$(WORKING_DIR)/search_paths/dep2/Test2 -I$(WORKING_DIR)/search_paths/dep2/dep2_1/Test2_1 && \
90 cd bin && $(MAKEPROG)
91
92 /tmp/issue:
93 -touch $@
94
95 clean:
96 @for dir in $(DIRLIST); do $(MAKE) -C $$dir $@ || exit; done
97 if [ -f HQ60308/Makefile ]; then $(MAKEPROG) -C HQ60308 $@ || exit ; else : ; fi
98 -rm -rf consumer/bin supplier/bin subplier/bin HP35732 COMMON/bin NAS_EPS_v9.7.0_CNL113729/bin HQ60308/Makefile search_paths/main/bin
99
100 distclean: clean
101 -rm -f *.out
102
103 .PHONY: all clean distclean run BuildDirs BuildConsumer BuildSupplier BuildSubplier HP35732 HQ56829 HQ56834 HQ56848 COMMON NAS HQ60308 SearchPaths
104
This page took 0.135845 seconds and 5 git commands to generate.