The present invention provides a preparation method for analogs of cyclopamine of formula 1 that can be used to counteract the phenotypic effects of unwanted activation of a hedgehog pathway, such as resulting from hedgehog gain-of-function, Ptc loss-of-function or smoothened gain-of-function mutations. The compounds of the present invention are particularly useful in treating cancers.