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)/[email protected] \
|
---|
19 | < $(srcdir)/[email protected] > [email protected]
|
---|
20 | $(CMP) $(srcdir)/[email protected] [email protected]
|
---|
21 | @$(RM) [email protected]
|
---|
22 |
|
---|
23 | 0range::
|
---|
24 | $(SEDENV) $(SED) -s -f $(srcdir)/[email protected] < $(srcdir)/[email protected] > [email protected]
|
---|
25 | $(CMP) $(srcdir)/[email protected] [email protected]
|
---|
26 | @$(RM) [email protected]
|
---|
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 > [email protected]
|
---|
31 | $(SEDENV) cat $(srcdir)/numsub.inp | ($(SEDENV) $(SED) d; $(SEDENV) $(SED) G) > [email protected]
|
---|
32 | $(CMP) [email protected] [email protected]
|
---|
33 | @$(RM) [email protected] [email protected]
|
---|
34 |
|
---|
35 | cv-vars classes middle dc distrib factor numsub2 numsub3 numsub4 numsub5 \
|
---|
36 | insens::
|
---|
37 | $(SEDENV) $(SED) -n -f $(srcdir)/[email protected] < $(srcdir)/[email protected] > [email protected]
|
---|
38 | $(CMP) $(srcdir)/[email protected] [email protected]
|
---|
39 | @$(RM) [email protected]
|
---|
40 |
|
---|
41 | noeolw::
|
---|
42 | $(SEDENV) $(SED) -n -f $(srcdir)/[email protected] \
|
---|
43 | $(srcdir)/noeol.inp $(srcdir)/noeol.inp > [email protected]
|
---|
44 | $(CMP) $(srcdir)/[email protected] [email protected]
|
---|
45 | $(CMP) $(srcdir)/[email protected] [email protected]
|
---|
46 | $(CMP) $(srcdir)/[email protected] [email protected]
|
---|
47 | @$(RM) [email protected] [email protected] [email protected]
|
---|
48 |
|
---|
49 | subwrite::
|
---|
50 | $(SEDENV) $(SED) -f $(srcdir)/[email protected] < $(srcdir)/[email protected] > [email protected]
|
---|
51 | $(CMP) $(srcdir)/subwrt1.good [email protected]
|
---|
52 | $(CMP) $(srcdir)/subwrt2.good [email protected]
|
---|
53 | @$(RM) [email protected] [email protected]
|
---|
54 |
|
---|
55 | bsd::
|
---|
56 | $(SEDENV) sh $(srcdir)/[email protected] '$(SED)' bsd.out
|
---|
57 | $(CMP) $(srcdir)/[email protected] [email protected]
|
---|
58 | @$(RM) [email protected]
|
---|
59 |
|
---|
60 | writeout::
|
---|
61 | $(SEDENV) $(SED) -f $(srcdir)/[email protected] < $(srcdir)/[email protected] >[email protected]
|
---|
62 | $(CMP) $(srcdir)/wrtout1.good [email protected]
|
---|
63 | $(CMP) $(srcdir)/wrtout2.good [email protected]
|
---|
64 | @$(RM) [email protected] [email protected]
|
---|
65 |
|
---|
66 | readin.in2: $(srcdir)/readin.in2
|
---|
67 | cat $(srcdir)/readin.in2 > $@
|
---|
68 |
|
---|
69 | readin:: readin.in2
|
---|
70 | $(SEDENV) $(SED) -f $(srcdir)/[email protected] < $(srcdir)/[email protected] >[email protected]
|
---|
71 | $(CMP) $(srcdir)/[email protected] [email protected]
|
---|
72 | @$(RM) [email protected]
|
---|
73 |
|
---|
74 | eval.in2: $(srcdir)/eval.inp
|
---|
75 | cat $(srcdir)/eval.inp > $@
|
---|
76 |
|
---|
77 | eval:: eval.in2
|
---|
78 | $(SEDENV) $(SED) -f $(srcdir)/[email protected] < $(srcdir)/[email protected] > [email protected]
|
---|
79 | $(CMP) $(srcdir)/[email protected] [email protected]
|
---|
80 | @$(RM) [email protected]
|
---|
81 |
|
---|
82 | binary binary2 binary3::
|
---|
83 | $(SEDENV) $(SED) -n -f $(srcdir)/[email protected] < $(srcdir)/binary.inp >[email protected]
|
---|
84 | $(CMP) $(srcdir)/binary.good [email protected]
|
---|
85 | @$(RM) [email protected]
|
---|
86 |
|
---|
87 | #
|
---|
88 | # cmdlines targets
|
---|
89 | #
|
---|
90 |
|
---|
91 | help::
|
---|
92 | $(SED) --help | $(SED) '1s/ [^ ]* / sed /' > [email protected]
|
---|
93 | $(SED) 2>&1 | $(SED) '1s/ [^ ]* / sed /' > [email protected] || :
|
---|
94 | $(CMP) [email protected] [email protected]
|
---|
95 | @$(RM) [email protected] [email protected]
|
---|
96 |
|
---|
97 | version::
|
---|
98 | $(SED) 's^@'VERSION'@^$(VERSION)^' $(srcdir)/version.gin > [email protected]
|
---|
99 | $(SEDENV) $(SED) --version > [email protected] 2>&1
|
---|
100 | $(CMP) [email protected] [email protected]
|
---|
101 | @$(RM) [email protected] [email protected]
|
---|
102 |
|
---|
103 | file::
|
---|
104 | $(SEDENV) $(SED) --file=$(srcdir)/newjis.sed \
|
---|
105 | < $(srcdir)/newjis.inp > [email protected]
|
---|
106 | $(CMP) $(srcdir)/newjis.good [email protected]
|
---|
107 | @$(RM) [email protected]
|
---|
108 |
|
---|
109 | quiet::
|
---|
110 | $(SEDENV) $(SED) --quiet -f $(srcdir)/cv-vars.sed \
|
---|
111 | < $(srcdir)/cv-vars.inp > [email protected]
|
---|
112 | $(CMP) $(srcdir)/cv-vars.good [email protected]
|
---|
113 | @$(RM) [email protected]
|
---|
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)
|
---|