On 10 Apr 2002 17:21:44 -0700, Thomas Duffy <[EMAIL PROTECTED]> wrote: >I have a meta-compiler I build w/ the kernel using a HOSTCC. This >meta-compiler parses template files and outputs c code -- this process >needs to be called from a user_command block in several directories in >the kernel. I need to pass in a -I<linux_dir> to the meta-compiler >where <linux_dir> is the path to the $(TOPDIR)/include linux headers. > >In kbuild 2.4, it was really straight forward. I would use the syntax: > >MY_INCLUDE := -I$(TOPDIR)/include > >mycode.c: mycode.template > $(TOPDIR)/path/to/meta-compiler $(MY_INCLUDE) mycode.template > >In kbuild 2.5, $(TOPDIR) is gone and AFAIK, nothing replaced it.
With separate source and object directories, there is no single TOPDIR, so it was removed. >I have >come up with a mechanism to get around this in kbuild 2.5, but it is an >ugly hack. I use the src_includelist macro, but need to strip off the >directories past the toplevel linux directory to get the right path. $(src_includelist /include). Note the leading '/' which will automatically expand into -I($KBUILD_SRCTREE_nnn)/include for all values of nnn. _______________________________________________ kbuild-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/kbuild-devel