Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | sed: add ptest |
| 2 | |
| 3 | ptest needs buildtest-TESTS and runtest-TESTS targets. |
| 4 | serial-tests is required to generate those targets. |
| 5 | |
| 6 | And fix following error after add serial-tests. |
| 7 | |
| 8 | [snip] |
| 9 | help2man: can't get `--help' info from ../sed/sed |
| 10 | make[2]: *** [sed.1] Error 2 |
| 11 | [snip] |
| 12 | |
| 13 | Upstream-Status: Inappropriate |
| 14 | |
| 15 | Signed-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 | |
| 22 | diff --git a/configure.ac b/configure.ac |
| 23 | index 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", |
| 35 | diff --git a/doc/Makefile.am b/doc/Makefile.am |
| 36 | index 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 | |
| 48 | diff --git a/testsuite/Makefile.am b/testsuite/Makefile.am |
| 49 | index 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 Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 57 | + cd $(BUILDDIR); tar -c --exclude=*.o $(TESTDIR) | ( cd $(DESTDIR) && tar -xf - ) |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 58 | + 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 | -- |
| 65 | 1.7.9.5 |
| 66 | |