Commit 1b92d819 authored by BenceJanosSzabo's avatar BenceJanosSzabo
Browse files

Added tpd support for disabling OER coder (Bug 527058)



Change-Id: I9beda5cf2f0c900bded687b442787a3c71242eb3
Signed-off-by: default avatarBenceJanosSzabo <bence.janos.szabo@ericsson.com>
parent b3e99626
......@@ -256,6 +256,7 @@ struct makefile_struct {
boolean disabletext;
boolean disablexer;
boolean disablejson;
boolean disableoer;
boolean forcexerinasn;
boolean defaultasomit;
boolean gccmsgformat;
......@@ -2230,7 +2231,7 @@ static void print_makefile(struct makefile_struct *makefile)
"AR = ar\n"
"ARFLAGS = \n\n"
"# Flags for the TTCN-3 and ASN.1 compiler:\n"
"COMPILER_FLAGS =%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s\n\n"
"COMPILER_FLAGS =%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s\n\n"
"# Execution mode: (either ttcn3 or ttcn3-parallel)\n"
"TTCN3_LIB = ttcn3%s%s%s\n\n"
#ifdef LICENSE
......@@ -2258,6 +2259,7 @@ static void print_makefile(struct makefile_struct *makefile)
(makefile->disabletext ? " -x" : ""),
(makefile->disablexer ? " -X" : ""),
(makefile->disablejson ? " -j" : ""),
(makefile->disableoer ? " -O" : ""),
(makefile->forcexerinasn ? " -a" : ""),
(makefile->defaultasomit ? " -d" : ""),
(makefile->gccmsgformat ? " -g" : ""),
......@@ -4649,7 +4651,7 @@ static void generate_makefile(size_t n_arguments, char *arguments[],
struct string_list* ttcn3_prep_defines, struct string_list* ttcn3_prep_undefines, struct string_list* prep_includes,
struct string_list* prep_defines, struct string_list* prep_undefines, char *codesplittpd, boolean quietly, boolean disablesubtypecheck,
const char* cxxcompiler, const char* optlevel, const char* optflags, boolean disableber, boolean disableraw, boolean disabletext,
boolean disablexer, boolean disablejson, boolean forcexerinasn, boolean defaultasomit, boolean gccmsgformat,
boolean disablexer, boolean disablejson, boolean disableoer, boolean forcexerinasn, boolean defaultasomit, boolean gccmsgformat,
boolean linenumbersonlymsg, boolean includesourceinfo, boolean addsourcelineinfo, boolean suppresswarnings,
boolean outparamboundness, boolean omit_in_value_list, boolean warnings_for_bad_variants, boolean activate_debugger,
boolean ignore_untagged_on_top_union, boolean disable_predef_ext_folder, boolean enable_legacy_encoding,
......@@ -4694,6 +4696,7 @@ static void generate_makefile(size_t n_arguments, char *arguments[],
makefile.disabletext = disabletext;
makefile.disablexer = disablexer;
makefile.disablejson = disablejson;
makefile.disableoer = disableoer;
makefile.forcexerinasn = forcexerinasn;
makefile.defaultasomit = defaultasomit;
makefile.gccmsgformat = gccmsgformat;
......@@ -4926,7 +4929,7 @@ int main(int argc, char *argv[])
dxflag = FALSE, fxflag = FALSE, doflag = FALSE,
gfflag = FALSE, lnflag = FALSE, isflag = FALSE, asflag = FALSE,
Sflag = FALSE, Vflag = FALSE, Dflag = FALSE, Wflag = FALSE,
djflag = FALSE, Zflag = FALSE, Hflag = FALSE, Mflag = FALSE,
djflag = FALSE, doerflag = FALSE, Zflag = FALSE, Hflag = FALSE, Mflag = FALSE,
diflag = FALSE, zflag = FALSE, Eflag = FALSE, nflag = FALSE,
Nflag = FALSE, Gflag = FALSE;
boolean error_flag = FALSE;
......@@ -5367,7 +5370,7 @@ int main(int argc, char *argv[])
&gflag, &sflag, &cflag, &aflag, &pflag,
&Rflag, &lflag, &mflag, &Pflag, &Lflag, rflag, Fflag, Tflag, output_file, &abs_work_dir, sub_project_dirs, program_name, prj_graph_fp,
create_symlink_list, ttcn3_prep_includes, ttcn3_prep_defines, ttcn3_prep_undefines, prep_includes, prep_defines, prep_undefines, &csmode,
&quflag, &dsflag, &cxxcompiler, &optlevel, &optflags, &dbflag, &drflag, &dtflag, &dxflag, &djflag, &fxflag, &doflag, &gfflag, &lnflag, &isflag,
&quflag, &dsflag, &cxxcompiler, &optlevel, &optflags, &dbflag, &drflag, &dtflag, &dxflag, &djflag, &doerflag, &fxflag, &doflag, &gfflag, &lnflag, &isflag,
&asflag, &temp_wflag, &Yflag, &Mflag, &Eflag, &nflag, &Nflag, &diflag, &Gflag,
solspeclibraries, sol8speclibraries, linuxspeclibraries, freebsdspeclibraries, win32speclibraries, &ttcn3prep,
linkerlibraries, additionalObjects, linkerlibsearchpath, Vflag, Dflag, &Zflag, &Hflag,
......@@ -5416,7 +5419,7 @@ int main(int argc, char *argv[])
Rflag, lflag, mflag, Cflag, code_splitting_mode, tcov_file_name, profiled_file_list,
file_list_file_name, Lflag, Zflag, Hflag, rflag ? sub_project_dirs : NULL, ttcn3_prep_includes,
ttcn3_prep_defines, ttcn3_prep_undefines, prep_includes, prep_defines, prep_undefines, csmode, quflag, dsflag, cxxcompiler, optlevel, optflags, dbflag,
drflag, dtflag, dxflag, djflag, fxflag, doflag, gfflag, lnflag, isflag, asflag, wflag, Yflag, Mflag, Eflag, nflag, Nflag, diflag,
drflag, dtflag, dxflag, djflag, doerflag, fxflag, doflag, gfflag, lnflag, isflag, asflag, wflag, Yflag, Mflag, Eflag, nflag, Nflag, diflag,
Gflag, solspeclibraries, sol8speclibraries, linuxspeclibraries,
freebsdspeclibraries, win32speclibraries, ttcn3prep, linkerlibraries, additionalObjects,
linkerlibsearchpath, generatorCommandOutput, target_placement_list);
......
......@@ -1267,7 +1267,7 @@ static tpd_result process_tpd_internal(const char **p_tpd_name, char* tpdName, c
struct string_list* ttcn3_prep_defines, struct string_list* ttcn3_prep_undefines, struct string_list* prep_includes,
struct string_list* prep_defines, struct string_list* prep_undefines, char **p_csmode, boolean *p_quflag, boolean* p_dsflag,
char** cxxcompiler, char** optlevel, char** optflags, boolean* p_dbflag, boolean* p_drflag, boolean* p_dtflag, boolean* p_dxflag,
boolean* p_djflag, boolean* p_fxflag, boolean* p_doflag, boolean* p_gfflag, boolean* p_lnflag, boolean* p_isflag,
boolean* p_djflag, boolean* p_doerflag, boolean* p_fxflag, boolean* p_doflag, boolean* p_gfflag, boolean* p_lnflag, boolean* p_isflag,
boolean* p_asflag, boolean* p_swflag, boolean* p_Yflag, boolean* p_Mflag, boolean *p_Eflag, boolean* p_nflag, boolean* p_Nflag,
boolean* p_diflag, boolean* p_enable_legacy_encoding, struct string_list* solspeclibs, struct string_list* sol8speclibs,
struct string_list* linuxspeclibs, struct string_list* freebsdspeclibs, struct string_list* win32speclibs, char** ttcn3prep,
......@@ -1287,7 +1287,7 @@ extern "C" tpd_result process_tpd(const char **p_tpd_name, const char *actcfg,
struct string_list* ttcn3_prep_defines, struct string_list* ttcn3_prep_undefines, struct string_list* prep_includes,
struct string_list* prep_defines, struct string_list* prep_undefines, char **p_csmode, boolean *p_quflag, boolean* p_dsflag,
char** cxxcompiler, char** optlevel, char** optflags, boolean* p_dbflag, boolean* p_drflag, boolean* p_dtflag, boolean* p_dxflag,
boolean* p_djflag, boolean* p_fxflag, boolean* p_doflag, boolean* p_gfflag, boolean* p_lnflag, boolean* p_isflag,
boolean* p_djflag, boolean* p_doerflag, boolean* p_fxflag, boolean* p_doflag, boolean* p_gfflag, boolean* p_lnflag, boolean* p_isflag,
boolean* p_asflag, boolean* p_swflag, boolean* p_Yflag, boolean* p_Mflag, boolean* p_Eflag, boolean* p_nflag, boolean* p_Nflag,
boolean* p_diflag, boolean* p_enable_legacy_encoding, struct string_list* solspeclibs, struct string_list* sol8speclibs,
struct string_list* linuxspeclibs, struct string_list* freebsdspeclibs, struct string_list* win32speclibs, char** ttcn3prep,
......@@ -1317,7 +1317,7 @@ extern "C" tpd_result process_tpd(const char **p_tpd_name, const char *actcfg,
ttcn3_prep_defines, ttcn3_prep_undefines, prep_includes, prep_defines,
prep_undefines, p_csmode, p_quflag, p_dsflag, cxxcompiler,
optlevel, optflags, p_dbflag, p_drflag, p_dtflag, p_dxflag, p_djflag,
p_fxflag, p_doflag, p_gfflag, p_lnflag, p_isflag,
p_doerflag, p_fxflag, p_doflag, p_gfflag, p_lnflag, p_isflag,
p_asflag, p_swflag, p_Yflag, p_Mflag, p_Eflag, p_nflag, p_Nflag,
p_diflag, p_enable_legacy_encoding, solspeclibs, sol8speclibs,
linuxspeclibs, freebsdspeclibs, win32speclibs, ttcn3prep,
......@@ -1346,7 +1346,7 @@ extern "C" tpd_result process_tpd(const char **p_tpd_name, const char *actcfg,
ttcn3_prep_defines, ttcn3_prep_undefines, prep_includes, prep_defines,
prep_undefines, p_csmode, p_quflag, p_dsflag, cxxcompiler,
optlevel, optflags, p_dbflag, p_drflag, p_dtflag, p_dxflag, p_djflag,
p_fxflag, p_doflag, p_gfflag, p_lnflag, p_isflag,
p_doerflag, p_fxflag, p_doflag, p_gfflag, p_lnflag, p_isflag,
p_asflag, p_swflag, p_Yflag, p_Mflag, p_Eflag, p_nflag, p_Nflag,
p_diflag, p_enable_legacy_encoding, solspeclibs, sol8speclibs,
linuxspeclibs, freebsdspeclibs, win32speclibs, ttcn3prep,
......@@ -1450,7 +1450,7 @@ static tpd_result process_tpd_internal(const char **p_tpd_name, char *tpdName, c
struct string_list* ttcn3_prep_defines, struct string_list* ttcn3_prep_undefines, struct string_list* prep_includes,
struct string_list* prep_defines, struct string_list* prep_undefines, char **p_csmode, boolean *p_quflag, boolean* p_dsflag,
char** cxxcompiler, char** optlevel, char** optflags, boolean* p_dbflag, boolean* p_drflag, boolean* p_dtflag, boolean* p_dxflag,
boolean* p_djflag, boolean* p_fxflag, boolean* p_doflag, boolean* p_gfflag, boolean* p_lnflag, boolean* p_isflag,
boolean* p_djflag, boolean* p_doerflag, boolean* p_fxflag, boolean* p_doflag, boolean* p_gfflag, boolean* p_lnflag, boolean* p_isflag,
boolean* p_asflag, boolean* p_swflag, boolean* p_Yflag, boolean* p_Mflag, boolean* p_Eflag, boolean* p_nflag, boolean* p_Nflag,
boolean* p_diflag, boolean* p_enable_legacy_encoding, struct string_list* solspeclibs, struct string_list* sol8speclibs,
struct string_list* linuxspeclibs, struct string_list* freebsdspeclibs, struct string_list* win32speclibs, char** ttcn3prep,
......@@ -2043,6 +2043,7 @@ static tpd_result process_tpd_internal(const char **p_tpd_name, char *tpdName, c
xsdbool2boolean(xpathCtx, actcfg, "disableTEXT", p_dtflag);
xsdbool2boolean(xpathCtx, actcfg, "disableXER", p_dxflag);
xsdbool2boolean(xpathCtx, actcfg, "disableJSON", p_djflag);
xsdbool2boolean(xpathCtx, actcfg, "disableOER", p_doerflag);
xsdbool2boolean(xpathCtx, actcfg, "forceXERinASN.1", p_fxflag);
xsdbool2boolean(xpathCtx, actcfg, "defaultasOmit", p_doflag);
xsdbool2boolean(xpathCtx, actcfg, "gccMessageFormat", p_gfflag);
......@@ -2945,7 +2946,7 @@ static tpd_result process_tpd_internal(const char **p_tpd_name, char *tpdName, c
my_Rflag = *p_Rflag, my_Pflag = *p_Pflag, my_Zflag = *p_Zflag, my_Hflag = *p_Hflag,
my_sflag = 0, my_Lflag = 0, my_lflag = 0, my_mflag = 0,
my_quflag = 0, my_dsflag = 0, my_dbflag = 0, my_drflag = 0,
my_dtflag = 0, my_dxflag = 0, my_djflag = 0, my_fxflag = 0, my_doflag = 0,
my_dtflag = 0, my_dxflag = 0, my_djflag = 0, my_doerflag = 0, my_fxflag = 0, my_doflag = 0,
my_gfflag = 0, my_lnflag = 0, my_isflag = 0, my_asflag = 0,
my_swflag = 0, my_Yflag = 0, my_Mflag = *p_Mflag, my_Eflag = 0, my_nflag = *p_nflag,
my_Nflag = 0,
......@@ -3001,7 +3002,7 @@ static tpd_result process_tpd_internal(const char **p_tpd_name, char *tpdName, c
sub_project_dirs, program_name, prj_graph_fp, create_symlink_list, ttcn3_prep_includes, ttcn3_prep_defines, ttcn3_prep_undefines,
prep_includes, prep_defines, prep_undefines, &my_csmode,
&my_quflag, &my_dsflag, cxxcompiler, optlevel, optflags, &my_dbflag, &my_drflag,
&my_dtflag, &my_dxflag, &my_djflag, &my_fxflag, &my_doflag,
&my_dtflag, &my_dxflag, &my_djflag, &my_doerflag, &my_fxflag, &my_doflag,
&my_gfflag, &my_lnflag, &my_isflag, &my_asflag, &my_swflag, &my_Yflag, &my_Mflag, &my_Eflag, &my_nflag, &my_Nflag, &my_diflag,
&my_enable_legacy_encoding, solspeclibs, sol8speclibs, linuxspeclibs, freebsdspeclibs, win32speclibs,
ttcn3prep, linkerlibs, additionalObjects, linkerlibsearchp, Vflag, FALSE, &my_Zflag,
......
......@@ -284,7 +284,7 @@ tpd_result process_tpd(const char **p_tpd_name, const char *actcfg,
struct string_list* ttcn3_prep_defines, struct string_list* ttcn3_prep_undefines, struct string_list* prep_includes,
struct string_list* prep_defines, struct string_list* prep_undefines, char **codesplit, boolean *quietly, boolean *disablesubtypecheck,
char** cxxcompiler, char** optlevel, char** optflags, boolean *disableber, boolean *disableraw, boolean *disabletext, boolean *disablexer,
boolean *disablejson, boolean *forcexerinasn, boolean *defaultasomit, boolean *gccmessageformat,
boolean *disablejson, boolean *disableoer, boolean *forcexerinasn, boolean *defaultasomit, boolean *gccmessageformat,
boolean *linenumber, boolean *includesourceinfo, boolean *addsourcelineinfo, boolean *suppresswarnings,
boolean *outparamboundness, boolean *omit_in_value_list, boolean *warnings_for_bad_variants, boolean *activate_debugger, boolean* ignore_untagged_union,
boolean *disable_predef_exp_folder, boolean* enable_legacy_encoding, struct string_list* solspeclibs, struct string_list* sol8speclibs,
......
......@@ -118,6 +118,7 @@
<xs:element name="disableTEXT" minOccurs="0" maxOccurs="1" type="xs:boolean" />
<xs:element name="disableXER" minOccurs="0" maxOccurs="1" type="xs:boolean" />
<xs:element name="disableJSON" minOccurs="0" maxOccurs="1" type="xs:boolean" />
<xs:element name="disableOER" minOccurs="0" maxOccurs="1" type="xs:boolean" />
<xs:element name="forceXERinASN.1" minOccurs="0" maxOccurs="1" type="xs:boolean" />
<xs:element name="defaultasOmit" minOccurs="0" maxOccurs="1" type="xs:boolean" />
<xs:element name="enumHackProperty" minOccurs="0" maxOccurs="1" type="xs:boolean" /> <!-- deprecated -->
......
......@@ -32,7 +32,7 @@ MAKEPROG := ${MAKE}
DIRLIST := buildconfig_param invalid_buildconfig_param invalid_buildconfig_tpd \
HP79745 HQ56829 HQ56834 HQ56848 library HR30356 flagTest HR30365 dependency_check \
required_config required_config_v2 disablePredefinedExternalFolder \
makefileScript diff_tpd_name_error enable_legacy_encoding
makefileScript diff_tpd_name_error enable_legacy_encoding disable_oer
ifdef DYN
DIRS += required_config_v3 splitting compile_once
......
##############################################################################
# Copyright (c) 2000-2017 Ericsson Telecom AB
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
#
# Contributors:
# Szabo, Bence Janos
#
##############################################################################
TOPDIR := ../../..
include $(TOPDIR)/Makefile.regression
ifdef LCOV
COVERAGE_FLAG := -C
endif
# ${MAKEPROG} has the same content as the built-in ${MAKE},
# except the special handling of ${MAKE} does not apply.
# If we used ${MAKE} in the rules below, 'make -n' would succeed once,
# then fail on every subsequent invocation until a 'make clean' is done.
MAKEPROG := ${MAKE}
all: CheckTpdTrue CheckTpdFalse CheckTpdMissing
BuildTpdTrue:
$(TTCN3_DIR)/bin/ttcn3_makefilegen -f $(MFGEN_FLAGS) $(COVERAGE_FLAG) \
-t a.tpd
CheckTpdTrue: BuildTpdTrue
if [ ! -f "./bin/Makefile" ] \
|| [ `grep -c "COMPILER_FLAGS = -L -O" ./bin/Makefile` -ne 1 ]; \
then echo "Makefilegen enable_legacy_encoding test: Overall verdict: fail" && exit 1; fi
BuildTpdFalse:
$(TTCN3_DIR)/bin/ttcn3_makefilegen -f $(MFGEN_FLAGS) $(COVERAGE_FLAG) \
-t a.tpd -b False
CheckTpdFalse: BuildTpdFalse
if [ ! -f "./bin2/Makefile" ] \
|| [ `grep -c "COMPILER_FLAGS = -L -O" ./bin2/Makefile` -ne 0 ]; \
then echo "Makefilegen enable_legacy_encoding test: Overall verdict: fail" && exit 1; fi
BuildTpdMissing:
$(TTCN3_DIR)/bin/ttcn3_makefilegen -f $(MFGEN_FLAGS) $(COVERAGE_FLAG) \
-t a.tpd -b Missing
CheckTpdMissing: BuildTpdMissing
if [ ! -f "./bin3/Makefile" ] \
|| [ `grep -c "COMPILER_FLAGS = -L -O" ./bin3/Makefile` -ne 0 ]; \
then echo "Makefilegen enable_legacy_encoding test: Overall verdict: fail" && exit 1; fi
clean:
-rm -rf bin bin2 bin3
distclean: clean
-rm -f *.out
.PHONY: all clean distclean CheckTpdTrue CheckTpdFalse CheckTpdMissing BuildTpdTrue BuildTpdFalse BuildTpdMissing
<!--
Copyright (c) 2000-2017 Ericsson Telecom AB
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
http://www.eclipse.org/legal/epl-v10.html
Contributors:
Szabo, Bence Janos – initial implementation
-->
<TITAN_Project_File_Information version="1.0">
<ProjectName>a</ProjectName>
<ActiveConfiguration>Default</ActiveConfiguration>
<Configurations>
<Configuration name="Default">
<ProjectProperties>
<MakefileSettings>
<GNUMake>true</GNUMake>
<targetExecutable>bin</targetExecutable>
<disableOER>true</disableOER>
</MakefileSettings>
<LocalBuildSettings>
<workingDirectory>bin</workingDirectory>
</LocalBuildSettings>
</ProjectProperties>
</Configuration>
<Configuration name="False">
<ProjectProperties>
<MakefileSettings>
<GNUMake>true</GNUMake>
<targetExecutable>bin2</targetExecutable>
<disableOER>false</disableOER>
</MakefileSettings>
<LocalBuildSettings>
<workingDirectory>bin2</workingDirectory>
</LocalBuildSettings>
</ProjectProperties>
</Configuration>
<Configuration name="Missing">
<ProjectProperties>
<MakefileSettings>
<GNUMake>true</GNUMake>
<targetExecutable>bin3</targetExecutable>
</MakefileSettings>
<LocalBuildSettings>
<workingDirectory>bin3</workingDirectory>
</LocalBuildSettings>
</ProjectProperties>
</Configuration>
</Configurations>
</TITAN_Project_File_Information>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment