blob: 5193e7784f630f0a93c4618ad00668c464d11284 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
## Process this file with automake to produce Makefile.in.
##test-files-begin
x = ls
explicit = '""""" "' b
maint_gen = q1.X q2.X
run_gen = q1.O q1.E q2.O q2.E
##test-files-end
EXTRA_DIST = mk-script.pl Test.pm $x-tests $(explicit) $(maint_gen)
noinst_SCRIPTS = $x-tests
PERL = @PERL@
editpl = sed -e 's,@''PERL''@,$(PERL),g' -e 's,@''srcdir''@,@srcdir@,g'
TESTS = $x-tests
$x-tests: @MAINT@mk-script Test.pm
./mk-script ../../src/$x > $@.n
mv $@.n $@
chmod 755 $@
SUFFIXES = .pl
.pl:
rm -f $@ $@.tmp
$(editpl) $< > $@.tmp
chmod +x-w $@.tmp
mv $@.tmp $@
MAINTAINERCLEANFILES = $x-tests $(maint_gen)
CLEANFILES = $(run_gen)
@MAINT@rebuild-check: Test.pm mk-script
@MAINT@ rb=rb-check; rm -f $rb; \
@MAINT@ m_template=../Makefile.am.in; \
@MAINT@ sed -n '1,/^##test-files-begin/p' $$m_template > $$rb; \
@MAINT@ tool=`echo $(subdir)|sed 's/^tests.//;s/-test//'`; \
@MAINT@ echo "x = $$tool" >> $$rb; \
@MAINT@ ./mk-script --list >> $$rb; \
@MAINT@ sed -n '/^##test-files-end/,$$p' $$m_template >> $$rb; \
@MAINT@ diff -u Makefile.am $$rb && echo ok || echo no
|