GO:0022612: gland morphogenesis
The process in which the anatomical structures of a gland are generated and organized.