[Darshan-commits] [Git][darshan/darshan][master] 2 commits: Make DESTDIR operation match common practice

Philip Carns xgitlab at cels.anl.gov
Fri Mar 6 10:07:48 CST 2020



Philip Carns pushed to branch master at darshan / darshan


Commits:
84b360a7 by Christopher J. Morrone at 2020-03-05T11:05:43-08:00
Make DESTDIR operation match common practice

Modify DESTDIR to match common practice (for instance, that of automake),
in that DESTDIR represents a staged install directory. It is intended
that the tree would need to than be copied to the final install location
afterwards. When supplied, DESTDIR will not change any compiled-in
paths in darshan.

See the automake manual section about DESTDIR for an example of standard
usage.

https://www.gnu.org/software/automake/manual/html_node/DESTDIR.html

- - - - -
91c2d4a6 by Philip Carns at 2020-03-06T10:07:45-06:00
Merge branch 'fix_destdir' into 'master'

Make DESTDIR operation match common practice

See merge request darshan/darshan!37
- - - - -


2 changed files:

- darshan-runtime/Makefile.in
- darshan-util/Makefile.in


Changes:

=====================================
darshan-runtime/Makefile.in
=====================================
@@ -1,15 +1,14 @@
 #TODO: each module provides own makefile with module-specific objects, build options, etc.
 
-DESTDIR =
 srcdir = @srcdir@
 prefix = @prefix@
 exec_prefix = @exec_prefix@
-datarootdir = $(DESTDIR)@datarootdir@
-includedir = $(DESTDIR)@includedir@
-mandir = $(DESTDIR)@mandir@
-sbindir = $(DESTDIR)@sbindir@
-bindir = $(DESTDIR)@bindir@
-libdir = $(DESTDIR)@libdir@
+datarootdir = @datarootdir@
+includedir = @includedir@
+mandir = @mandir@
+sbindir = @sbindir@
+bindir = @bindir@
+libdir = @libdir@
 LDFLAGS = @LDFLAGS@
 CC = @CC@
 LD = @LD@
@@ -221,56 +220,56 @@ endif
 
 
 install:: all
-	install -d $(libdir)
+	install -d $(DESTDIR)$(libdir)
 ifndef DISABLE_STATIC_LIB
-	install -m 755 lib/libdarshan.a $(libdir)
-	install -m 755 lib/libdarshan-stubs.a $(libdir)
+	install -m 755 lib/libdarshan.a $(DESTDIR)$(libdir)
+	install -m 755 lib/libdarshan-stubs.a $(DESTDIR)$(libdir)
 endif
 ifndef DISABLE_LDPRELOAD
-	install -m 755 lib/libdarshan.so $(libdir)
+	install -m 755 lib/libdarshan.so $(DESTDIR)$(libdir)
 endif
