[m-rev.] diff: add more documentation in make*.m

Simon Taylor stayl at cs.mu.OZ.AU
Mon Oct 14 16:47:02 AEST 2002


Estimated hours taken: 0.25
Branches: main

compiler/make.m:
compiler/make.module_target.m:
compiler/make.program_target.m:
	Add some documentation.

Index: make.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/make.m,v
retrieving revision 1.10
diff -u -u -r1.10 make.m
--- make.m	7 Aug 2002 13:11:51 -0000	1.10
+++ make.m	14 Oct 2002 02:58:29 -0000
@@ -158,7 +158,7 @@
 	;	mih	% Declarations for hlc grades, for compiler use only.
 	.
 
-% :- type linked_target_type in mercury_compile.m.
+% :- type linked_target_type in compile_target_code.m.
 
 :- type misc_target_type
 	--->	clean
Index: make.module_target.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/make.module_target.m,v
retrieving revision 1.15
diff -u -u -r1.15 make.module_target.m
--- make.module_target.m	26 Aug 2002 04:56:58 -0000	1.15
+++ make.module_target.m	14 Oct 2002 03:56:03 -0000
@@ -3,14 +3,28 @@
 % This file may only be copied under the terms of the GNU General
 % Public License - see the file COPYING in the Mercury distribution.
 %-----------------------------------------------------------------------------%
+% File: make.module_target.m
+% Main author: stayl
+%
+% Build targets which relate to a single module (e.g. C code, object code,
+% interface files).
+%-----------------------------------------------------------------------------%
 :- module make__module_target.
 
 :- interface.
 
+	% make_module_target(Target, Success, Info0, Info).
+	%
+	% Make a target corresponding to a single module.
 :- pred make_module_target(dependency_file::in, bool::out,
 	make_info::in, make_info::out, io__state::di, io__state::uo) is det.
 
-	% For make__module_dep_file__write_module_dep_file.
+	% record_made_target(Target, Task, MakeSucceeded)
+	%
+	% Record whether building a target succeeded or not.
+	% Makes sure any timestamps for files which may have changed
+	% in building the target are recomputed next time they are needed.
+	% Exported for use by make__module_dep_file__write_module_dep_file.
 :- pred record_made_target(target_file::in, compilation_task_type::in,
 	bool::in, make_info::in, make_info::out,
 	io__state::di, io__state::uo) is det.
@@ -18,7 +32,13 @@
 :- type foreign_code_file
 	--->	foreign_code_file(
 			foreign_language :: foreign_language,
+
+				% Name of the file produced by the Mercury
+				% compiler, e.g. module_c_code.c.
 			target_file :: file_name,
+
+				% Name of the file produced by the foreign
+				% language compiler, e.g. module_c_code.o.
 			object_file :: file_name
 		).
 
Index: make.program_target.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/make.program_target.m,v
retrieving revision 1.11
diff -u -u -r1.11 make.program_target.m
--- make.program_target.m	26 Aug 2002 04:56:58 -0000	1.11
+++ make.program_target.m	14 Oct 2002 03:56:03 -0000
@@ -3,14 +3,27 @@
 % This file may only be copied under the terms of the GNU General
 % Public License - see the file COPYING in the Mercury distribution.
 %-----------------------------------------------------------------------------%
+% File: make.program_target.m
+% Main author: stayl
+%
+% Build targets which relate to whole programs or libraries.
+%-----------------------------------------------------------------------------%
 :- module make__program_target.
 
 :- interface.
 
+	% make_linked_target(Target, Success, Info0, Info).
+	%
+	% Build a library or an executable.
 :- pred make_linked_target(linked_target_file::in, bool::out,
 		make_info::in, make_info::out,
 		io__state::di, io__state::uo) is det.
 
+	% make_misc_target(Target, Success, Info0, Info).
+	%
+	% Handle miscellaneous target types, including clean-up, library
+	% installation, and building all files of a given type for all
+	% modules in the program.
 :- pred make_misc_target(pair(module_name, misc_target_type)::in,
 		bool::out, make_info::in, make_info::out,
 		io__state::di, io__state::uo) is det.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list