From: Junio C Hamano Date: Sun, 31 Jan 2010 21:26:23 GMT Subject: Re: [PATCH 12/12] Teach Makefile to check header dependencies Message-ID: <7vaavuc6f4.fsf@alter.siamese.dyndns.org> In-Reply-To: <20100131211429.GA4550@progeny.tock> Jonathan Nieder writes: > Junio C Hamano wrote: > ... >> Three observations: >> >> * "make distclean" should remove $(dep_files); > > It removes $(dep_dirs) in "make clean". Do you think they should be > kept around? Or is this about when COMPUTE_HEADER_DEPENDENCIES is > turned off but .o.d files remain? Yes, the last one. After playing around, with or without COMPUTE/CHECK, and then making a final build, it would be nice if "make distclean" removed all the intermediate build products without the same special "debug build" options (and without COMPUTE, dep_dirs is empty so nothing is removed). It is also fine if "make clean" did so. >> * I wish CHECK_HEADER_DEPENDENCIES pointed out unnecessary dependencies >> hardcoded in the Makefile. > > That would not be hard to do, but wouldn’t the $(GIT_OBJS): $(LIB_H) > rule create a lot of noise? > > How about if it checks for duplicate dependencies and unnecessary > dependencies that are not in LIB_H? That would be ideal, I think.