[Zope-dev] just 2 bits on stupid_clean

Luca - De Whiskey's - De Vitis luca@debian.org
Sun, 9 Feb 2003 10:23:57 +0100


Hi,
to let the 'find' in stupid_clean remove even file names with spaces you may
replace it with:
find . -name '*.o' -o -name '*.so' -o -name '*.py[co]' -o -name 'core*' |
	while read file
		do rm -f "$file"
	done
It's not clear to me why you put that command in a separate file, but the clean
target of the main Makefile could easily look like:

BUILDED_FILE=-name '*.o' -o -name '*.so' -o -name '*.py[co]' -o -name 'core*'

clean:
	find . $(BUILDED_FILE) | \
		while read file ;\
			do rm -f "$file" ;\
		done
	rm -rf lib/python/build

I added last call to rm since no Makefile removes lib/python/build.

ciao,
-- 
Luca - De Whiskey's - De Vitis              | Elegant or ugly code as well
aliases: Luca ^De [A-Z][-A-Za-z]*[iy]'?s$   | as fine or rude sentences have
Infinite loop: see `Loop, infinite'.        | something in common: they
Loop, infinite: see `Infinite loop'.        | don't depend on the language.