On Sat, 05 Jan 2002 09:26:49 +0100, "Giacomo A. Catenazzi" <[EMAIL PROTECTED]> wrote: >To give the multiple sources tree to gcc you use a for(i=0,i<=999,i++).
I don't see what you are worrying about. The only code that loops over the source trees is in the pre-processor code and an awk script that works out which include files to symlink to. After pp_makefile1 has worked out where all the files are, everything uses .tmp_filelist.txt and gets the exact source file. >I don't like it, and I don't like that all the tools that need multiple >kernel files sould try the loop. Wrong, they should use the data constructed by pp_makefile1 and stored in .tmp_filelist.txt. It is more expensive for tools to do their own loop, it is far faster to do something like this egrep 'defconfig|Configure.help|\.cml |\.py ' $(KBUILD_OBJTREE).tmp_filelist.txt No loop and accurate. Don't forget that some source files can be in the object tree, if they are constructed from .prepend or .append files. .tmp_filelist.txt lists only the files that will be used by the rest of kbuild and their location, one line per file saying which one to use. >My proposal is to symplify the source path handled by applications. >And the need of a simplification is obvious. Actual code is so >complex that you hard code the SRCTREE_000 in your Makefile, >instead of parsing the right source. That is for consistency. Until pp_makefile1 has been compiled, run, found all the files and built any files out of components, you do not know which files to use for the rest of the system. I could have used SRCTREE_000 for pp_makefile1 and let the rest of the pp_ programs use files from any tree but that would be inconsistent. pp_ programs are all in the base tree for a consistent view. Everything after the pp_ programs uses .tmp_filelist.txt. >Also CML2 should use the rules.cml from the various SRCTREE. CML1 and CML2 already use all the source trees. See references to cml_inputs in scripts/Makefile-2.5, all driven from .tmp_filelist.txt. The $(tmp_config_links) target creates a symlink forest which points to the correct version of each file. Both CML1 and CML2 run under that forest and just read files. It is _never_ the job of CML[12] to work out where files are, that ties the CML code to kbuild which is wrong. Both CMLs expect the driving code to provide an environment where 'source "foo"' finds the correct version of foo, without CML doing any extra work. >And it seems to me not clean to make a loop to search all >available sources also in python. Agreed, so don't do that. Use .tmp_filelist.txt and a symlink forest, like the rest of the CML code. _______________________________________________ kbuild-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/kbuild-devel