-	install -d $(bindir)
-	install -m 755 darshan-mk-log-dirs.pl $(bindir)
-	install -m 755 darshan-gen-cc.pl $(bindir)
-	install -m 755 darshan-gen-cxx.pl $(bindir)
-	install -m 755 darshan-gen-fortran.pl $(bindir)
-	install -m 755 darshan-config $(bindir)
-	install -d $(datarootdir)/craype-1.x/modulefiles/darshan
-	install -m 755 share/craype-1.x/darshan-module $(datarootdir)/craype-1.x/modulefiles/darshan/$(DARSHAN_VERSION)
-	install -d $(datarootdir)/craype-2.x/modulefiles/darshan
-	install -m 755 share/craype-2.x/darshan-module $(datarootdir)/craype-2.x/modulefiles/darshan/$(DARSHAN_VERSION)
-	install -d $(datarootdir)/mpi-profile
-	install -m 755 share/mpi-profile/darshan-cc.conf $(datarootdir)/mpi-profile/darshan-cc.conf
-	install -m 755 share/mpi-profile/darshan-cxx.conf $(datarootdir)/mpi-profile/darshan-cxx.conf
-	install -m 755 share/mpi-profile/darshan-f.conf $(datarootdir)/mpi-profile/darshan-f.conf
-	install -m 755 share/mpi-profile/darshan-bg-cc.conf $(datarootdir)/mpi-profile/darshan-bg-cc.conf
-	install -m 755 share/mpi-profile/darshan-bg-cxx.conf $(datarootdir)/mpi-profile/darshan-bg-cxx.conf
-	install -m 755 share/mpi-profile/darshan-bg-f.conf $(datarootdir)/mpi-profile/darshan-bg-f.conf
-	install -d $(datarootdir)/ld-opts
-	install -m 644 share/ld-opts/darshan-base-ld-opts $(datarootdir)/ld-opts/darshan-base-ld-opts
+	install -d $(DESTDIR)$(bindir)
+	install -m 755 darshan-mk-log-dirs.pl $(DESTDIR)$(bindir)
+	install -m 755 darshan-gen-cc.pl $(DESTDIR)$(bindir)
+	install -m 755 darshan-gen-cxx.pl $(DESTDIR)$(bindir)
+	install -m 755 darshan-gen-fortran.pl $(DESTDIR)$(bindir)
+	install -m 755 darshan-config $(DESTDIR)$(bindir)
+	install -d $(DESTDIR)$(datarootdir)/craype-1.x/modulefiles/darshan
+	install -m 755 share/craype-1.x/darshan-module $(DESTDIR)$(datarootdir)/craype-1.x/modulefiles/darshan/$(DARSHAN_VERSION)
+	install -d $(DESTDIR)$(datarootdir)/craype-2.x/modulefiles/darshan
+	install -m 755 share/craype-2.x/darshan-module $(DESTDIR)$(datarootdir)/craype-2.x/modulefiles/darshan/$(DARSHAN_VERSION)
+	install -d $(DESTDIR)$(datarootdir)/mpi-profile
+	install -m 755 share/mpi-profile/darshan-cc.conf $(DESTDIR)$(datarootdir)/mpi-profile/darshan-cc.conf
+	install -m 755 share/mpi-profile/darshan-cxx.conf $(DESTDIR)$(datarootdir)/mpi-profile/darshan-cxx.conf
+	install -m 755 share/mpi-profile/darshan-f.conf $(DESTDIR)$(datarootdir)/mpi-profile/darshan-f.conf
+	install -m 755 share/mpi-profile/darshan-bg-cc.conf $(DESTDIR)$(datarootdir)/mpi-profile/darshan-bg-cc.conf
+	install -m 755 share/mpi-profile/darshan-bg-cxx.conf $(DESTDIR)$(datarootdir)/mpi-profile/darshan-bg-cxx.conf
+	install -m 755 share/mpi-profile/darshan-bg-f.conf $(DESTDIR)$(datarootdir)/mpi-profile/darshan-bg-f.conf
+	install -d $(DESTDIR)$(datarootdir)/ld-opts
+	install -m 644 share/ld-opts/darshan-base-ld-opts $(DESTDIR)$(datarootdir)/ld-opts/darshan-base-ld-opts
 ifdef BUILD_POSIX_MODULE
-	install -m 644 $(srcdir)/share/ld-opts/darshan-posix-ld-opts $(datarootdir)/ld-opts/darshan-posix-ld-opts
+	install -m 644 $(srcdir)/share/ld-opts/darshan-posix-ld-opts $(DESTDIR)$(datarootdir)/ld-opts/darshan-posix-ld-opts
 endif
 ifdef BUILD_STDIO_MODULE
-	install -m 644 $(srcdir)/share/ld-opts/darshan-stdio-ld-opts $(datarootdir)/ld-opts/darshan-stdio-ld-opts
+	install -m 644 $(srcdir)/share/ld-opts/darshan-stdio-ld-opts $(DESTDIR)$(datarootdir)/ld-opts/darshan-stdio-ld-opts
 endif
 ifdef BUILD_MPIIO_MODULE
-	install -m 644 $(srcdir)/share/ld-opts/darshan-mpiio-ld-opts $(datarootdir)/ld-opts/darshan-mpiio-ld-opts
+	install -m 644 $(srcdir)/share/ld-opts/darshan-mpiio-ld-opts $(DESTDIR)$(datarootdir)/ld-opts/darshan-mpiio-ld-opts
 endif
 ifdef BUILD_PNETCDF_MODULE
