Sync with 5.4.0
[deliverable/titan.core.git] / regression_test / logFiles / Makefile
CommitLineData
970ed795 1###############################################################################
3abe9331 2# Copyright (c) 2000-2015 Ericsson Telecom AB
970ed795
EL
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###############################################################################
8TOPDIR := ..
9include $(TOPDIR)/Makefile.regression
10
11.SUFFIXES: .ttcn .hh
12.PHONY: all clean dep run
13
14# Remove any swtches incorporated into the name of the compiler
15# to avoid "duplicate switch" errors.
16TTCN3_COMPILER := $(filter %compiler, $(TTCN3_COMPILER))
17
18ifndef COMPILER_FLAGS
19COMPILER_FLAGS :=
20endif
21
22# There is a testcase which requires -L (location information)
23COMPILER_FLAGS += -L -g $(RT2_FLAG)
24
25TTCN3_LIB = ttcn3$(RT2_SUFFIX)-parallel$(DYNAMIC_SUFFIX)
26
27TTCN3_MODULES = LogFiles.ttcn CommonStuff.ttcn TitanLogTest.ttcn
28
29GENERATED_SOURCES = $(TTCN3_MODULES:.ttcn=.cc)
30GENERATED_HEADERS = $(GENERATED_SOURCES:.cc=.hh)
31
32ifdef CODE_SPLIT
33GENERATED_SOURCES := $(foreach file, $(GENERATED_SOURCES:.cc=), $(addprefix $(file), .cc _seq.cc _set.cc _seqof.cc _setof.cc _union.cc))
34endif
35
36USER_SOURCES := $(ABS_SRC)/extfunc.cc
37
38OBJECTS = $(GENERATED_SOURCES:.cc=.o) $(USER_SOURCES:.cc=.o)
39
40TARGET = LogFiles$(EXESUFFIX)
41
42all: $(TARGET)
43
44$(GENERATED_SOURCES) $(GENERATED_HEADERS): compile
45 @if [ ! -f $@ ]; then $(RM) compile; $(MAKE) compile; fi
46
47ifeq ($(findstring dynamic,$(TTCN3_LIB)),)
48# not dynamic
49CORELIB_BINARY := $(TTCN3_DIR)/lib/lib$(TTCN3_LIB).a
50else
51CORELIB_BINARY := $(TTCN3_DIR)/lib/lib$(TTCN3_LIB).so
52endif
53
54
55
56$(TARGET): $(GENERATED_SOURCES) $(USER_SOURCES) $(CORELIB_BINARY)
57 $(CXX) $(CPPFLAGS) $(CXXFLAGS) -g $(LDFLAGS) -o $@ $(GENERATED_SOURCES) $(USER_SOURCES) -L$(TTCN3_DIR)/lib -l$(TTCN3_LIB) -L$(OPENSSL_DIR)/lib -lcrypto $($(PLATFORM)_LIBS)
58
59compile: $(TTCN3_MODULES)
60 $(TTCN3_COMPILER) $(COMPILER_FLAGS) $^ - $?
61 touch $@
62
63clean distclean:
64 -rm -f $(TARGET) $(OBJECTS) \
65 compile $(GENERATED_HEADERS) $(GENERATED_SOURCES) \
66 *.log baseline_logs/*.lo2 Makefile.bak
67 rm -rf new_logs
68
69dep: $(GENERATED_SOURCES)
70 makedepend $(CPPFLAGS) $(GENERATED_SOURCES) extfunc.cc
71
72run: $(TARGET)
3abe9331 73 ./logfilter.sh
970ed795
EL
74 $(TTCN3_DIR)/bin/ttcn3_start $(TARGET) LogFiles.cfg
75 $(TTCN3_DIR)/bin/ttcn3_start $(TARGET) LogFiles2.cfg
76 $(TTCN3_DIR)/bin/ttcn3_start $(TARGET) LogFilesProc.cfg
77 $(TTCN3_DIR)/bin/ttcn3_start $(TARGET) TitanLogTest.cfg
78 for l in *MTC.log *mtc.log; do grep 'pass (100\.00 %)' >/dev/null $$l || echo "!!!! $$l not 100% !!!!"; done
79 # Bangjohansen produces incomplete xml logs sometimes; delete them
80 # Check that $j exists: unmatched wildcards are returned as-is
81 if xmllint --version 2>/dev/null; then \
82 for j in junit-xml*.log; do \
83 if [ -f $$j ]; then \
84 xmllint --noout $$j || sh -xc "rm $$j"; \
85 else :; fi \
86 done; \
87 else :; fi
88#./diffLogs new_logs/ baseline_logs/
89
90#LogFiles.o: LogFiles.hh
91#extfunc.o: LogFiles.hh
92
93.NOTPARALLEL:
94
95#ifdef SRCDIR
96#$(foreach src, $(USER_SOURCES), $(eval vpath $(src) $(ABS_SRC)))
97#endif
98# vpath doesn't work with direct cc -> exe
This page took 0.029295 seconds and 5 git commands to generate.