Alle 11:45, giovedì 25 dicembre 2003, Christoph Hellwig ha scritto: > Please don't use shouting names..
Ok. Then user-objs; or if this could be used somewhere else, uml-user-objs. > > The list always contains, in the arch/um subfolders, all objects whose > > name matches %_user.o(as it has always been for UML). > > This doesn't sound like a good heuristic, imagine a driver using e.g. > foo_user.c for the chardev user interface. UML 2.4 has been written with this in mind. If an UML file is named *_user.c, that already means that it needs special treatment. Everywhere inside arch/um. So the heuristic does work, for UML (and only for UML). Really. > In general I'd suggest adding > parallel infrastructure for user-$(CONFIG_FOO) variables in addition to > the current obj-* and host-*. The only problem you could get with that > is that you need to take special care of the link order. In general you are right. But the current content of the average UML Makefile is like this: <setting obj-y and obj-m the normal way> <1:> USER_SINGLE_OBJS = $(foreach f,$(patsubst %.o,%,$(obj-y) $(obj-m)),$($(f)-objs)) <2:> USER_OBJS = $(filter %_user.o,$(obj-y) $(obj-m) $(USER_SINGLE_OBJS)) fd.o \ null.o pty.o tty.o xterm.o <3:> $(USER_OBJS) : %.o: %.c $(CC) $(CFLAGS_$@) $(USER_CFLAGS) -c -o $@ $< And this content is repeated for each single Makefile. That becomes, with the API I suggest: <setting obj-y and obj-m as always> user-objs += fd.o null.o pty.o tty.o xterm.o But if you don't like that heuristic, this means that <1:> and <2:> remain repeated in each Makefile, while only <3:> can be removed. -- cat <<EOSIGN Paolo Giarrusso, aka Blaisorblade Kernel 2.4.21/2.6.0-test on an i686; Linux registered user n. 292729 EOSIGN ------------------------------------------------------- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id78&alloc_id371&op=click _______________________________________________ kbuild-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/kbuild-devel