[m-rev.] diff: fix problems with --track-flags

Peter Wang novalazy at gmail.com
Thu May 21 14:42:55 AEST 2009


Branches: main

Fix problems with `--track-flags' feature.

compiler/file_names.m:
	Make `.track_flags' files grade-dependent, otherwise you get
	unnecessary rebuilds when changing grades with
	"--use-grade-subdirs --track-flags".

compiler/options.m:
doc/user_guide.texi:
	Don't track build system options, otherwise you get unnecessary
	rebuilds just by changing things like the `--jobs <n>' value.

diff --git a/compiler/file_names.m b/compiler/file_names.m
index c0ef87b..9850a8a 100644
--- a/compiler/file_names.m
+++ b/compiler/file_names.m
@@ -525,6 +525,7 @@ file_is_arch_or_grade_dependent_2(".analysis").
 file_is_arch_or_grade_dependent_2(".analysis_date").
 file_is_arch_or_grade_dependent_2(".analysis_status").
 file_is_arch_or_grade_dependent_2(".imdg").
+file_is_arch_or_grade_dependent_2(".track_flags").
 file_is_arch_or_grade_dependent_2(".init").
 file_is_arch_or_grade_dependent_2(".request").
 file_is_arch_or_grade_dependent_2(".mih").
diff --git a/compiler/options.m b/compiler/options.m
index 79663f2..d745a55 100644
--- a/compiler/options.m
+++ b/compiler/options.m
@@ -3190,10 +3190,12 @@ inconsequential_options(InconsequentialOptions) :-
     option_defaults_2(warning_option, WarningOptions),
     option_defaults_2(verbosity_option, VerbosityOptions),
     option_defaults_2(internal_use_option, InternalUseOptions),
+    option_defaults_2(build_system_option, BuildSystemOptions),
     assoc_list.keys(WarningOptions, WarningKeys),
     assoc_list.keys(VerbosityOptions, VerbosityKeys),
     assoc_list.keys(InternalUseOptions, InternalUseKeys),
-    Keys = WarningKeys ++ VerbosityKeys ++ InternalUseKeys,
+    assoc_list.keys(BuildSystemOptions, BuildSystemKeys),
+    Keys = WarningKeys ++ VerbosityKeys ++ InternalUseKeys ++ BuildSystemKeys,
     InconsequentialOptions = set.from_list(Keys).

 %-----------------------------------------------------------------------------%
@@ -5314,8 +5316,8 @@ options_help_build_system -->
         "\tWith `--make', keep track of the options used when compiling",
         "\teach module.  If an option for a module is added or removed,",
         "\t`mmc --make' will then know to recompile the module even if the",
-        "\ttimestamp on the file itself has not changed.  Warning and",
-        "\tverbosity options are not tracked.",
+        "\ttimestamp on the file itself has not changed.  Warning,",
+        "\tverbosity and build system options are not tracked.",

         "--pre-link-command <command>",
         "\tSpecify a command to run before linking with `mmc --make'.",
diff --git a/doc/user_guide.texi b/doc/user_guide.texi
index cd042ed..ae0fc76 100644
--- a/doc/user_guide.texi
+++ b/doc/user_guide.texi
@@ -8826,8 +8826,8 @@ the @samp{-P} option in the
@samp{MERCURY_OPTIONS} environment variable
 With @samp{--make}, keep track of the options used when compiling
 each module.  If an option for a module is added or removed,
 @samp{mmc --make} will then know to recompile the module even if the
-timestamp on the file itself has not changed.  Warning and
-verbosity options are not tracked.
+timestamp on the file itself has not changed.  Warning,
+verbosity and build system options are not tracked.

 @sp 1
 @item --pre-link-command @var{command}
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list