blob: 25fb6bb2f4fd973c2de1cc9a6ebe7572c2a6a048 [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 +++++
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000012 tests/Makefile.am | 12 ++++++++++++
13 2 files changed, 17 insertions(+)
Brad Bishopd7bf8c12018-02-25 22:55:05 -050014
15diff --git a/Makefile.am b/Makefile.am
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000016index 59e2643..5f3ceb0 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 Geissler7e0e3c02022-02-25 20:34:39 +000029index fac6826..5dc2091 100644
Brad Bishopd7bf8c12018-02-25 22:55:05 -050030--- a/tests/Makefile.am
31+++ b/tests/Makefile.am
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000032@@ -143,3 +143,15 @@ d_creat_ce_LDADD = ../src/libgdbm.la ../compat/libgdbm_compat.la
33 t_wordwrap_LDADD = ../tools/libgdbmapp.a
Andrew Geissler595f6302022-01-24 19:11:47 +000034
35 SUBDIRS = gdbmtool
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000036+
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
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000048--
492.25.1
50