From 1038bdc76c71b53d188f14af22d0998f6549574a Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Sat, 29 Aug 2009 13:15:58 +0000 Subject: [PATCH] Preserve the order of sources when calling generator [SVN r55864] --- v2/build/targets.jam | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/v2/build/targets.jam b/v2/build/targets.jam index f924a20e6..b6ccc0131 100644 --- a/v2/build/targets.jam +++ b/v2/build/targets.jam @@ -1245,7 +1245,10 @@ class basic-target : abstract-target source-targets += $(extra:G=) ; # We might get duplicate sources, for example if we link to two # libraries having the same usage requirement. - source-targets = [ sequence.unique $(source-targets) ] ; + # Use stable sort, since for some targets the order is + # important. E.g. RUN_PY target need python source to come + # first. + source-targets = [ sequence.unique $(source-targets) : stable ] ; local result = [ construct $(self.name) : $(source-targets) : $(rproperties) ] ;