Matthew Burgess wrote:
> Hi,
> 
> As mentioned at [0], we end up with a bunch of .install and 
> ..install.cmd files under /usr/src/linux and its subdirectories.  The 
> trivial command to clean these up post-install has already been added to 
> at least the ppc64 version of CLFS [1], so I see no reason why we 
> couldn't just merge that into LFS proper.
> 
> I'd prefer to not install those files in the first place, but can't 
> figure out the combination of 'find' with 'install' or 'cp' that will 
> copy the .h files retaining the correct directory structure.
> 
> `find . -type f -not -name .install -a -not -name ..install.cmd' finds 
> all of the correct files.  Trying to -exec cp or install with those 
> invariably ends up with them going straight into '/usr/include' instead 
> of '/usr/include/linux' and friends as both `install' and `cp' appear to 
> operate on the `basename' of their arguments.
> 
> I'm sure I'm missing something obvious, but can't for the life of me 
> figure it out!

The problem is that find is returning a full path.  That will copy all 
files to /usr/include.  You would have to parse each line of the find 
output to remove the path before the current directory.

We now do:

   make INSTALL_HDR_PATH=dest headers_install
   cp -rv dest/include/* /usr/include

Why not just add one line:

   make INSTALL_HDR_PATH=dest headers_install
   rm dest/include/linux/.*install*
   cp -rv dest/include/* /usr/include

That removes it before copying to /usr/include.

   -- Bruce
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to