corrected makefile -w behaviour (now overrides the suppressWarnings from tpd-s)
authorebensza <bence.janos.szabo@ericsson.com>
Fri, 1 Jul 2016 08:26:53 +0000 (10:26 +0200)
committerebensza <bence.janos.szabo@ericsson.com>
Fri, 1 Jul 2016 08:26:53 +0000 (10:26 +0200)
Signed-off-by: ebensza <bence.janos.szabo@ericsson.com>
compiler2/makefile.c
usrguide/referenceguide.doc

index e141b4dece065857d35c9fbdbfeb3f1abd16ea43..7bc8854ecda50997120e746cef17bbbd6168a7eb 100644 (file)
@@ -4052,7 +4052,7 @@ static void usage(void)
     "  -p:             generate Makefile with TTCN-3 preprocessing\n"
     "  -R:             use function test runtime (TITAN_RUNTIME_2)\n"
     "  -s:             generate Makefile for single mode\n"
-     " -S:             suppress makefilegen warnings\n"
+     -S:             suppress makefilegen warnings\n"
     "  -U none|type:   split generated code\n"
     "  -v:             show version\n"
     "  -w:             suppress warnings generated by TITAN\n"
@@ -4070,7 +4070,7 @@ static void usage(void)
     "  -X:             generate XML file that describes the TPD hierarchy, use with -r\n"
     "  -W:             prefix working directories with project name\n"
     "  -Z:             recursive Makefile generation from TPD using object files and dynamic libraries too\n"
-    "  -H:             hierachical Makefile generation from TPD use with -Z\n"
+    "  -H:             hierarchical Makefile generation from TPD use with -Z\n"
     , program_name, program_name);
 }
 
@@ -4383,11 +4383,6 @@ int main(int argc, char *argv[])
     ERROR("Using the '-I' option requires use of the '-t' option.");
     error_flag = TRUE;
   }
-
-  if (wflag && tflag) {
-    ERROR("The usage of '-w' option is not allowed when the '-t' option is present.");
-    error_flag = TRUE;
-  }
   
   for (size_t i = 0; i < n_search_paths; i++) {
     boolean is_abs_path = 
@@ -4514,15 +4509,24 @@ int main(int argc, char *argv[])
     required_configs->str2 = NULL;
     required_configs->next = NULL;
 
+    // This temp flag is used to get the value of suppressWarnings from the TPD
+    // while the wflag still holds the value of the command line parameter -w
+    boolean temp_wflag = FALSE;
+
     tpd_processed = process_tpd(tpd_file_name, tpd_build_config, file_list_path,
       &argc, &argv, &optind, &ets_name, &project_name,
       &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, &csflag, 
       &quflag, &dsflag, &cxxcompiler, &optlevel, &optflags, &dbflag, &drflag, &dtflag, &dxflag, &djflag, &fxflag, &doflag, &gfflag, &lnflag, &isflag,
-      &asflag, &wflag, &Yflag, &Mflag, &Eflag, &nflag, &diflag, solspeclibraries, sol8speclibraries, linuxspeclibraries, freebsdspeclibraries, win32speclibraries, &ttcn3prep,
+      &asflag, &temp_wflag, &Yflag, &Mflag, &Eflag, &nflag, &diflag, solspeclibraries, sol8speclibraries, linuxspeclibraries, freebsdspeclibraries, win32speclibraries, &ttcn3prep,
       linkerlibraries, additionalObjects, linkerlibsearchpath, Vflag, Dflag, &Zflag, &Hflag,
       &generatorCommandOutput, target_placement_list, Wflag, run_command_list, required_configs, &profiled_file_list, search_paths, n_search_paths);
+    
+    // wflag overrides temp_wflag
+    if (!wflag) {
+      wflag = temp_wflag;
+    }
 
     Free(abs_work_dir);
     if (prj_graph_fp) {
index 846f9171fbe3bbf25e8c2af357f403e763b03995..f22384f3ec852bfa5c4a7cbb9fbe18ed0ec96ab1 100644 (file)
Binary files a/usrguide/referenceguide.doc and b/usrguide/referenceguide.doc differ
This page took 0.039147 seconds and 5 git commands to generate.