diff --git a/compiler2/makefile.c b/compiler2/makefile.c index 380c117a338a8ba64cf35067e825ff6feb4318de..858faf548cc80f420b3be2c2a835c06586d9b80e 100644 --- a/compiler2/makefile.c +++ b/compiler2/makefile.c @@ -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); diff --git a/compiler2/xpather.cc b/compiler2/xpather.cc index 9caff3af1e157bad93865dcec3774835ad27a5f3..7c3da621dd8ff948f773792875ef5dc811dedf03 100644 --- a/compiler2/xpather.cc +++ b/compiler2/xpather.cc @@ -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, diff --git a/compiler2/xpather.h b/compiler2/xpather.h index 813636d046703ba721d4e73e7d969d38437da9fd..ac68e20bcd44f0ecd04ed5bd8f42b470c23b0e1f 100644 --- a/compiler2/xpather.h +++ b/compiler2/xpather.h @@ -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, diff --git a/etc/xsd/TPD.xsd b/etc/xsd/TPD.xsd index 545a9cd6e5c591af673e22400294c298390b1d87..7eb9ecc86953d7e06bca2884cc33f345351169df 100644 --- a/etc/xsd/TPD.xsd +++ b/etc/xsd/TPD.xsd @@ -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 --> diff --git a/regression_test/compileonly/mfgen-tpd/Makefile b/regression_test/compileonly/mfgen-tpd/Makefile index 0381b6184471de5b669cdfe3fbaf77a9cbbba125..d4bf30c5276fcae0a275608dfd01b0911740619b 100644 --- a/regression_test/compileonly/mfgen-tpd/Makefile +++ b/regression_test/compileonly/mfgen-tpd/Makefile @@ -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 diff --git a/regression_test/compileonly/mfgen-tpd/disable_oer/.gitignore b/regression_test/compileonly/mfgen-tpd/disable_oer/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..f6fc81065bc4adef1cf0824a65310d53348e079c --- /dev/null +++ b/regression_test/compileonly/mfgen-tpd/disable_oer/.gitignore @@ -0,0 +1,3 @@ +bin/ +bin2/ +bin3/ diff --git a/regression_test/compileonly/mfgen-tpd/disable_oer/Makefile b/regression_test/compileonly/mfgen-tpd/disable_oer/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..3d9ad445c6c0f7382b547bef28cf4242eee44c39 --- /dev/null +++ b/regression_test/compileonly/mfgen-tpd/disable_oer/Makefile @@ -0,0 +1,62 @@ +############################################################################## +# 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 + diff --git a/regression_test/compileonly/mfgen-tpd/disable_oer/a.tpd b/regression_test/compileonly/mfgen-tpd/disable_oer/a.tpd new file mode 100644 index 0000000000000000000000000000000000000000..a2a27de85e8aa351d369ce841edb0630262a1420 --- /dev/null +++ b/regression_test/compileonly/mfgen-tpd/disable_oer/a.tpd @@ -0,0 +1,51 @@ +<!-- + 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> diff --git a/usrguide/referenceguide.doc b/usrguide/referenceguide.doc index 7b9f2a9a019e97a2f39259d78642fed85c06b336..1ac889580bc81e207cdfaa1689fafd6d94241e90 100644 Binary files a/usrguide/referenceguide.doc and b/usrguide/referenceguide.doc differ