blob: 0293900fbf30295006a877f3a2c93f94e1042bcb [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001sed: add ptest
2
3ptest needs buildtest-TESTS and runtest-TESTS targets.
4serial-tests is required to generate those targets.
5
6And fix following error after add serial-tests.
7
8[snip]
9help2man: can't get `--help' info from ../sed/sed
10make[2]: *** [sed.1] Error 2
11[snip]
12
13Upstream-Status: Inappropriate
14
15Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
16---
17 configure.ac | 2 +-
18 doc/Makefile.am | 2 +-
19 testsuite/Makefile.am | 6 ++++++
20 3 files changed, 8 insertions(+), 2 deletions(-)
21
22diff --git a/configure.ac b/configure.ac
23index 9d33ec9..4f0c532 100644
24--- a/configure.ac
25+++ b/configure.ac
26@@ -4,7 +4,7 @@ AC_CONFIG_AUX_DIR(build-aux)
27 AC_CONFIG_SRCDIR([sed/sed.c])
28 AM_CONFIG_HEADER(config.h:config_h.in)
29 AC_PREREQ(2.60)
30-AM_INIT_AUTOMAKE
31+AM_INIT_AUTOMAKE([serial-tests])
32
33 SED_FEATURE_VERSION=4.2.2
34 AC_DEFINE_UNQUOTED(SED_FEATURE_VERSION, "$SED_FEATURE_VERSION",
35diff --git a/doc/Makefile.am b/doc/Makefile.am
36index af6975c..6fd8c9a 100644
37--- a/doc/Makefile.am
38+++ b/doc/Makefile.am
39@@ -25,7 +25,7 @@ $(srcdir)/s-texi: sed-in.texi $(srcdir)/groupify.sed
40 fi
41 echo stamp > $(srcdir)/s-texi
42
43-sed.1: $(top_srcdir)/sed/sed.c $(top_srcdir)/configure.ac $(srcdir)/sed.x
44+_sed.1: $(top_srcdir)/sed/sed.c $(top_srcdir)/configure.ac $(srcdir)/sed.x
45 $(HELP2MAN) --name "stream editor for filtering and transforming text" \
46 -p sed --include $(srcdir)/sed.x -o $(srcdir)/sed.1 $(SED)
47
48diff --git a/testsuite/Makefile.am b/testsuite/Makefile.am
49index d80e72c..b05f01e 100644
50--- a/testsuite/Makefile.am
51+++ b/testsuite/Makefile.am
52@@ -99,5 +99,11 @@ EXTRA_DIST = \
53 # automake makes `check' depend on $(TESTS). Declare
54 # dummy targets for $(TESTS) so that make does not complain.
55
56+install-ptest:
Patrick Williamsc0f7c042017-02-23 20:41:17 -060057+ cd $(BUILDDIR); tar -c --exclude=*.o $(TESTDIR) | ( cd $(DESTDIR) && tar -xf - )
Patrick Williamsc124f4f2015-09-15 14:41:29 -050058+ for i in $(EXTRA_DIST) tst-regex2.c; do install $(srcdir)/$$i $(DESTDIR)/$(TESTDIR); done
59+ sed -e 's/^Makefile:/_Makefile:/' -e 's/^srcdir = \(.*\)/srcdir = ./' -e 's/bash/sh/' -i $(DESTDIR)/$(TESTDIR)/Makefile
60+ for i in `grep -rl "../sed/sed" $(DESTDIR)/$(TESTDIR)`; do sed -e 's/..\/sed\/sed/sed/' -i $$i; done
61+
62 .PHONY: $(SEDTESTS)
63 $(SEDTESTS):
64--
651.7.9.5
66