Skip to content

Commit e0e924c

Browse files
committed
oshmem/wrappers: only install ORTE based wrappers if ORTE is built
Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp>
1 parent 10cb9f6 commit e0e924c

File tree

1 file changed

+46
-21
lines changed

1 file changed

+46
-21
lines changed

oshmem/tools/wrappers/Makefile.am

Lines changed: 46 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
# All rights reserved.
33
# Copyright (c) 2013-2014 Cisco Systems, Inc. All rights reserved.
44
# Copyright (c) 2014 Intel, Inc. All rights reserved.
5-
# Copyright (c) 2014-2017 Research Organization for Information Science
6-
# and Technology (RIST). All rights reserved.
5+
# Copyright (c) 2014-2019 Research Organization for Information Science
6+
# and Technology (RIST). All rights reserved.
77
# $COPYRIGHT$
88
#
99
# Additional copyrights may follow
@@ -12,7 +12,11 @@
1212

1313
include $(top_srcdir)/Makefile.ompi-rules
1414

15-
man_pages = oshcc.1 shmemcc.1 oshc++.1 shmemc++.1 oshcxx.1 shmemcxx.1 oshfort.1 shmemfort.1 oshrun.1 shmemrun.1
15+
man_pages = oshcc.1 shmemcc.1 oshc++.1 shmemc++.1 oshcxx.1 shmemcxx.1 oshfort.1 shmemfort.1
16+
17+
if PROJECT_ORTE
18+
man_pages += oshrun.1 shmemrun.1
19+
endif
1620

1721
if PROJECT_OSHMEM
1822
man_MANS = $(man_pages)
@@ -22,11 +26,17 @@ nodist_oshmemdata_DATA = \
2226
shmemc++-wrapper-data.txt \
2327
shmemfort-wrapper-data.txt
2428

25-
# Only install / uninstall if we're building oshmem
26-
install-exec-hook-always:
29+
targets_install_exec = install-exec-always
30+
targets_install_data = install-data-always
31+
targets_uninstall_local = uninstall-local-always
32+
33+
mk_bindir:
2734
test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
28-
(cd $(DESTDIR)$(bindir); rm -f shmemrun$(EXEEXT); $(LN_S) mpirun$(EXEEXT) shmemrun$(EXEEXT))
29-
(cd $(DESTDIR)$(bindir); rm -f oshrun$(EXEEXT); $(LN_S) mpirun$(EXEEXT) oshrun$(EXEEXT))
35+
36+
mk_pkgdatadir:
37+
test -z "$(pkgdatadir)" || $(mkdir_p) "$(DESTDIR)$(pkgdatadir)"
38+
39+
install-exec-always: mk_bindir
3040
(cd $(DESTDIR)$(bindir); rm -f shmemcc$(EXEEXT); $(LN_S) opal_wrapper$(EXEEXT) shmemcc$(EXEEXT))
3141
(cd $(DESTDIR)$(bindir); rm -f oshcc$(EXEEXT); $(LN_S) opal_wrapper$(EXEEXT) oshcc$(EXEEXT))
3242
(cd $(DESTDIR)$(bindir); rm -f shmemc++$(EXEEXT); $(LN_S) opal_wrapper$(EXEEXT) shmemc++$(EXEEXT))
@@ -36,17 +46,19 @@ install-exec-hook-always:
3646
(cd $(DESTDIR)$(bindir); rm -f shmemfort$(EXEEXT); $(LN_S) opal_wrapper$(EXEEXT) shmemfort$(EXEEXT))
3747
(cd $(DESTDIR)$(bindir); rm -f oshfort$(EXEEXT); $(LN_S) opal_wrapper$(EXEEXT) oshfort$(EXEEXT))
3848

39-
install-data-hook-always:
49+
install-exec-rte: mk_bindir
50+
(cd $(DESTDIR)$(bindir); rm -f shmemrun$(EXEEXT); $(LN_S) mpirun$(EXEEXT) shmemrun$(EXEEXT))
51+
(cd $(DESTDIR)$(bindir); rm -f oshrun$(EXEEXT); $(LN_S) mpirun$(EXEEXT) oshrun$(EXEEXT))
52+
53+
install-data-always: mk_pkgdatadir
4054
(cd $(DESTDIR)$(pkgdatadir); rm -f oshcc-wrapper-data.txt; $(LN_S) shmemcc-wrapper-data.txt oshcc-wrapper-data.txt)
4155
(cd $(DESTDIR)$(pkgdatadir); rm -f shmemcxx-wrapper-data.txt; $(LN_S) shmemc++-wrapper-data.txt shmemcxx-wrapper-data.txt)
4256
(cd $(DESTDIR)$(pkgdatadir); rm -f oshc++-wrapper-data.txt; $(LN_S) shmemc++-wrapper-data.txt oshc++-wrapper-data.txt)
4357
(cd $(DESTDIR)$(pkgdatadir); rm -f oshcxx-wrapper-data.txt; $(LN_S) shmemc++-wrapper-data.txt oshcxx-wrapper-data.txt)
4458
(cd $(DESTDIR)$(pkgdatadir); rm -f oshfort-wrapper-data.txt; $(LN_S) shmemfort-wrapper-data.txt oshfort-wrapper-data.txt)
4559

4660
uninstall-local-always:
47-
rm -f $(DESTDIR)$(bindir)/shmemrun$(EXEEXT) \
48-
$(DESTDIR)$(bindir)/oshrun$(EXEEXT) \
49-
$(DESTDIR)$(bindir)/shmemcc$(EXEEXT) \
61+
rm -f $(DESTDIR)$(bindir)/shmemcc$(EXEEXT) \
5062
$(DESTDIR)$(bindir)/oshcc$(EXEEXT) \
5163
$(DESTDIR)$(bindir)/shmemcxx$(EXEEXT) \
5264
$(DESTDIR)$(bindir)/oshcxx$(EXEEXT) \
@@ -59,19 +71,19 @@ uninstall-local-always:
5971
$(DESTDIR)$(pkgdatadir)/shmemfort-wrapper-data.txt \
6072
$(DESTDIR)$(pkgdatadir)/oshfort-wrapper-data.txt
6173

74+
uninstall-local-rte:
75+
rm -f $(DESTDIR)$(bindir)/shmemrun$(EXEEXT) \
76+
$(DESTDIR)$(bindir)/oshrun$(EXEEXT)
6277

63-
if CASE_SENSITIVE_FS
64-
man_MANS += oshCC.1 shmemCC.1
65-
66-
install-exec-hook: install-exec-hook-always
78+
install-exec-cs: mk_bindir
6779
(cd $(DESTDIR)$(bindir); rm -f shmemCC$(EXEEXT); $(LN_S) opal_wrapper$(EXEEXT) shmemCC$(EXEEXT))
6880
(cd $(DESTDIR)$(bindir); rm -f oshCC$(EXEEXT); $(LN_S) opal_wrapper$(EXEEXT) oshCC$(EXEEXT))
6981

70-
install-data-hook: install-data-hook-always
82+
install-data-cs: mk_pkgdatadir
7183
(cd $(DESTDIR)$(pkgdatadir); rm -f shmemCC-wrapper-data.txt; $(LN_S) shmemcxx-wrapper-data.txt shmemCC-wrapper-data.txt)
7284
(cd $(DESTDIR)$(pkgdatadir); rm -f oshCC-wrapper-data.txt; $(LN_S) oshcxx-wrapper-data.txt oshCC-wrapper-data.txt)
7385

74-
uninstall-local: uninstall-local-always
86+
uninstall-local-cs:
7587
rm -f $(DESTDIR)$(bindir)/shmemCC$(EXEEXT) \
7688
$(DESTDIR)$(mandir)/man1/shmemCC.1 \
7789
$(DESTDIR)$(pkgdatadir)/shmemCC-wrapper-data.txt
@@ -87,13 +99,26 @@ shmemCC.1: $(top_builddir)/opal/tools/wrappers/generic_wrapper.1
8799
rm -f shmemCC.1
88100
sed -e 's/#COMMAND#/shmemCC/g' -e 's/#PROJECT#/Open SHMEM/g' -e 's/#PROJECT_SHORT#/OSHMEM/g' -e 's/#LANGUAGE#/C++/g' < $(top_builddir)/opal/tools/wrappers/generic_wrapper.1 > shmemCC.1
89101

90-
else # CASE_SENSITIVE_FS
91-
install-exec-hook: install-exec-hook-always
92-
install-data-hook: install-data-hook-always
93-
uninstall-local: uninstall-local-always
102+
if CASE_SENSITIVE_FS
103+
man_MANS += oshCC.1 shmemCC.1
104+
105+
targets_install_exec += install-exec-cs
106+
107+
targets_install_data += install-data-cs
94108

109+
targets_uninstall_local += uninstall-local-cs
95110
endif # CASE_SENSITIVE_FS
96111

112+
if PROJECT_ORTE
113+
targets_install_exec += install-exec-rte
114+
targets_uninstall_local += uninstall-rte
115+
endif # PROJECT_ORTE
116+
117+
install-exec-hook: $(targets_install_exec)
118+
install-data-hook: $(targets_install_data)
119+
uninstall-local: $(targets_uninstall_local)
120+
121+
97122
########################################################
98123
#
99124
# Man page generation / handling

0 commit comments

Comments
 (0)