-	install -m 644 $(srcdir)/share/ld-opts/darshan-pnetcdf-ld-opts $(datarootdir)/ld-opts/darshan-pnetcdf-ld-opts
+	install -m 644 $(srcdir)/share/ld-opts/darshan-pnetcdf-ld-opts $(DESTDIR)$(datarootdir)/ld-opts/darshan-pnetcdf-ld-opts
 endif
 ifdef BUILD_HDF5_MODULE
-	install -m 644 $(srcdir)/share/ld-opts/darshan-hdf5-ld-opts $(datarootdir)/ld-opts/darshan-hdf5-ld-opts
+	install -m 644 $(srcdir)/share/ld-opts/darshan-hdf5-ld-opts $(DESTDIR)$(datarootdir)/ld-opts/darshan-hdf5-ld-opts
 endif
 ifdef BUILD_MDHIM_MODULE
-	install -m 644 $(srcdir)/share/ld-opts/darshan-mdhim-ld-opts $(datarootdir)/ld-opts/darshan-mdhim-ld-opts
+	install -m 644 $(srcdir)/share/ld-opts/darshan-mdhim-ld-opts $(DESTDIR)$(datarootdir)/ld-opts/darshan-mdhim-ld-opts
 endif
 ifdef ENABLE_MMAP_LOGS
-	install -m 755 share/darshan-mmap-epilog.sh $(datarootdir)/darshan-mmap-epilog.sh
+	install -m 755 share/darshan-mmap-epilog.sh $(DESTDIR)$(datarootdir)/darshan-mmap-epilog.sh
 endif
