SetDirectory["C:\\drorbn\\AcademicPensieve\\2014-01"];
Make[targets_List, rules_List] := Module[{},
alltargets=targets;

]

Make[
{"AbstractionChallenge.png","AbstractionChallenge-1.png","AbstractionChallenge-2.png"},
{
{"AbstractionChallenge.png","AbstractionChallenge-1.png","AbstractionChallenge-2.png"} /; "nb/AbstractionChallenge.pdf" :> (
Read["!convert -density 200 -scene 1 -background white -trim nb/AbstractionChallenge.pdf AbstractionChallenge.png"];
imgs =Import /@ {"AbstractionChallenge-1.png", "AbstractionChallenge-2.png"};
DeleteFile /@ {"AbstractionChallenge.png","AbstractionChallenge-1.png", "AbstractionChallenge-2.png"};
imgs = ImageTake[#, {20, -200}]& /@ imgs;
imgs = ImageCrop /@ imgs;
imgs= RemoveAlphaChannel[#, White]& /@ imgs;
dims=Max/@Transpose[ImageDimensions/@imgs];
img=ImageAssemble[imgs/.x_Image:>ImageCrop[x,dims,Padding->Automatic]];
img= ImageCrop[img];
{
Export["AbstractionChallenge.png", img],
Export["AbstractionChallenge-1.png", imgs[[1]]],
Export["AbstractionChallenge-2.png", imgs[[2]]]
}
)
}
]

rules={
{"AbstractionChallenge.png","AbstractionChallenge-1.png","AbstractionChallenge-2.png"} /; "nb/AbstractionChallenge.pdf" :> (
Read["!convert -density 200 -scene 1 -background white -trim nb/AbstractionChallenge.pdf AbstractionChallenge.png"];
imgs =Import /@ {"AbstractionChallenge-1.png", "AbstractionChallenge-2.png"};
DeleteFile /@ {"AbstractionChallenge.png","AbstractionChallenge-1.png", "AbstractionChallenge-2.png"};
imgs = ImageTake[#, {20, -200}]& /@ imgs;
imgs = ImageCrop /@ imgs;
imgs= RemoveAlphaChannel[#, White]& /@ imgs;
dims=Max/@Transpose[ImageDimensions/@imgs];
img=ImageAssemble[imgs/.x_Image:>ImageCrop[x,dims,Padding->Automatic]];
img= ImageCrop[img];
{
Export["AbstractionChallenge.png", img],
Export["AbstractionChallenge-1.png", imgs[[1]]],
Export["AbstractionChallenge-2.png", imgs[[2]]]
}
)
}

Replace[rules, a_RuleDelayed :> List @@ a, {1}]

rules[[1]] // FullForm