summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2009-05-13 21:50:32 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2009-05-13 21:50:32 (GMT)
commitf89077b486f9d89be32d7ce9ccd55b298b252cff (patch)
treecdd71e354fb11a1caf6363d0299bec51cc2e3b27
parentd0269165cdbad86ed15b0b10cb6e66cdf487542f (diff)
downloadhdf5-f89077b486f9d89be32d7ce9ccd55b298b252cff.zip
hdf5-f89077b486f9d89be32d7ce9ccd55b298b252cff.tar.gz
hdf5-f89077b486f9d89be32d7ce9ccd55b298b252cff.tar.bz2
[svn-r16950] Bug Fix (ID 1090):
make DESTDIR=xyz install failed, complaining install directory such as .../lib does not exist. The reason was that the previous fix for DESTDIR had erros that sometimes ${libdir} was prefixed with $(DESTDIR) and sometimes not. Solution: Instead of inserting $(DESTDIR) all over the place (just like Gnu document shows), add $(DESTDIR) right where those libdir/includedir/bindir are defined. This should fix all things even if new install instructions are added. Tested: h5committest; and then test DESTDIR by hand, also run "gmake check-all-install" by hand.
-rw-r--r--c++/config/commence.in8
-rw-r--r--c++/config/conclude.in28
-rw-r--r--config/commence.in10
-rw-r--r--config/conclude.in56
-rw-r--r--doc/Makefile.in4
-rw-r--r--fortran/config/commence.in8
-rw-r--r--fortran/config/conclude.in34
7 files changed, 75 insertions, 73 deletions
diff --git a/c++/config/commence.in b/c++/config/commence.in
index 5587fe9..e34ef32 100644
--- a/c++/config/commence.in
+++ b/c++/config/commence.in
@@ -53,10 +53,10 @@ TRACE=:
## Installation points
prefix=@prefix@
exec_prefix=@exec_prefix@
-bindir=@bindir@
-libdir=@libdir@
-includedir=@includedir@
-docdir=@exec_prefix@/doc
+bindir=$(DESTDIR)@bindir@
+libdir=$(DESTDIR)@libdir@
+includedir=$(DESTDIR)@includedir@
+docdir=$(DESTDIR)@exec_prefix@/doc
PUB_LIB=$(LIB)
## Obtain default library; the current version of libtool does not fully
diff --git a/c++/config/conclude.in b/c++/config/conclude.in
index 1e47651..89c2086 100644
--- a/c++/config/conclude.in
+++ b/c++/config/conclude.in
@@ -179,66 +179,66 @@ _check-p: $(LIB) $(PROGS) $(TESTS)
## Make installation directories directories if they don't exist.
$(libdir):
- $(top_srcdir)/bin/mkdirs $(DESTDIR)$@
+ $(top_srcdir)/bin/mkdirs $@
$(includedir):
- $(top_srcdir)/bin/mkdirs $(DESTDIR)$@
+ $(top_srcdir)/bin/mkdirs $@
$(bindir):
- $(top_srcdir)/bin/mkdirs $(DESTDIR)$@
+ $(top_srcdir)/bin/mkdirs $@
$(EXAMPLEDIR):
- $(top_srcdir)/bin/mkdirs $(DESTDIR)$@
+ $(top_srcdir)/bin/mkdirs $@
## Install the library, the public header files, and public programs.
install: $(PUB_LIB) $(PUB_HDR) $(PUB_PROGS) $(libdir) $(includedir) $(bindir)
@for f in X $(PUB_LIB); do \
if test $$f != X; then \
- ($(LT_INSTALL_LIB) $$f $(DESTDIR)$(libdir)/. || exit 1); \
+ ($(LT_INSTALL_LIB) $$f $(libdir)/. || exit 1); \
fi; \
done
@if test -f libhdf5_cpp.settings; then \
- (set -x; $(INSTALL_DATA) libhdf5_cpp.settings $(DESTDIR)$(libdir)/. || exit 1); \
+ (set -x; $(INSTALL_DATA) libhdf5_cpp.settings $(libdir)/. || exit 1); \
fi
@for f in X $(PUB_HDR); do \
if test $$f != X; then \
if test -f $$f; then \
- (set -x; $(INSTALL_DATA) $$f $(DESTDIR)$(includedir)/. || exit 1); \
+ (set -x; $(INSTALL_DATA) $$f $(includedir)/. || exit 1); \
else \
- (set -x; $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(includedir)/. || \
+ (set -x; $(INSTALL_DATA) $(srcdir)/$$f $(includedir)/. || \
exit 1); \
fi; \
fi; \
done
@for f in X $(PUB_PROGS); do \
if test $$f != X; then \
- ($(LT_INSTALL_PROG) $$f $(DESTDIR)$(bindir)/. || exit 1); \
+ ($(LT_INSTALL_PROG) $$f $(bindir)/. || exit 1); \
fi; \
done
install-examples: $(EXAMPLE_PROGS) $(EXAMPLEDIR)
@for f in X $(EXAMPLE_PROGS); do \
if test $$f != X; then \
- (set -x; $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(EXAMPLEDIR)/. || exit 1);\
+ (set -x; $(INSTALL_DATA) $(srcdir)/$$f $(EXAMPLEDIR)/. || exit 1);\
fi; \
done
uninstall-examples:
@if test -n "$(EXAMPLE_PROGS)"; then \
- set -x; cd $(DESTDIR)$(EXAMPLEDIR) && $(RM) $(EXAMPLE_PROGS); \
+ set -x; cd $(EXAMPLEDIR) && $(RM) $(EXAMPLE_PROGS); \
fi
## Removes those things that `make install' (would have) installed.
uninstall:
@for f in libhdf5_cpp.settings $(LIB); do \
- $(LT_UNINSTALL) $(DESTDIR)$(libdir)/$$f; \
+ $(LT_UNINSTALL) $(libdir)/$$f; \
done
@if test -n "$(PUB_HDR)"; then \
- set -x; cd $(DESTDIR)$(includedir) && $(RM) $(PUB_HDR); \
+ set -x; cd $(includedir) && $(RM) $(PUB_HDR); \
fi
@for f in X $(PUB_PROGS); do \
if test $$f != X; then \
- $(LT_UNINSTALL) $(DESTDIR)$(bindir)/$$f; \
+ $(LT_UNINSTALL) $(bindir)/$$f; \
fi; \
done
diff --git a/config/commence.in b/config/commence.in
index 1d6db96..32da950 100644
--- a/config/commence.in
+++ b/config/commence.in
@@ -54,12 +54,14 @@ TIME=time
TRACE=:
## Installation points
+## Insert DESTDIR to individual installation directory because they can be
+## defined independent of prefix.
prefix=@prefix@
exec_prefix=@exec_prefix@
-bindir=@bindir@
-libdir=@libdir@
-includedir=@includedir@
-docdir=@exec_prefix@/doc
+bindir=$(DESTDIR)@bindir@
+libdir=$(DESTDIR)@libdir@
+includedir=$(DESTDIR)@includedir@
+docdir=$(DESTDIR)@exec_prefix@/doc
PUB_LIB=$(LIB)
## Shared libraries
diff --git a/config/conclude.in b/config/conclude.in
index f97d27b..0568f13 100644
--- a/config/conclude.in
+++ b/config/conclude.in
@@ -203,37 +203,37 @@ check-vfd:
## Make installation directories directories if they don't exist.
##
$(libdir):
- -$(top_srcdir)/bin/mkdirs $(DESTDIR)$@
+ -$(top_srcdir)/bin/mkdirs $@
$(includedir):
- -$(top_srcdir)/bin/mkdirs $(DESTDIR)$@
+ -$(top_srcdir)/bin/mkdirs $@
$(bindir):
- -$(top_srcdir)/bin/mkdirs $(DESTDIR)$@
+ -$(top_srcdir)/bin/mkdirs $@
$(DOCDIR):
- -$(top_srcdir)/bin/mkdirs $(DESTDIR)$@
+ -$(top_srcdir)/bin/mkdirs $@
$(EXAMPLEDIR):
- -$(top_srcdir)/bin/mkdirs $(DESTDIR)$@
+ -$(top_srcdir)/bin/mkdirs $@
## Install the library, the public header files, and public programs.
##
install: $(AUX_LIB) $(PUB_LIB) $(PUB_HDR) $(PUB_PROGS) $(libdir) $(includedir) $(bindir)
@for f in X $(PUB_LIB); do \
if test $$f != X; then \
- ($(LT_INSTALL_LIB) $$f $(DESTDIR)$(libdir)/. || exit 1); \
+ ($(LT_INSTALL_LIB) $$f $(libdir)/. || exit 1); \
fi; \
done
@if test -f libhdf5.settings; then \
- (set -x; $(INSTALL_DATA) libhdf5.settings $(DESTDIR)$(libdir)/. || exit 1); \
+ (set -x; $(INSTALL_DATA) libhdf5.settings $(libdir)/. || exit 1); \
fi
@for f in X $(PUB_HDR); do \
if test $$f != X; then \
if test -f $$f; then \
- (set -x; $(INSTALL_DATA) $$f $(DESTDIR)$(includedir)/. || exit 1); \
+ (set -x; $(INSTALL_DATA) $$f $(includedir)/. || exit 1); \
else \
- (set -x; $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(includedir)/. || \
+ (set -x; $(INSTALL_DATA) $(srcdir)/$$f $(includedir)/. || \
exit 1); \
fi; \
fi; \
@@ -242,14 +242,14 @@ install: $(AUX_LIB) $(PUB_LIB) $(PUB_HDR) $(PUB_PROGS) $(libdir) $(includedir) $
if test $$f != X; then \
if test "X$(PARALLEL)" != "Xno"; then \
if test $$f = "h5cc"; then \
- ($(LT_INSTALL_PROG) $$f $(DESTDIR)$(bindir)/h5pcc || exit 1); \
+ ($(LT_INSTALL_PROG) $$f $(bindir)/h5pcc || exit 1); \
elif test $$f = "h5fc"; then \
- ($(LT_INSTALL_PROG) $$f $(DESTDIR)$(bindir)/h5pfc || exit 1); \
+ ($(LT_INSTALL_PROG) $$f $(bindir)/h5pfc || exit 1); \
else \
- ($(LT_INSTALL_PROG) $$f $(DESTDIR)$(bindir)/. || exit 1); \
+ ($(LT_INSTALL_PROG) $$f $(bindir)/. || exit 1); \
fi; \
else \
- ($(LT_INSTALL_PROG) $$f $(DESTDIR)$(bindir)/. || exit 1); \
+ ($(LT_INSTALL_PROG) $$f $(bindir)/. || exit 1); \
fi; \
fi; \
done
@@ -262,30 +262,30 @@ install: $(AUX_LIB) $(PUB_LIB) $(PUB_HDR) $(PUB_PROGS) $(libdir) $(includedir) $
install-examples: $(EXAMPLE_PROGS) $(EXAMPLEDIR)
@for f in X $(EXAMPLE_PROGS); do \
if test $$f != X; then \
- (set -x; $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(EXAMPLEDIR)/. || exit 1);\
+ (set -x; $(INSTALL_DATA) $(srcdir)/$$f $(EXAMPLEDIR)/. || exit 1);\
fi; \
done
uninstall-examples:
@if test -n "$(EXAMPLE_PROGS)"; then \
- set -x; cd $(DESTDIR)$(EXAMPLEDIR) && $(RM) $(EXAMPLE_PROGS); \
+ set -x; cd $(EXAMPLEDIR) && $(RM) $(EXAMPLE_PROGS); \
fi
## Install the documents.
##
install-doc: $(PUB_DOCS) $(DOCDIR)
@if test -n "$(DOCDIR)"; then \
- if test -d "$(DESTDIR)$(DOCDIR)"; then \
+ if test -d "$(DOCDIR)"; then \
:; \
else \
- mkdir $(DESTDIR)$(DOCDIR) && chmod 755 $(DESTDIR)$(DOCDIR); \
+ mkdir $(DOCDIR) && chmod 755 $(DOCDIR); \
fi; \
fi
@if test -n "$(SUBDOCDIR)"; then \
- if test -d "$(DESTDIR)$(SUBDOCDIR)" ; then \
+ if test -d "$(SUBDOCDIR)" ; then \
:; \
else \
- mkdir $(DESTDIR)$(SUBDOCDIR) && chmod 755 $(DESTDIR)$(SUBDOCDIR); \
+ mkdir $(SUBDOCDIR) && chmod 755 $(SUBDOCDIR); \
fi; \
fi
@for d in X $(SUBDIRS); do \
@@ -296,9 +296,9 @@ install-doc: $(PUB_DOCS) $(DOCDIR)
@for f in X $(PUB_DOCS); do \
if test $$f != X; then \
if test -f $$f; then \
- (set -x; $(INSTALL_DATA) $$f $(DESTDIR)$(DOCDIR)/. || exit 1); \
+ (set -x; $(INSTALL_DATA) $$f $(DOCDIR)/. || exit 1); \
else \
- (set -x; $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(DOCDIR)/. || \
+ (set -x; $(INSTALL_DATA) $(srcdir)/$$f $(DOCDIR)/. || \
exit 1); \
fi; \
fi; \
@@ -306,9 +306,9 @@ install-doc: $(PUB_DOCS) $(DOCDIR)
@for f in X $(PUB_SUBDOCS); do \
if test $$f != X; then \
if test -f $$f; then \
- (set -x; $(INSTALL_DATA) $$f $(DESTDIR)$(SUBDOCDIR)/. || exit 1); \
+ (set -x; $(INSTALL_DATA) $$f $(SUBDOCDIR)/. || exit 1); \
else \
- (set -x; $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(SUBDOCDIR)/. || \
+ (set -x; $(INSTALL_DATA) $(srcdir)/$$f $(SUBDOCDIR)/. || \
exit 1); \
fi; \
fi; \
@@ -318,14 +318,14 @@ install-doc: $(PUB_DOCS) $(DOCDIR)
##
uninstall:
@for f in libhdf5.settings $(LIB); do \
- $(LT_UNINSTALL) $(DESTDIR)$(libdir)/$$f; \
+ $(LT_UNINSTALL) $(libdir)/$$f; \
done
@if test -n "$(PUB_HDR)"; then \
- set -x; cd $(DESTDIR)$(includedir) && $(RM) $(PUB_HDR); \
+ set -x; cd $(includedir) && $(RM) $(PUB_HDR); \
fi
@for f in X $(PUB_PROGS); do \
if test $$f != X; then \
- $(LT_UNINSTALL) $(DESTDIR)$(bindir)/$$f; \
+ $(LT_UNINSTALL) $(bindir)/$$f; \
fi; \
done
@@ -338,10 +338,10 @@ uninstall-doc:
fi; \
done
@if test -n "$(PUB_DOCS)"; then \
- set -x; cd $(DESTDIR)$(DOCDIR) && $(RM) $(PUB_DOCS); \
+ set -x; cd $(DOCDIR) && $(RM) $(PUB_DOCS); \
fi
@if test -n "$(PUB_SUBDOCS)"; then \
- set -x; cd $(DESTDIR)$(DOCDIR) && $(RM) $(PUB_SUBDOCS); \
+ set -x; cd $(DOCDIR) && $(RM) $(PUB_SUBDOCS); \
fi
# General rule for recursive cleaning targets. Like the rule above,
diff --git a/doc/Makefile.in b/doc/Makefile.in
index dd9785c..8a56e2e 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -27,10 +27,10 @@ tests TAGS dep depend:
done
install-doc:
- @if test -d $(DESTDIR)$(DOCDIR) ; then \
+ @if test -d $(DOCDIR) ; then \
:; \
else \
- mkdir $(DESTDIR)$(DOCDIR) && chmod 755 $(DESTDIR)$(DOCDIR); \
+ mkdir $(DOCDIR) && chmod 755 $(DOCDIR); \
fi
@@SETX@; for d in $(SUBDIRS); do \
(cd $$d && $(MAKE) $@) || exit 1; \
diff --git a/fortran/config/commence.in b/fortran/config/commence.in
index 3e37701..5947e78 100644
--- a/fortran/config/commence.in
+++ b/fortran/config/commence.in
@@ -60,10 +60,10 @@ TRACE=:
## Installation points
prefix=@prefix@
exec_prefix=@exec_prefix@
-bindir=@bindir@
-libdir=@libdir@
-includedir=@includedir@
-docdir=@exec_prefix@/doc
+bindir=$(DESTDIR)@bindir@
+libdir=$(DESTDIR)@libdir@
+includedir=$(DESTDIR)@includedir@
+docdir=$(DESTDIR)@exec_prefix@/doc
PUB_LIB=$(LIB)
## Shared libraries
diff --git a/fortran/config/conclude.in b/fortran/config/conclude.in
index 93bc830..188b2f0 100644
--- a/fortran/config/conclude.in
+++ b/fortran/config/conclude.in
@@ -174,19 +174,19 @@ _check-p: $(LIB) $(PROGS) $(TESTS)
## Make installation directories directories if they don't exist.
$(libdir):
- $(top_srcdir)/bin/mkdirs $(DESTDIR)$@
+ $(top_srcdir)/bin/mkdirs $@
$(includedir):
- $(top_srcdir)/bin/mkdirs $(DESTDIR)$@
+ $(top_srcdir)/bin/mkdirs $@
$(bindir):
- $(top_srcdir)/bin/mkdirs $(DESTDIR)$@
+ $(top_srcdir)/bin/mkdirs $@
$(DOCDIR):
- $(top_srcdir)/bin/mkdirs $(DESTDIR)$@
+ $(top_srcdir)/bin/mkdirs $@
$(EXAMPLEDIR):
- $(top_srcdir)/bin/mkdirs $(DESTDIR)$@
+ $(top_srcdir)/bin/mkdirs $@
## Install the library, the public header files, and public programs.
## Install h5fc as h5pfc for parallel mode.
@@ -194,20 +194,20 @@ install: $(PUB_LIB) $(PUB_HDR) $(PUB_PROGS) $(libdir) $(includedir) $(bindir)
@for f in X $(PUB_LIB); do \
if test $$f != X; then \
(cd .libs && rm -f $(PUB_LIB)i && ln -s ../$(PUB_LIB) $(PUB_LIB)i); \
- ($(LT_INSTALL_LIB) $$f $(DESTDIR)$(libdir)/. || exit 1); \
+ ($(LT_INSTALL_LIB) $$f $(libdir)/. || exit 1); \
fi; \
done
@if test -n "$(F9XMODEXT)" && test "X$(F9XMODEXT)" != "Xo"; then \
if test -f "hdf5.$(F9XMODEXT)" || test -f "HDF5.$(F9XMODEXT)"; then \
- ((cp *.$(F9XMODEXT) $(DESTDIR)$(libdir)/. && chmod 644 $(DESTDIR)$(libdir)/*.$(F9XMODEXT)) || exit 1); \
+ ((cp *.$(F9XMODEXT) $(libdir)/. && chmod 644 $(libdir)/*.$(F9XMODEXT)) || exit 1); \
fi; \
fi
@for f in X $(PUB_HDR); do \
if test $$f != X; then \
if test -f $$f; then \
- (set -x; $(INSTALL_DATA) $$f $(DESTDIR)$(includedir)/. || exit 1); \
+ (set -x; $(INSTALL_DATA) $$f $(includedir)/. || exit 1); \
else \
- (set -x; $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(includedir)/. || \
+ (set -x; $(INSTALL_DATA) $(srcdir)/$$f $(includedir)/. || \
exit 1); \
fi; \
fi; \
@@ -215,9 +215,9 @@ install: $(PUB_LIB) $(PUB_HDR) $(PUB_PROGS) $(libdir) $(includedir) $(bindir)
@for f in X $(PUB_PROGS); do \
if test $$f != X; then \
if test "X$(PARALLEL)" != "Xno" -a $$f = "h5fc"; then \
- ($(LT_INSTALL_PROG) $$f $(DESTDIR)$(bindir)/h5pfc || exit 1); \
+ ($(LT_INSTALL_PROG) $$f $(bindir)/h5pfc || exit 1); \
else \
- ($(LT_INSTALL_PROG) $$f $(DESTDIR)$(bindir)/. || exit 1); \
+ ($(LT_INSTALL_PROG) $$f $(bindir)/. || exit 1); \
fi; \
fi; \
done
@@ -225,30 +225,30 @@ install: $(PUB_LIB) $(PUB_HDR) $(PUB_PROGS) $(libdir) $(includedir) $(bindir)
install-examples: $(EXAMPLE_PROGS) $(EXAMPLEDIR)
@for f in X $(EXAMPLE_PROGS); do \
if test $$f != X; then \
- (set -x; $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(EXAMPLEDIR)/. || exit 1);\
+ (set -x; $(INSTALL_DATA) $(srcdir)/$$f $(EXAMPLEDIR)/. || exit 1);\
fi; \
done
uninstall-examples:
@if test -n "$(EXAMPLE_PROGS)"; then \
- set -x; cd $(DESTDIR)$(EXAMPLEDIR) && $(RM) $(EXAMPLE_PROGS); \
+ set -x; cd $(EXAMPLEDIR) && $(RM) $(EXAMPLE_PROGS); \
fi
## Removes those things that `make install' (would have) installed.
uninstall:
@if test -n "$(PUB_HDR)"; then \
- set -x; cd $(DESTDIR)$(includedir) && $(RM) $(PUB_HDR); \
+ set -x; cd $(includedir) && $(RM) $(PUB_HDR); \
fi
@if test -n "$(F9XMODEXT)" -a "X$(F9XMODEXT)" != "Xo"; then \
- if test -f "$(DESTDIR)$(libdir)/hdf5.$(F9XMODEXT)" -o -f "$(DESTDIR)$(libdir)/HDF5.$(F9XMODEXT)"; then \
+ if test -f "$(libdir)/hdf5.$(F9XMODEXT)" -o -f "$(libdir)/HDF5.$(F9XMODEXT)"; then \
for f in $(FORTMODFILES); do \
- set -x; $(RM) $(DESTDIR)$(libdir)/$$f.$(F9XMODEXT); \
+ set -x; $(RM) $(libdir)/$$f.$(F9XMODEXT); \
done \
fi; \
fi
@for f in X $(PUB_PROGS); do \
if test $$f != X; then \
- $(LT_UNINSTALL) $(DESTDIR)$(bindir)/$$f; \
+ $(LT_UNINSTALL) $(bindir)/$$f; \
fi; \
done