1 | # Testsuite makefile for GNU sed
|
---|
2 |
|
---|
3 | SHELL = /bin/sh
|
---|
4 |
|
---|
5 | # These are only fallback values. They are usually overridden by runtest.
|
---|
6 | srcdir = .
|
---|
7 | SED = ../sed/sed
|
---|
8 | SEDENV = LC_ALL=C $(TIME)
|
---|
9 |
|
---|
10 | #TIME=time
|
---|
11 | CMP=cmp
|
---|
12 | RM=rm -f
|
---|
13 |
|
---|
14 | enable sep inclib 8bit 8to7 newjis xabcx dollar noeol bkslashes \
|
---|
15 | numsub head madding mac-mf empty xbxcx xbxcx3 recall recall2 xemacs \
|
---|
16 | appquit fasts uniq manis linecnt khadafy allsub flipcase space modulo \
|
---|
17 | y-bracket y-newline::
|
---|
18 | $(SEDENV) $(SED) -f $(srcdir)/$@.sed \
|
---|
19 | < $(srcdir)/$@.inp > $@.out
|
---|
20 | $(CMP) $(srcdir)/$@.good $@.out
|
---|
21 | @$(RM) $@.out
|
---|
22 |
|
---|
23 | 0range::
|
---|
24 | $(SEDENV) $(SED) -s -f $(srcdir)/$@.sed < $(srcdir)/$@.inp > $@.out
|
---|
25 | $(CMP) $(srcdir)/$@.good $@.out
|
---|
26 | @$(RM) $@.out
|
---|
27 |
|
---|
28 | # This checks for a bug in 3.02 and 3.02.80
|
---|
29 | stdin::
|
---|
30 | ($(SEDENV) $(SED) d; $(SEDENV) $(SED) G) < $(srcdir)/numsub.inp > $@.1out
|
---|
31 | $(SEDENV) cat $(srcdir)/numsub.inp | ($(SEDENV) $(SED) d; $(SEDENV) $(SED) G) > $@.2out
|
---|
32 | $(CMP) $@.1out $@.2out
|
---|
33 | @$(RM) $@.1out $@.2out
|
---|
34 |
|
---|
35 | cv-vars classes middle dc distrib factor numsub2 numsub3 numsub4 numsub5 \
|
---|
36 | insens::
|
---|
37 | $(SEDENV) $(SED) -n -f $(srcdir)/$@.sed < $(srcdir)/$@.inp > $@.out
|
---|
38 | $(CMP) $(srcdir)/$@.good $@.out
|
---|
39 | @$(RM) $@.out
|
---|
40 |
|
---|
41 | noeolw::
|
---|
42 | $(SEDENV) $(SED) -n -f $(srcdir)/$@.sed \
|
---|
43 | $(srcdir)/noeol.inp $(srcdir)/noeol.inp > $@.out
|
---|
44 | $(CMP) $(srcdir)/$@.good $@.out
|
---|
45 | $(CMP) $(srcdir)/$@.1good $@.1out
|
---|
46 | $(CMP) $(srcdir)/$@.2good $@.2out
|
---|
47 | @$(RM) $@.1out $@.2out $@.out
|
---|
48 |
|
---|
49 | subwrite::
|
---|
50 | $(SEDENV) $(SED) -f $(srcdir)/$@.sed < $(srcdir)/$@.inp > $@.1out
|
---|
51 | $(CMP) $(srcdir)/subwrt1.good $@.1out
|
---|
52 | $(CMP) $(srcdir)/subwrt2.good $@.wout
|
---|
53 | @$(RM) $@.1out $@.wout
|
---|
54 |
|
---|
55 | bsd::
|
---|
56 | $(SEDENV) sh $(srcdir)/$@.sh '$(SED)' bsd.out
|
---|
57 | $(CMP) $(srcdir)/$@.good $@.out
|
---|
58 | @$(RM) $@.out
|
---|
59 |
|
---|
60 | writeout::
|
---|
61 | $(SEDENV) $(SED) -f $(srcdir)/$@.sed < $(srcdir)/$@.inp >$@.1out
|
---|
62 | $(CMP) $(srcdir)/wrtout1.good $@.1out
|
---|
63 | $(CMP) $(srcdir)/wrtout2.good $@.wout
|
---|
64 | @$(RM) $@.1out $@.wout
|
---|
65 |
|
---|
66 | readin.in2: $(srcdir)/readin.in2
|
---|
67 | cat $(srcdir)/readin.in2 > $@
|
---|
68 |
|
---|
69 | readin:: readin.in2
|
---|
70 | $(SEDENV) $(SED) -f $(srcdir)/$@.sed < $(srcdir)/$@.inp >$@.out
|
---|
71 | $(CMP) $(srcdir)/$@.good $@.out
|
---|
72 | @$(RM) $@.out
|
---|
73 |
|
---|
74 | eval.in2: $(srcdir)/eval.inp
|
---|
75 | cat $(srcdir)/eval.inp > $@
|
---|
76 |
|
---|
77 | eval:: eval.in2
|
---|
78 | $(SEDENV) $(SED) -f $(srcdir)/$@.sed < $(srcdir)/$@.inp > $@.out
|
---|
79 | $(CMP) $(srcdir)/$@.good $@.out
|
---|
80 | @$(RM) $@.out
|
---|
81 |
|
---|
82 | binary binary2 binary3::
|
---|
83 | $(SEDENV) $(SED) -n -f $(srcdir)/$@.sed < $(srcdir)/binary.inp >$@.out
|
---|
84 | $(CMP) $(srcdir)/binary.good $@.out
|
---|
85 | @$(RM) $@.out
|
---|
86 |
|
---|
87 | #
|
---|
88 | # cmdlines targets
|
---|
89 | #
|
---|
90 |
|
---|
91 | help::
|
---|
92 | $(SED) --help | $(SED) '1s/ [^ ]* / sed /' > $@.1out
|
---|
93 | $(SED) 2>&1 | $(SED) '1s/ [^ ]* / sed /' > $@.2out || :
|
---|
94 | $(CMP) $@.1out $@.2out
|
---|
95 | @$(RM) $@.1out $@.2out
|
---|
96 |
|
---|
97 | version::
|
---|
98 | $(SED) 's^@'VERSION'@^$(VERSION)^' $(srcdir)/version.gin > $@.good
|
---|
99 | $(SEDENV) $(SED) --version > $@.out 2>&1
|
---|
100 | $(CMP) $@.good $@.out
|
---|
101 | @$(RM) $@.good $@.out
|
---|
102 |
|
---|
103 | file::
|
---|
104 | $(SEDENV) $(SED) --file=$(srcdir)/newjis.sed \
|
---|
105 | < $(srcdir)/newjis.inp > $@.out
|
---|
106 | $(CMP) $(srcdir)/newjis.good $@.out
|
---|
107 | @$(RM) $@.out
|
---|
108 |
|
---|
109 | quiet::
|
---|
110 | $(SEDENV) $(SED) --quiet -f $(srcdir)/cv-vars.sed \
|
---|
111 | < $(srcdir)/cv-vars.inp > $@.out
|
---|
112 | $(CMP) $(srcdir)/cv-vars.good $@.out
|
---|
113 | @$(RM) $@.out
|
---|
114 |
|
---|
115 | # The following target is not used in super sed builds (only GNU sed)
|
---|
116 |
|
---|
117 | bug-regex7$(EXEEXT) bug-regex8$(EXEEXT) bug-regex9$(EXEEXT) \
|
---|
118 | bug-regex10$(EXEEXT) bug-regex11$(EXEEXT) bug-regex12$(EXEEXT) \
|
---|
119 | bug-regex13$(EXEEXT) bug-regex14$(EXEEXT) bug-regex15$(EXEEXT) bug-regex16$(EXEEXT) \
|
---|
120 | bug-regex21$(EXEEXT) runtests$(EXEEXT) runptests$(EXEEXT)::
|
---|
121 | echo "$(SEDENV) ./$@ > `echo $@ | $(SED) s/$(EXEEXT)$$/.log/`"
|
---|
122 | @$(SEDENV) ./$@ > `echo $@ | $(SED) s/$(EXEEXT)$$/.log/`
|
---|
123 |
|
---|
124 | tst-pcre$(EXEEXT)::
|
---|
125 | $(SEDENV) ./tst-pcre $(srcdir)/PCRE.tests > tst-pcre.log
|
---|
126 |
|
---|
127 | tst-boost$(EXEEXT)::
|
---|
128 | $(SEDENV) ./tst-boost $(srcdir)/BOOST.tests > tst-boost.log
|
---|
129 |
|
---|
130 | tst-rxspencer$(EXEEXT)::
|
---|
131 | $(SEDENV) ./tst-rxspencer $(srcdir)/SPENCER.tests > tst-spencer.log
|
---|
132 |
|
---|
133 | tst-regex2$(EXEEXT)::
|
---|
134 | $(SEDENV) ./tst-regex2 $(srcdir)/tst-regex2.c > tst-regex2.log
|
---|
135 |
|
---|
136 | # The following target is not used in GNU sed builds (only super-sed)
|
---|
137 |
|
---|
138 | pcretest$(EXEEXT)::
|
---|
139 | $(SEDENV) ./pcretest $(srcdir)/pcre1.inp pcre1.out
|
---|
140 | $(CMP) $(srcdir)/pcre1.good pcre1.out
|
---|
141 | #$(SEDENV) ./pcretest -p $(srcdir)/pcre1.inp pcre1p.out
|
---|
142 | #$(CMP) $(srcdir)/pcre1p.good pcre1p.out
|
---|
143 | $(SEDENV) ./pcretest -P $(srcdir)/pcre2.inp pcre2.out
|
---|
144 | $(CMP) $(srcdir)/pcre2.good pcre2.out
|
---|
145 | $(SEDENV) ./pcretest -P -p $(srcdir)/pcre2.inp pcre2p.out
|
---|
146 | $(CMP) $(srcdir)/pcre2p.good pcre2p.out
|
---|
147 | $(SEDENV) ./pcretest $(srcdir)/pcre3.inp pcre3.out
|
---|
148 | $(CMP) $(srcdir)/pcre3.good pcre3.out
|
---|
149 | $(SEDENV) ./pcretest -p $(srcdir)/pcre3.inp pcre3p.out
|
---|
150 | $(CMP) $(srcdir)/pcre3p.good pcre3p.out
|
---|
151 | @$(RM) pcre*.out
|
---|
152 |
|
---|
153 | .PHONY: \
|
---|
154 | bug-regex7$(EXEEXT) bug-regex8$(EXEEXT) bug-regex9$(EXEEXT) \
|
---|
155 | bug-regex10$(EXEEXT) bug-regex11$(EXEEXT) bug-regex12$(EXEEXT) \
|
---|
156 | bug-regex13$(EXEEXT) bug-regex14$(EXEEXT) bug-regex15$(EXEEXT) bug-regex16$(EXEEXT) \
|
---|
157 | bug-regex21$(EXEEXT) runtests$(EXEEXT) runptests$(EXEEXT) tst-regex2$(EXEEXT) \
|
---|
158 | tst-pcre$(EXEEXT) tst-boost$(EXEEXT) tst-rxspencer$(EXEEXT) pcretest$(EXEEXT)
|
---|