On Wed, Sep 09, 2009 at 10:32:53AM -0600, Gary Thomas wrote:
> Has anyone come up with a macro or recipe to install a
> whole [sub]directory into a target package?  Currently,
> I'm doing something like this (but it's not really pretty):
>
>       files=$$(cd $(PKG_DIR)/extra_dir && find . -type f | sed "s/^\.//"); \
>       for i in $$files; do \
>               access=$$(stat -c "%a" $(PKG_DIR)/extra_dir/$$i); \
>               $(call install_copy, xxx, 0, 0, $$access, 
> $(PKG_DIR)/extra_dir/$$i, /usr/$$i, n); \
>       done
>       files=$$(cd $(PKG_DIR)/extra_dir && find . -type l | sed "s/^\.//"); \
>       for i in $$files; do \
>               link=$$(readlink $(PKG_DIR)/extra_dir/$$i); \
>               $(call install_link, xxx, $$link, /usr/$$i); \
>       done
>
> Any ideas?

That doesn't look too bad to me - you could probably wrap that into a
macro (i.e. install_dir).

You should take care of:

- empty directories
- ignoring .svn directories
- ignoring .git directories

rsc
-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

--
ptxdist mailing list
[email protected]

Reply via email to