Subversion Repositories svn.Prod repos

Rev

Rev 38 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 38 Rev 53
Line 1... Line 1...
1
PRG=filefind
1
PRG=filefind
2
SRC=$(PRG).c
2
SRC=$(PRG).c
3
DIR=/var/tmp
3
DIR=/var/tmp/filefind_testdata
4
.PHONY: clean test cleantest
4
.PHONY: clean test cleantest
5
 
5
 
6
all: test
6
all: test
7
 
7
 
8
$(PRG): checkfiles.h $(SRC)
8
$(PRG): checkfiles.h $(SRC)
Line 10... Line 10...
10
	$(CC) $@.c -o $@
10
	$(CC) $@.c -o $@
11
 
11
 
12
clean:
12
clean:
13
	rm -f $(PRG)
13
	rm -f $(PRG)
14
 
14
 
-
 
15
createtestdata:
-
 
16
	mkdir -p $(DIR)
-
 
17
	echo "bla" > $(DIR)/testfile
-
 
18
 
15
test: $(PRG)
19
test: createtestdata $(PRG)
16
	./$(PRG) $(DIR)	> result
20
	./$(PRG) $(DIR)	> result
17
	sort result	> result.sort
21
	sort result	> result.sort
18
	find $(DIR)	> result2
22
	find $(DIR)	> result2
19
	sort result2	> result2.sort
23
	sort result2	> result2.sort
20
	wc *.sort
24
	wc *.sort
21
	diff *.sort
25
	diff *.sort
22
 
26
 
23
cleantest:
27
cleantest:
24
	rm -f result	result.sort
28
	rm -f result	result.sort
25
	rm -f result2	result2.sort
29
	rm -f result2	result2.sort
-
 
30
	rm -rf $(DIR)