Files
mercury/scripts
Warwick Harvey 174ea0ff5b Split the automatically generated .dep' file into two files. The new .dv'
Estimated hours taken: 15

Split the automatically generated `.dep' file into two files.  The new `.dv'
file contains all the variable definitions which used to be in the `.dep'
file, which now contains just the rules.  With mmake including the `.dv'
files before the user's Mmakefile and the `.dep' files after, this allows
user-defined Mmakefiles to refer to the automatically-generated variables
and automatically-generated rules to refer to variables defined in the
user's Mmakefile.  This was possible before to a limited extent, but in
particular dependency lists for automatically-generated rules could not
refer to user-defined variables.

Also introduced `C2INITARGS' as part of an illustration of how this change
is useful (though probably this should be a separate change).  `C2INITARGS'
should be used to specify extra files to be passed to `c2init', rather than
the currently-used `C2INITFLAGS' (which should only be used for option
flags).  The `_init.c' target should depend on these extra arguments, but it
was not possible to do this automatically prior to this change (at least,
not if one wanted to support per-program specification of `C2INITARGS').

compiler/modules.m:
	Generate the new `.dv' files and revised `.dep' files.
	Update the `change_clean' and `real_clean' targets to delete the
	`.dv' files.
	Update the `_init.c' rule to refer to `$(ALL_C2INITARGS)' as well as
	`$(ALL_C2INITFLAGS)', and add a dependency on `$(ALL_C2INITARGS)'.

scripts/Mmake.rules:
	Add appropriate rules and dependencies for `.dv' files.

scripts/Mmake.vars.in:
	Add definitions for implementing `C2INITARGS'.

scripts/mmake.in:
	Add code for using `.dv' files (while maintaining backward
	compatibility for when they don't exist).

doc/user_guide.texi:
	Document the new `.dv' files.
	Document the new `C2INITARGS' variables and the dependencies they
	imply.

../clpr/Mmakefile:
../clpr/samples/Mmakefile:
extras/complex_numbers/samples/Mmakefile:
extras/complex_numbers/tests/Mmakefile:
extras/graphics/mercury_opengl/Mmakefile:
extras/references/samples/Mmakefile:
extras/references/tests/Mmakefile:
extras/trailed_update/samples/Mmakefile:
extras/trailed_update/tests/Mmakefile:
	Update to use `C2INITARGS' instead of `C2INITFLAGS', where
	appropriate, and remove any now-obsolete `%_init.c' dependencies
	(which wouldn't have worked anyway since GNU Make ignores pattern
	dependencies with no commands).
1999-07-20 03:39:24 +00:00
..