Grub legacy did not have /etc/grub.d and 40_custom is for you to manually edit; it's contents are not generated automatically.
Grub legacy did not have /etc/grub.d and 40_custom is for you to manually edit; it's contents are not generated automatically.