aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorherbelin2006-02-06 08:48:37 +0000
committerherbelin2006-02-06 08:48:37 +0000
commit8432a805c3c9cac29112b0cf92cd273b7172e460 (patch)
tree267bd5720f904d38706efd4225a9fa01aacc6521
parentc542cd991951cf0b6941732d0615c757e7b2743f (diff)
Ajout de l'essai d'effacement des noms des cibles custom par la cible clean
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@7994 85f007b7-540e-0410-9357-904b9bb8a0f7
-rw-r--r--tools/coq_makefile.ml423
1 files changed, 13 insertions, 10 deletions
diff --git a/tools/coq_makefile.ml4 b/tools/coq_makefile.ml4
index 9951e6036a..f24813d3f5 100644
--- a/tools/coq_makefile.ml4
+++ b/tools/coq_makefile.ml4
@@ -79,7 +79,7 @@ coq_makefile [subdirectory] .... [file.v] ... [file.ml] ... [-custom
[--help]: equivalent to [-h]\n";
exit 1
-let standard sds =
+let standard sds sps =
print "byte:\n";
print "\t$(MAKE) all \"OPT=\"\n\n";
print "opt:\n";
@@ -118,6 +118,9 @@ let standard sds =
print "\trm -f *.cmo *.cmi *.cmx *.o $(VOFILES) $(VIFILES) $(GFILES) *~\n";
print "\trm -f all.ps all-gal.ps $(HTMLFILES) $(GHTMLFILES)\n";
List.iter
+ (fun (file,_,_) -> print "\t- rm -f "; print file; print "\n")
+ sps;
+ List.iter
(fun x -> print "\t(cd "; print x; print " ; $(MAKE) clean)\n")
sds;
print "\n";
@@ -224,17 +227,16 @@ let include_dirs l =
print "OCAMLLIBS="; print_list "\\\n " i_ocaml; print "\n";
print "COQLIBS="; print_list "\\\n " i_coq; print "\n\n"
-let special l =
+let rec special = function
+ | [] -> []
+ | Special (file,deps,com) :: r -> (file,deps,com) :: (special r)
+ | _ :: r -> special r
+
+let custom sps =
let pr_sp (file,dependencies,com) =
print file; print ": "; print dependencies; print "\n";
print "\t"; print com; print "\n\n"
in
- let rec sp_aux = function
- | [] -> []
- | Special (file,deps,com) :: r -> (file,deps,com) :: (sp_aux r)
- | _ :: r -> sp_aux r
- in
- let sps = sp_aux l in
if sps <> [] then section "Custom targets.";
List.iter pr_sp sps
@@ -434,10 +436,11 @@ let do_makefile args =
variables l;
include_dirs l;
all_target l;
- special l;
+ let sps = special l in
+ custom sps;
let sds = subdirs l in
implicit ();
- standard sds;
+ standard sds sps;
(* TEST directories_deps l; *)
warning ();
if not (!output_channel == stdout) then close_out !output_channel;