Subversion Repositories svn.Prod repos

Rev

Rev 36 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 36 Rev 38
1
PRG=filefind
1
PRG=filefind
2
SRC=$(PRG).c
2
SRC=$(PRG).c
3
DIR=/var/tmp
3
DIR=/var/tmp
4
.PHONY: clean test cleantest
4
.PHONY: clean test cleantest
5
 
5
 
-
 
6
all: test
-
 
7
 
6
$(PRG): checkfiles.h $(SRC)
8
$(PRG): checkfiles.h $(SRC)
7
	@echo "INFO: Building $@ from $^"
9
	@echo "INFO: Building $@ from $^"
8
	$(CC) $@.c -o $@
10
	$(CC) $@.c -o $@
9
 
11
 
10
clean:
12
clean:
11
	rm -f $(PRG)
13
	rm -f $(PRG)
12
 
14
 
13
test: $(PRG)
15
test: $(PRG)
14
	./$(PRG) $(DIR)	> result
16
	./$(PRG) $(DIR)	> result
15
	sort result	> result.sort
17
	sort result	> result.sort
16
	find $(DIR)	> result2
18
	find $(DIR)	> result2
17
	sort result2	> result2.sort
19
	sort result2	> result2.sort
18
	wc *.sort
20
	wc *.sort
19
	diff *.sort
21
	diff *.sort
20
 
22
 
21
cleantest:
23
cleantest:
22
	rm -f result	result.sort
24
	rm -f result	result.sort
23
	rm -f result2	result2.sort
25
	rm -f result2	result2.sort