[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] build: fix clean rule to cover objects in unvisited subdirs
> On Dec 1, 2015, at 6:41 AM, Jan Beulich <JBeulich@xxxxxxxx> wrote: > >>>> On 30.11.15 at 18:29, <jonathan.creekmore@xxxxxxxxx> wrote: >> --- a/xen/Rules.mk >> +++ b/xen/Rules.mk >> @@ -173,7 +173,7 @@ FORCE: >> >> .PHONY: clean >> clean:: $(addprefix _clean_, $(subdir-all)) >> - rm -f *.o *~ core $(DEPS) >> + rm -f *.o *~ core $(DEPS) $(obj-y) > > While for the moment it would do, using a minimalistic approach > like this will make us touch this again the moment we gain files in > subdirectories that can be built just optionally. At the very least > I'd therefore suggest also adding $(obj-n) and $(obj-) here. It > might even be reasonable to grab subdirectories from $(obj-...) > and add $(foreach d,$(filtered-subdirs), $(d)/*.o). Or, completely > differently, have xen/common/Makefile just have an add-on > clean:: (and require this also for future other cases like this). I am not sure why this would require us to touch it again if we gain files in subdirectories that can be built optionally. If you are running a clean using the same configuration as you built, then the âoptionalâ subdirectories would be in the subdir-all list, so that subdirectory would be processed just like it is now. Adding in obj-n and obj- seems to imply that, for the current options selected, you are concerned about object files showing up that you explicitly stated are not to be built (since that is how they show up in the obj-n list). My understanding of the build system is that the only object files built are in obj-y for each subdirectory. Initially, I tried eliminating the *.o completely and just pulling in obj-y and obj-bin-y to the clean rule to be more like the Linux kernel clean rules, but I did not immediately see how, with $FOO.init.o in the obj-bin-y list, I was seeing $FOO.o objects left behind instead. Thus, I left the *.o to clean those files up. I _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |