blob: b9461bec6b395da2b0d6759ad00ab827ed439db5 [file] [log] [blame]
Brad Bishopd7bf8c12018-02-25 22:55:05 -05001From 4e4b70a4a3dcf1fdbee9e68bed3b62f42b197a3a Mon Sep 17 00:00:00 2001
2From: 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 +++++
12 tests/Makefile.am | 12 +++++++++++-
13 2 files changed, 16 insertions(+), 1 deletion(-)
14
15diff --git a/Makefile.am b/Makefile.am
16index 4cdc734..24b99f0 100644
17--- a/Makefile.am
18+++ b/Makefile.am
19@@ -45,3 +45,8 @@ ChangeLog:
20 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
29index 3dbb580..22ffc44 100644
30--- a/tests/Makefile.am
31+++ b/tests/Makefile.am
32@@ -130,4 +130,14 @@ dtfetch_LDADD = ../src/libgdbm.la ../compat/libgdbm_compat.la
Patrick Williamsc124f4f2015-09-15 14:41:29 -050033 dtdel_LDADD = ../src/libgdbm.la ../compat/libgdbm_compat.la
34 d_creat_ce_LDADD = ../src/libgdbm.la ../compat/libgdbm_compat.la
35
Brad Bishopd7bf8c12018-02-25 22:55:05 -050036-
Patrick Williamsc124f4f2015-09-15 14:41:29 -050037+buildtests: $(check_PROGRAMS) $(TESTSUITE)
Brad Bishopd7bf8c12018-02-25 22:55:05 -050038+
Patrick Williamsc124f4f2015-09-15 14:41:29 -050039+install-ptest: $(check_PROGRAMS) $(TESTSUITE)
40+ @$(INSTALL) -d $(DESTDIR)
41+ @for file in $^; do \
42+ if [ -x .libs/$$file ]; then \
43+ $(INSTALL_PROGRAM) .libs/$$file $(DESTDIR)/$$file; \
44+ else \
45+ $(INSTALL_PROGRAM) $$file $(DESTDIR) ; \
46+ fi \
47+ done
Brad Bishopd7bf8c12018-02-25 22:55:05 -050048--
492.11.0
50