[GRASS-dev] lib/symbol/Makefile $(INSTALL)?
Glynn Clements
glynn at gclements.plus.com
Thu Jun 22 07:57:45 EDT 2006
Hamish wrote:
> lib/symbol/Makefile has:
>
> symb:
> $(MKDIR) $(ETC)/symbol
> find ./symbol -type f | grep -v CVS | xargs tar chBf - |(cd $(ETC); tar xBf -)
>
>
> this seems very circuitous to me, should it be:
>
> symb:
> $(MKDIR) $(ETC)/symbol
> $(INSTALL) -m 644 symbol/* $(ETC)/symbol/
>
>
> (will "install" include directories?)
1. No, install won't copy directories.
2. All of the entities which the symbol/* pattern matches are
directories. You could use symbol/*/* instead, but that would match
symbol/CVS/* and symbol/*/CVS.
3. The install-sh script doesn't support installing multiple files in
a single command; you need to use a "for" loop or similar.
If you don't want to use "tar" (which has problems, e.g. preserving
ownership and permissions on the copied files), use:
find symbol -path '*/CVS' -prune -o -type d -print | while read dir ; do \
$(MKDIR) $(ETC)/"$$dir" ; \
done
find symbol -path '*/CVS' -prune -o -type f -print | while read file ; do \
$(INSTALL_DATA) "$$file" $(ETC)/"$$file" ; \
done
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev
mailing list