blob: 5925edd4f8da88dd05f8f42c49f487ff1e227a4a [file] [log] [blame]
Erik Andersenfac10d72000-02-07 05:29:42 +00001
2# GNU `ln'
3GLN = /bin/ln
4# BusyBox `ln'
5BLN = $(shell pwd)/ln
6
7.PHONY: ln_clean
8ln_clean:
9 rm -rf ln_tests ln_*.{gnu,bb} ln
10
11.PHONY: ln_tests
12ln_tests: ln_clean ln
13 @echo;
14 @echo "No output from diff means busybox ln is functioning properly.";
15
16 @echo;
17 ${BLN} || true;
18
19 @echo;
20 mkdir ln_tests;
21
22 @echo;
23 cd ln_tests; \
24 echo A file > afile; \
25 ls -l afile > ../ln_afile_newname.gnu; \
26 ${GLN} afile newname; \
27 ls -l afile newname >> ../ln_afile_newname.gnu;
28
29 @echo;
30 rm -f ln_tests/{afile,newname};
31
32 @echo;
33 cd ln_tests; \
34 echo A file > afile; \
35 ls -l afile > ../ln_afile_newname.bb; \
36 ${BLN} afile newname; \
37 ls -l afile newname >> ../ln_afile_newname.bb;
38
39 @echo;
40 diff -u ln_afile_newname.gnu ln_afile_newname.bb
41
42 @echo;
43 rm -f ln_tests/{afile,newname};
44
45 @echo;
46 cd ln_tests; \
47 echo A file > afile; \
48 ls -l afile > ../ln_s_afile_newname.gnu; \
49 ${GLN} -s afile newname; \
50 ls -l afile newname >> ../ln_s_afile_newname.gnu;
51
52 @echo;
53 rm -f ln_tests/{afile,newname};
54
55 @echo;
56 cd ln_tests; \
57 echo A file > afile; \
58 ls -l afile > ../ln_s_afile_newname.bb; \
59 ${BLN} -s afile newname; \
60 ls -l afile newname >> ../ln_s_afile_newname.bb;
61
62 @echo;
63 diff -u ln_s_afile_newname.gnu ln_s_afile_newname.bb
64
65 @echo;
66 rm -f ln_tests/{afile,newname};