* fix for bug #1291 - remove configuration files during make uninstall if
they are the same as the versions in the source tree This commit was SVN r5277.
Этот коммит содержится в:
родитель
9ad1f6c0cb
Коммит
aa4157fc60
@ -16,17 +16,18 @@
|
|||||||
|
|
||||||
include $(top_srcdir)/config/Makefile.options
|
include $(top_srcdir)/config/Makefile.options
|
||||||
|
|
||||||
EXTRA_DIST = \
|
ompi_config_files = \
|
||||||
openmpi-default-hostfile \
|
openmpi-default-hostfile \
|
||||||
openmpi-mca-params.conf
|
openmpi-mca-params.conf
|
||||||
|
|
||||||
|
EXTRA_DIST = $(ompi_config_files)
|
||||||
sysconf_DATA =
|
sysconf_DATA =
|
||||||
|
|
||||||
# Steal a little trickery from a generated Makefile to only install
|
# Steal a little trickery from a generated Makefile to only install
|
||||||
# lam-bhost.def if one does not already exist at the target.
|
# lam-bhost.def if one does not already exist at the target.
|
||||||
|
|
||||||
install-data-local:
|
install-data-local:
|
||||||
@ p="openmpi-mca-params.conf openmpi-default-hostfile"; \
|
@ p="$(ompi_config_files)"; \
|
||||||
for file in $$p; do \
|
for file in $$p; do \
|
||||||
if test -f $(DESTDIR)$(sysconfdir)/$$file; then \
|
if test -f $(DESTDIR)$(sysconfdir)/$$file; then \
|
||||||
echo "******************************* WARNING ************************************"; \
|
echo "******************************* WARNING ************************************"; \
|
||||||
@ -40,3 +41,19 @@ install-data-local:
|
|||||||
$(INSTALL_DATA) $$d$$file $(DESTDIR)$(sysconfdir)/$$f; \
|
$(INSTALL_DATA) $$d$$file $(DESTDIR)$(sysconfdir)/$$f; \
|
||||||
fi; \
|
fi; \
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# Only remove if exactly the same as what in our tree
|
||||||
|
# NOTE TO READER: Bourne shell if ... fi evaluates the body if
|
||||||
|
# the return of the evaluted command is 0 (as opposed to non-zero
|
||||||
|
# as used by everyone else)
|
||||||
|
uninstall-local:
|
||||||
|
@ p="$(ompi_config_files)"; \
|
||||||
|
for file in $$p; do \
|
||||||
|
if test -f "$(DESTDIR)$(sysconfdir)/$$file"; then \
|
||||||
|
if test -f "$$file"; then d=; else d="$(srcdir)/"; fi; \
|
||||||
|
if diff "$(DESTDIR)$(sysconfdir)/$$file" "$$d$$file" > /dev/null 2>&1 ; then \
|
||||||
|
echo "rm -f $(DESTDIR)$(sysconfdir)/$$file" ; \
|
||||||
|
rm -f "$(DESTDIR)$(sysconfdir)/$$file" ; \
|
||||||
|
fi ; \
|
||||||
|
fi ; \
|
||||||
|
done
|
||||||
|
Загрузка…
Ссылка в новой задаче
Block a user