=== modified file 'dcg_stuff.pl' --- dcg_stuff.pl 2012-06-03 13:59:12 +0000 +++ dcg_stuff.pl 2012-05-17 01:48:06 +0000 @@ -3,7 +3,6 @@ :- module(dcg_stuff, [ op(800,xfy,(#:)), (#:)/4, op(800,xfy,(#+)), (#+)/4, - op(800,xfy,(#<<)), (#<<)/4, op(800,xfy,(#=)), (#=)/4, op(800,xfy,(#?)), (#?)/4, phrase_assoc/2 @@ -21,17 +20,11 @@ get_assoc(Key,AssocIn,ValIn,AssocOut,ValOut), phrase(DCG_Goal,ValIn,ValOut). -% Appends to a d-list which is a value of a key +% Appends to a list which is a value of a key % key #+ [foo, bar] #+(Key,List,AssocIn,AssocOut) :- - get_assoc(Key,AssocIn,ListIn-TailIn,AssocOut,ListOut-TailOut), - append(List, TailOut, TailIn), - ListIn = ListOut. - -#<<(Key,Item,AssocIn,AssocOut) :- - get_assoc(Key,AssocIn,ListIn-TailIn,AssocOut,ListOut-TailOut), - ListIn = ListOut, - TailIn = [Item|TailOut]. + get_assoc(Key,AssocIn,ValIn,AssocOut,ValOut), + append(List,ValIn,ValOut). % Assign value to a key % key #= Value === modified file 'generate_targets' --- generate_targets 2012-06-03 13:59:12 +0000 +++ generate_targets 2011-11-26 16:18:19 +0000 @@ -3,6 +3,6 @@ mkdir -p ${0:h}/targets for target in $( ${0:h}/stagebuilder.pl ) do - ${0:h}/stagebuilder.pl $target >${0:h}/targets/${target} + ${0:h}/stagebuilder.pl $target $(realpath ${0:h})/build/$target >${0:h}/targets/${target} chmod +x ${0:h}/targets/${target} done === modified file 'stagebuilder.pl' --- stagebuilder.pl 2012-06-03 13:59:12 +0000 +++ stagebuilder.pl 2012-05-19 09:32:01 +0000 @@ -780,9 +780,9 @@ % non-dcg variant of target, sets up parameters and calls dcg variant target(Name, Commands) :- - list_to_assoc([ commands-(Commands-Commands) ], AssocIn), + list_to_assoc([ commands-[] ], AssocIn), phrase(target(Name), AssocIn, AssocOut), - get_assoc(commands, AssocOut, Commands-[]). + get_assoc(commands, AssocOut, Commands). debug_target(Name) :- target(Name, C),