-	install -d $(libdir)/pkgconfig
-	install -m 644 lib/pkgconfig/darshan-runtime.pc $(libdir)/pkgconfig/darshan-runtime.pc
+	install -d $(DESTDIR)$(libdir)/pkgconfig
+	install -m 644 lib/pkgconfig/darshan-runtime.pc $(DESTDIR)$(libdir)/pkgconfig/darshan-runtime.pc
 
 clean::
 	rm -f *.o *.a lib/*.o lib/*.po lib/*.a lib/*.so


=====================================
darshan-util/Makefile.in
=====================================
@@ -1,15 +1,14 @@
 all: libdarshan-util.a darshan-null-logutils.o darshan-analyzer darshan-convert darshan-diff darshan-parser darshan-dxt-parser darshan-merge jenkins-hash-gen
 
-DESTDIR =
 srcdir = @srcdir@
 prefix = @prefix@
 exec_prefix = @exec_prefix@
-datarootdir = $(DESTDIR)@datarootdir@
-includedir = $(DESTDIR)@includedir@
-mandir = $(DESTDIR)@mandir@
-sbindir = $(DESTDIR)@sbindir@
-bindir = $(DESTDIR)@bindir@
-libdir = $(DESTDIR)@libdir@
+datarootdir = @datarootdir@
+includedir = @includedir@
+mandir = @mandir@
+sbindir = @sbindir@
+bindir = @bindir@
+libdir = @libdir@
 
 DARSHAN_LOG_FORMAT = $(srcdir)/../darshan-log-format.h
 DARSHAN_MOD_LOG_FORMATS = $(srcdir)/../darshan-posix-log-format.h \
@@ -173,56 +172,56 @@ darshan-merge: darshan-merge.c darshan-logutils.h $(DARSHAN_LOG_FORMAT) $(DARSHA
 #	$(CC) $(CFLAGS)  $(LDFLAGS) -lz $< -o $@
 
 install:: all
-	install -d $(bindir)
-	install -d $(libdir)
-	install -d $(includedir)
-	install -m 755 darshan-analyzer $(bindir)
-	install -m 755 darshan-convert $(bindir)
-	install -m 755 darshan-diff $(bindir)
-	install -m 755 darshan-parser $(bindir)
-	install -m 755 darshan-dxt-parser $(bindir)
-	install -m 755 darshan-merge $(bindir)
-	install -m 755 $(srcdir)/darshan-summary-per-file.sh $(bindir)
-	install -m 755 $(srcdir)/dxt_analyzer.py $(bindir)
-	install -m 755 libdarshan-util.a $(libdir)
+	install -d $(DESTDIR)$(bindir)
+	install -d $(DESTDIR)$(libdir)
+	install -d $(DESTDIR)$(includedir)
+	install -m 755 darshan-analyzer $(DESTDIR)$(bindir)
+	install -m 755 darshan-convert $(DESTDIR)$(bindir)
+	install -m 755 darshan-diff $(DESTDIR)$(bindir)
+	install -m 755 darshan-parser $(DESTDIR)$(bindir)
+	install -m 755 darshan-dxt-parser $(DESTDIR)$(bindir)
+	install -m 755 darshan-merge $(DESTDIR)$(bindir)
+	install -m 755 $(srcdir)/darshan-summary-per-file.sh $(DESTDIR)$(bindir)
+	install -m 755 $(srcdir)/dxt_analyzer.py $(DESTDIR)$(bindir)
+	install -m 755 libdarshan-util.a $(DESTDIR)$(libdir)
 ifeq ($(DARSHAN_ENABLE_SHARED),1)
-	install -m 755 libdarshan-util.so $(libdir)
+	install -m 755 libdarshan-util.so $(DESTDIR)$(libdir)
 endif
-	install -m 644 $(srcdir)/darshan-logutils.h $(includedir)
-	install -m 644 $(srcdir)/darshan-posix-logutils.h $(includedir)
-	install -m 644 $(srcdir)/darshan-mpiio-logutils.h $(includedir)
-	install -m 644 $(srcdir)/darshan-hdf5-logutils.h $(includedir)
-	install -m 644 $(srcdir)/darshan-pnetcdf-logutils.h $(includedir)
-	install -m 644 $(srcdir)/darshan-bgq-logutils.h $(includedir)
-	install -m 644 $(srcdir)/darshan-null-logutils.h $(includedir)
-	install -m 644 $(srcdir)/darshan-lustre-logutils.h $(includedir)
-	install -m 644 $(srcdir)/darshan-stdio-logutils.h $(includedir)
-	install -m 644 $(srcdir)/darshan-dxt-logutils.h $(includedir)
-	install -m 644 $(srcdir)/darshan-mdhim-logutils.h $(includedir)
-	install -m 644 $(srcdir)/../darshan-null-log-format.h $(includedir)
-	install -m 644 $(srcdir)/../darshan-posix-log-format.h $(includedir)
-	install -m 644 $(srcdir)/../darshan-mpiio-log-format.h $(includedir)
-	install -m 644 $(srcdir)/../darshan-hdf5-log-format.h $(includedir)
-	install -m 644 $(srcdir)/../darshan-pnetcdf-log-format.h $(includedir)
-	install -m 644 $(srcdir)/../darshan-bgq-log-format.h $(includedir)
-	install -m 644 $(srcdir)/../darshan-lustre-log-format.h $(includedir)
-	install -m 644 $(srcdir)/../darshan-stdio-log-format.h $(includedir)
-	install -m 644 $(srcdir)/../darshan-dxt-log-format.h $(includedir)
-	install -m 644 $(srcdir)/../darshan-mdhim-log-format.h $(includedir)
-	install -d $(includedir)/uthash-1.9.2
-	install -d $(includedir)/uthash-1.9.2/src
-	install -m 644 uthash-1.9.2/src/uthash.h $(includedir)/uthash-1.9.2/src/
-	install -m 644 $(DARSHAN_LOG_FORMAT) $(includedir)
-	install -m 755 darshan-job-summary/bin/darshan-job-summary.pl $(bindir)
-	install -d $(libdir)/TeX
-	install -m 644 $(srcdir)/darshan-job-summary/lib/TeX/Encode.pm $(libdir)/TeX/
-	install -d $(libdir)/Number
-	install -d $(libdir)/Number/Bytes
-	install -m 644 $(srcdir)/darshan-job-summary/lib/Number/Bytes/Human.pm $(libdir)/Number/Bytes
-	install -d $(datarootdir)
-	install -m 644 $(srcdir)/darshan-job-summary/share/* $(datarootdir)
-	install -d $(libdir)/pkgconfig
-	install -m 644 maint/darshan-util.pc $(libdir)/pkgconfig/darshan-util.pc
+	install -m 644 $(srcdir)/darshan-logutils.h $(DESTDIR)$(includedir)
+	install -m 644 $(srcdir)/darshan-posix-logutils.h $(DESTDIR)$(includedir)
+	install -m 644 $(srcdir)/darshan-mpiio-logutils.h $(DESTDIR)$(includedir)
+	install -m 644 $(srcdir)/darshan-hdf5-logutils.h $(DESTDIR)$(includedir)
+	install -m 644 $(srcdir)/darshan-pnetcdf-logutils.h $(DESTDIR)$(includedir)
+	install -m 644 $(srcdir)/darshan-bgq-logutils.h $(DESTDIR)$(includedir)
+	install -m 644 $(srcdir)/darshan-null-logutils.h $(DESTDIR)$(includedir)
+	install -m 644 $(srcdir)/darshan-lustre-logutils.h $(DESTDIR)$(includedir)
+	install -m 644 $(srcdir)/darshan-stdio-logutils.h $(DESTDIR)$(includedir)
+	install -m 644 $(srcdir)/darshan-dxt-logutils.h $(DESTDIR)$(includedir)
+	install -m 644 $(srcdir)/darshan-mdhim-logutils.h $(DESTDIR)$(includedir)
+	install -m 644 $(srcdir)/../darshan-null-log-format.h $(DESTDIR)$(includedir)
+	install -m 644 $(srcdir)/../darshan-posix-log-format.h $(DESTDIR)$(includedir)
+	install -m 644 $(srcdir)/../darshan-mpiio-log-format.h $(DESTDIR)$(includedir)
+	install -m 644 $(srcdir)/../darshan-hdf5-log-format.h $(DESTDIR)$(includedir)
+	install -m 644 $(srcdir)/../darshan-pnetcdf-log-format.h $(DESTDIR)$(includedir)
+	install -m 644 $(srcdir)/../darshan-bgq-log-format.h $(DESTDIR)$(includedir)
+	install -m 644 $(srcdir)/../darshan-lustre-log-format.h $(DESTDIR)$(includedir)
+	install -m 644 $(srcdir)/../darshan-stdio-log-format.h $(DESTDIR)$(includedir)
+	install -m 644 $(srcdir)/../darshan-dxt-log-format.h $(DESTDIR)$(includedir)
+	install -m 644 $(srcdir)/../darshan-mdhim-log-format.h $(DESTDIR)$(includedir)
+	install -d $(DESTDIR)$(includedir)/uthash-1.9.2
+	install -d $(DESTDIR)$(includedir)/uthash-1.9.2/src
+	install -m 644 uthash-1.9.2/src/uthash.h $(DESTDIR)$(includedir)/uthash-1.9.2/src/
+	install -m 644 $(DARSHAN_LOG_FORMAT) $(DESTDIR)$(includedir)
+	install -m 755 darshan-job-summary/bin/darshan-job-summary.pl $(DESTDIR)$(bindir)
+	install -d $(DESTDIR)$(libdir)/TeX
+	install -m 644 $(srcdir)/darshan-job-summary/lib/TeX/Encode.pm $(DESTDIR)$(libdir)/TeX/
+	install -d $(DESTDIR)$(libdir)/Number
+	install -d $(DESTDIR)$(libdir)/Number/Bytes
+	install -m 644 $(srcdir)/darshan-job-summary/lib/Number/Bytes/Human.pm $(DESTDIR)$(libdir)/Number/Bytes
+	install -d $(DESTDIR)$(datarootdir)
+	install -m 644 $(srcdir)/darshan-job-summary/share/* $(DESTDIR)$(datarootdir)
+	install -d $(DESTDIR)$(libdir)/pkgconfig
+	install -m 644 maint/darshan-util.pc $(DESTDIR)$(libdir)/pkgconfig/darshan-util.pc
 
 
 clean::



View it on GitLab: https://xgitlab.cels.anl.gov/darshan/darshan/compare/68b06d4ab098f4070bd279fae8a0e62e71d71d6a...91c2d4a6e6f10fea6c40c9f47f7143e2737dfa5f

-- 
View it on GitLab: https://xgitlab.cels.anl.gov/darshan/darshan/compare/68b06d4ab098f4070bd279fae8a0e62e71d71d6a...91c2d4a6e6f10fea6c40c9f47f7143e2737dfa5f
You're receiving this email because of your account on xgitlab.cels.anl.gov.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/darshan-commits/attachments/20200306/d27730ea/attachment-0001.html>


More information about the Darshan-commits mailing list