-
Notifications
You must be signed in to change notification settings - Fork 26
Fix: install MANA binaries and libraries correctly with make install
#188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -46,7 +46,7 @@ default: display-build-env add-git-hooks mana_prereqs | |
| all: default | ||
|
|
||
| mana: dmtcp | ||
| cd mpi-proxy-split && $(MAKE) install && $(MAKE) -j tests | ||
| cd mpi-proxy-split && $(MAKE) $(INSTALL_FLAGS) && $(MAKE) -j tests | ||
|
|
||
| dmtcp: | ||
| cd dmtcp && $(MAKE) | ||
|
|
@@ -63,8 +63,9 @@ create-dirs: | |
|
|
||
| install: all create-dirs | ||
| cd dmtcp && make DESTDIR=$(DESTDIR) $(INSTALL_FLAGS) | ||
| cd mpi-proxy-split && make DESTDIR=$(DESTDIR) $(INSTALL_FLAGS) | ||
| cd manpages && make DESTDIR=$(DESTDIR) $(INSTALL_FLAGS) | ||
| cd mpi-proxy-split && make DESTDIR=$(prefix) $(INSTALL_FLAGS) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We shouldn't set DESTDIR to |
||
| cd manpages && make DESTDIR=$(prefix) $(INSTALL_FLAGS) | ||
| $(INSTALL) bin/mana* $(bindir) | ||
|
|
||
| uninstall: | ||
| cd dmtcp && make DESTDIR=$(DESTDIR) $(UNINSTALL_FLAGS) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -45,6 +45,11 @@ endif | |
| ifndef DMTCP_ROOT | ||
| DMTCP_ROOT=${MANA_ROOT}/dmtcp | ||
| endif | ||
|
|
||
| ifeq ($(DESTDIR),) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's not touch DESTDIR at all -- this is something that's supplied as part of the make command itself. |
||
| DESTDIR=${shell readlink -f ${MANA_ROOT}} | ||
| endif | ||
|
|
||
| DMTCP_INCLUDE=${DMTCP_ROOT}/include | ||
| JALIB_INCLUDE=${DMTCP_ROOT}/jalib | ||
|
|
||
|
|
@@ -56,11 +61,9 @@ override CXXFLAGS += -fPIC -I${DMTCP_INCLUDE} -I${JALIB_INCLUDE} \ | |
| # ${WRAPPERS_SRCDIR}/libmpiwrappers.a ia a prerequisite for libmana.so | ||
| # Always do 'make default' or 'make install' -- not 'make libmana.so' | ||
| default: ${MANA_COORD_OBJS} | ||
| make -C ${WRAPPERS_SRCDIR} libmpiwrappers.a | ||
| @make -C ${WRAPPERS_SRCDIR} | ||
| @make -C ${LOWER_HALF_SRCDIR} | ||
| @make libmana.so | ||
| @make -C ${LOWER_HALF_SRCDIR} lh_proxy | ||
| @make -C ${LOWER_HALF_SRCDIR} lh_proxy_default_address | ||
| @make -C ${WRAPPERS_SRCDIR} libmpistub.so | ||
|
|
||
| # ${WRAPPERS_SRCDIR}/libmpiwrappers.a made in install/default before libmana.so | ||
| libmana.so: ${LIBOBJS} ${WRAPPERS_SRCDIR}/libmpiwrappers.a | ||
|
|
@@ -113,13 +116,11 @@ ${MANA_ROOT}/bin/mana_p2p_update_logs: ${WRAPPERS_SRCDIR}/mana_p2p_update_logs.c | |
| # which is a prerequisite for ${MANA_ROOT}/lib/dmtcp/libmana.so | ||
| # Always do 'make default' or 'make install' -- not 'make libmana.so' | ||
| # MANA_COORD_OBJS needed for 'make mana' at top level. | ||
| install: ${MANA_COORD_OBJS} | ||
| make -C ${WRAPPERS_SRCDIR} libmpiwrappers.a | ||
| make ${MANA_ROOT}/lib/dmtcp/libmana.so | ||
| make ${MANA_ROOT}/lib/dmtcp/libmpistub.so | ||
| make ${MANA_ROOT}/bin/lh_proxy | ||
| make ${MANA_ROOT}/bin/gethostbyname_proxy | ||
| make ${MANA_ROOT}/bin/mana_p2p_update_logs | ||
|
|
||
| install: default | ||
| $(INSTALL) libmana.so $(DESTDIR)/lib/dmtcp/ | ||
| make -C ${WRAPPERS_SRCDIR} DESTDIR=$(DESTDIR) install | ||
| make -C ${LOWER_HALF_SRCDIR} DESTDIR=$(DESTDIR) install | ||
|
|
||
| tidy: | ||
| rm -f *~ .*.swp dmtcp_restart_script*.sh ckpt_*.dmtcp | ||
|
|
@@ -128,7 +129,7 @@ tidy: | |
| clean: tidy | ||
| rm -f ${LIBOBJS} ${MANA_COORD_OBJS} | ||
| rm -f libmana.so | ||
| rm -f ${MANA_ROOT}/lib/dmtcp/libmana.so | ||
| rm -f ${DESTDIR}/lib/dmtcp/libmana.so | ||
| @cd ${LOWER_HALF_SRCDIR} && make clean | ||
| @cd ${WRAPPERS_SRCDIR} && make clean | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure why we are doing a make install here. Shouldn't that go under the
installtarget?Also, should we just remove this target altogether.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@karya0 , I'm not sure I understand your point here. We want to capture the default target for 'make'. The conventional name for that would be
defaultand notinstall. Under that target, it's possible to callmake installif desired. Something like that seems to be happening here.