[ocamlbuild] Fix a bug in stamp (add stamp in prods list).

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@8594 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
master
Nicolas Pouillard 2007-11-22 16:55:05 +00:00
parent ed05b821de
commit 2b906d0efa
1 changed files with 4 additions and 3 deletions

View File

@ -310,10 +310,11 @@ let gen_rule name ?(tags=[]) ?(prods=[]) ?(deps=[]) ?prod ?dep ?stamp ?(insert =
end xs init
in
if prods = [] && prod = None && stamp = None then raise (Exit_rule_error "Can't make a rule that produce nothing");
let stamp =
let stamp, prods =
match stamp with
| None -> None
| Some stamp -> Some (Resource.import_pattern stamp)
| None -> None, prods
| Some stamp ->
Some (Resource.import_pattern stamp), stamp :: prods
in
let prods = res_add Resource.import_pattern prods prod in
add_rule insert