Ignore grep unit test
[product/upstream/grep.git] / Makefile.cvs
1 VERSION = $(shell cat configure.ac.in |grep AC_INIT |sed -e 's/[^,]*, *//;s/,.*//' )
2 SRCDIR = $(shell pwd)
3
4 all: autogen.sh configure.ac.in
5         ./autogen.sh
6
7 grep-$(VERSION).tar:
8         [ -e configure.ac.in ] || ( echo Must be run from grep source dir ; exit 1 )
9         rm -rf /tmp/grep-$(VERSION) && cp -aR $(SRCDIR) /tmp/grep-$(VERSION) && cd /tmp/grep-$(VERSION) && make -f Makefile.cvs cvs-clean && make -f Makefile.cvs && rm -rf autom4te.cache && (find . -type d -name CVS |xargs rm -rf) && cd .. && tar chf $(SRCDIR)/grep-$(VERSION).tar grep-$(VERSION)
10
11 grep-$(VERSION).tar.lz: grep-$(VERSION).tar
12         lzip -9ef grep-$(VERSION).tar
13
14 grep-$(VERSION).tar.bz2: grep-$(VERSION).tar
15         bzip2 -9f grep-$(VERSION).tar
16
17 grep-$(VERSION).tar.gz: grep-$(VERSION).tar
18         gzip -9f grep-$(VERSION).tar
19
20 rpm: grep-$(VERSION).tar.bz2
21         rpm -ts --define '_srcrpmdir $(SRCDIR)' grep-$(VERSION).tar.bz2
22
23 # make cvs-clean blatantly stolen from KDE CVS ;)
24 cvs-clean:
25         @if test ! -d CVS; then \
26           echo "You don't have a toplevel CVS directory."; \
27           echo "You most certainly didn't use cvs to get these sources."; \
28           echo "But this function depends on cvs's information."; \
29           exit 1 ;\
30         fi;\
31         pwd=`pwd` ;\
32         dirs=`find . -type d | grep -v CVS | sed -e "s#^./##"` ;\
33         for i in $$dirs; do \
34           if test ! -d "$$pwd/$$i/CVS"; then \
35             echo "D $$i" ;\
36             rm -rf "$$pwd/$$i"; \
37             continue; \
38           fi ;\
39           cd $$pwd/$$i ;\
40           for f in * .*; do \
41             if test ! -d "$$f"; then \
42               if grep "^/$$f/" CVS/Entries > /dev/null; then \
43                 a="b"; \
44               else \
45                 echo "F $$i/$$f"; \
46                 rm -f "$$pwd/$$i/$$f"; \
47               fi; \
48             fi ; \
49           done; \
50         done