IMHO ancor got one of the major factors right, as soon as Hitler set up Vichy France and preserved the French North African colonies any thoughts of Franco's Spain allying with Germany went out the window. Franco needed at least Morrocco & French West Africa (including Dakar) plus Gibraltar. Hitler couldn't promise the same territory to both Vichy France and Spain (well not and get away with it by 1940).