blob: 1e67dbd554284e575185d9c8a8b350731d00dc18 [file] [log] [blame]
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08001From 41448708e163c8ec1f980464e7dd6741db427c8a Mon Sep 17 00:00:00 2001
Brad Bishopd7bf8c12018-02-25 22:55:05 -05002From: Josep Puigdemont <josep.puigdemont@enea.com>
3Date: Sun, 4 May 2014 16:02:07 +0200
4Subject: [PATCH] Add install-ptest rules.
Patrick Williamsc124f4f2015-09-15 14:41:29 -05005
6Signed-off-by: Josep Puigdemont <josep.puigdemont@enea.com>
7Signed-off-by: Maxin B. John <maxin.john@enea.com>
8Upstream-Status: Pending
9
Brad Bishopd7bf8c12018-02-25 22:55:05 -050010---
11 Makefile.am | 5 +++++
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080012 tests/Makefile.am | 11 +++++++++++
13 2 files changed, 16 insertions(+)
Brad Bishopd7bf8c12018-02-25 22:55:05 -050014
15diff --git a/Makefile.am b/Makefile.am
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080016index ecc03df..9fbbda5 100644
Brad Bishopd7bf8c12018-02-25 22:55:05 -050017--- a/Makefile.am
18+++ b/Makefile.am
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080019@@ -55,3 +55,8 @@ ChangeLog:
Brad Bishopd7bf8c12018-02-25 22:55:05 -050020 awk -f $(top_srcdir)/git2chg.awk \
21 -v append=$(top_srcdir)/$(prev_change_log) > ChangeLog; \
22 fi
Patrick Williamsc124f4f2015-09-15 14:41:29 -050023+
24+install-ptest:
25+ @for subdir in $(SUBDIRS); do \
26+ $(MAKE) -C $$subdir DESTDIR=$(DESTDIR)/$$subdir $@; \
27+ done
Brad Bishopd7bf8c12018-02-25 22:55:05 -050028diff --git a/tests/Makefile.am b/tests/Makefile.am
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080029index dbe17dd..06f537f 100644
Brad Bishopd7bf8c12018-02-25 22:55:05 -050030--- a/tests/Makefile.am
31+++ b/tests/Makefile.am
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080032@@ -169,3 +169,14 @@ EXTRA_DIST += \
33 gdbmtool/base.exp\
34 config/default.exp
Patrick Williamsc124f4f2015-09-15 14:41:29 -050035
36+buildtests: $(check_PROGRAMS) $(TESTSUITE)
Brad Bishopd7bf8c12018-02-25 22:55:05 -050037+
Patrick Williamsc124f4f2015-09-15 14:41:29 -050038+install-ptest: $(check_PROGRAMS) $(TESTSUITE)
39+ @$(INSTALL) -d $(DESTDIR)
40+ @for file in $^; do \
41+ if [ -x .libs/$$file ]; then \
42+ $(INSTALL_PROGRAM) .libs/$$file $(DESTDIR)/$$file; \
43+ else \
44+ $(INSTALL_PROGRAM) $$file $(DESTDIR) ; \
45+ fi \
46+ done