  We geometrically engineer d=4 N=1 supersymmetric Yang-Mills theories by
considering M theory on various Joyce orbifolds. We argue that the
superpotential of these models is generated by fractional membrane instantons.
The relation of this superpotential to membrane anomalies is also discussed.
