blob: 187f09655d8ef6438e8475e41a33e9fee6a1c101 [file] [log] [blame]
Andrew Geissler595f6302022-01-24 19:11:47 +00001From 8bea84a598b51a7ac7e50aa8f0f20857a9b6b07b 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
Andrew Geissler595f6302022-01-24 19:11:47 +000016index 25e200d..03d5ef0 100644
Brad Bishopd7bf8c12018-02-25 22:55:05 -050017--- a/Makefile.am
18+++ b/Makefile.am
Andrew Geissler595f6302022-01-24 19:11:47 +000019@@ -64,3 +64,8 @@ ChangeLog:
20 mv ChangeLog.tmp ChangeLog; \
21 rm -f ChangeLog.tmp; \
Brad Bishopd7bf8c12018-02-25 22:55:05 -050022 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
Andrew Geissler595f6302022-01-24 19:11:47 +000029index 337cbed..92ec3be 100644
Brad Bishopd7bf8c12018-02-25 22:55:05 -050030--- a/tests/Makefile.am
31+++ b/tests/Makefile.am
Andrew Geissler595f6302022-01-24 19:11:47 +000032@@ -139,3 +139,14 @@ d_creat_ce_LDADD = ../src/libgdbm.la ../compat/libgdbm_compat.la
33
34 SUBDIRS = gdbmtool
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