[GRASS-dev] Makefiles: tar failure on Solaris
glynn at gclements.plus.com
Thu Nov 16 09:13:23 EST 2006
Markus Neteler wrote:
> looking again at
> it seems that we have to remove all "tar" usage from Makefiles
> (as already discovered months ago).
> Attached my patch suggestion to lib/symbol/. However, stuff
> like this obviously remains:
> /usr/bin/install: `symbol/extra/CVS' is a directory
> How to get rid of that?
> + for file in symbol/demo/* ; do $(INSTALL_DATA) $$file $(ETC)/symbol/demo ; done
Several possible options:
1. Use a more specific pattern. E.g. if you know that all of the files
you want to install begin with a lower-case letter, use "[a-z]*"
instead of just "*", if the files all have specific extensions, use
the extension, etc.
2. Use "find | while", e.g.
find symbol/demo -type f -maxdepth 1 | \
while read file ; do $(INSTALL_DATA) "$$file" $(ETC)/symbol/demo ; done
3. Use "test -f", e.g.
for file in symbol/demo/* ; do \
[ -f "$$file" ] && $(INSTALL_DATA) $$file $(ETC)/symbol/demo ; \
4. Enumerate the individual files, e.g.
$(INSTALL_DATA) symbol/demo/muchomurka $(ETC)/symbol/demo
$(INSTALL_DATA) symbol/demo/smrk $(ETC)/symbol/demo
The last one is more work, but it avoids accidentally installing files
which shouldn't be installed, e.g. backup files created by a text
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev