]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Merged r9120 (Merge Makefile.{inplace,install}.am, and simplify installation
authorNicholas Nethercote <njn@valgrind.org>
Fri, 6 Feb 2009 23:27:16 +0000 (23:27 +0000)
committerNicholas Nethercote <njn@valgrind.org>
Fri, 6 Feb 2009 23:27:16 +0000 (23:27 +0000)
of libmpiwrap.so) from trunk.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9121

Makefile.inplace.am [deleted file]
Makefile.install.am
Makefile.tool.am
auxprogs/Makefile.am
coregrind/Makefile.am

diff --git a/Makefile.inplace.am b/Makefile.inplace.am
deleted file mode 100644 (file)
index c524832..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-# This is used by coregrind/Makefile.am and Makefile.tool.am for doing
-# "in-place" installs.  It copies $(noinst_PROGRAMS) into $inplacedir, doing
-# some magic renaming as it does.
-# There is similar code in Makefile.install.am (which describes how the
-# magic sed commands work).
-
-all-local:
-       if [ -n "$(noinst_PROGRAMS)" ] ; then \
-         for f in $(noinst_PROGRAMS); do \
-           name=`echo $$f | sed -e 's/-\([^-]*-[^-.]*\)\(\..*\)\?$$/\2/'`; \
-           plat=`echo $$f | sed -e 's/^.*-\([^-]*-[^-.]*\)\(\..*\)\?$$/\1/'`; \
-           mkdir -p $(inplacedir)/$$plat; \
-           rm -f $(inplacedir)/$$plat/$$name; \
-           ln -f -s ../../$(subdir)/$$f $(inplacedir)/$$plat/$$name; \
-         done ; \
-       fi
index b2facf1bb375b0b78ed16067d544acfe458326e9..07840f4601edf813ab16f4367d0952cbe54de952 100644 (file)
@@ -1,8 +1,22 @@
+# This is used by coregrind/Makefile.am and Makefile.tool.am for doing
+# "in-place" installs.  It copies $(noinst_PROGRAMS) into $inplacedir, doing
+# some magic renaming as it does.
+# The similar code below explains how the magic sed commands work.
+all-local:
+       if [ -n "$(noinst_PROGRAMS)" ] ; then \
+         for f in $(noinst_PROGRAMS); do \
+           name=`echo $$f | sed -e 's/-\([^-]*-[^-.]*\)\(\..*\)\{0,1\}$$/\2/'`; \
+           plat=`echo $$f | sed -e 's/^.*-\([^-]*-[^-.]*\)\(\..*\)\{0,1\}$$/\1/'`; \
+           mkdir -p $(inplacedir)/$$plat; \
+           rm -f $(inplacedir)/$$plat/$$name; \
+           ln -f -s ../../$(subdir)/$$f $(inplacedir)/$$plat/$$name; \
+         done ; \
+       fi
+
 # This is used by coregrind/Makefile.am and by <tool>/Makefile.am for doing
 # "make install".  It copies $(noinst_PROGRAMS) into $prefix/lib/valgrind/,
 # doing some magic renaming as it does.
 # It needs to be depended on by an 'install-exec-local' rule.
-# There is similar code in Makefile.inplace.am.
 #
 # Details about the renaming: the loop copies a bunch of files with
 # names of the form wurble-arch-os to $prefix/lib/valgrind/arch-os/wurble.
@@ -14,7 +28,6 @@
 # and not in
 #    $prefix/lib/valgrind/omega-x86-linux/exp
 # or similarly mutant place.
-
 install-exec-local-programs:
        if [ -n "$(noinst_PROGRAMS)" ] ; then \
          for f in $(noinst_PROGRAMS); do \
index 8e896f1bd2e28f470f7f6152c1b386c9ffcc913e..85e5cf522ecc1f334f9bc6ab8b95d5d5f6aa0a68 100644 (file)
@@ -3,7 +3,6 @@ SUBDIRS = . tests docs
 
 include $(top_srcdir)/Makefile.all.am
 include $(top_srcdir)/Makefile.flags.am
-include $(top_srcdir)/Makefile.inplace.am
 include $(top_srcdir)/Makefile.install.am
 
 
index d399db537f3206a33cf571ad2978183cbcf869ef..48fac83963bc484eeb022bbaf3a7f991426c643b 100644 (file)
@@ -62,18 +62,18 @@ endif
 ##
 noinst_PROGRAMS =
 if BUILD_MPIWRAP_PRI
-noinst_PROGRAMS       += libmpiwrap-@VGCONF_PLATFORM_PRI_CAPS@.so
-libmpiwrap-@VGCONF_PLATFORM_PRI_CAPS@.so: libmpiwrap.c
+noinst_PROGRAMS       += libmpiwrap-@VGCONF_ARCH_PRI@-@VGCONF_OS@.so
+libmpiwrap-@VGCONF_ARCH_PRI@-@VGCONF_OS@.so: libmpiwrap.c
        $(MPI_CC) $(HACKY_FLAGS_PRI) \
                -I../include \
-               -o libmpiwrap-@VGCONF_PLATFORM_PRI_CAPS@.so libmpiwrap.c
+               -o libmpiwrap-@VGCONF_ARCH_PRI@-@VGCONF_OS@.so libmpiwrap.c
 endif
 if BUILD_MPIWRAP_SEC
-noinst_PROGRAMS       += libmpiwrap-@VGCONF_PLATFORM_SEC_CAPS@.so
-libmpiwrap-@VGCONF_PLATFORM_SEC_CAPS@.so: libmpiwrap.c
+noinst_PROGRAMS       += libmpiwrap-@VGCONF_ARCH_SEC@-@VGCONF_OS@.so
+libmpiwrap-@VGCONF_ARCH_SEC@-@VGCONF_OS@.so: libmpiwrap.c
        $(MPI_CC) $(HACKY_FLAGS_SEC) \
                -I../include \
-               -o libmpiwrap-@VGCONF_PLATFORM_SEC_CAPS@.so libmpiwrap.c
+               -o libmpiwrap-@VGCONF_ARCH_SEC@-@VGCONF_OS@.so libmpiwrap.c
 endif
 
 
@@ -85,24 +85,12 @@ endif
 
 install-exec-local:
 if BUILD_MPIWRAP_PRI
-# convert (eg) X86_LINUX to x86-linux
-# really should use sed here, rather than assume tr is available
-       pD=`echo @VGCONF_PLATFORM_PRI_CAPS@ | tr A-Z_ a-z-` ; \
-               $(mkinstalldirs) $(DESTDIR)$(valdir)/$$pD; \
-       rm -f ./libmpiwrap.so; \
-       cp ./libmpiwrap-@VGCONF_PLATFORM_PRI_CAPS@.so ./libmpiwrap.so; \
-       $(INSTALL_PROGRAM) ./libmpiwrap.so \
-               $(DESTDIR)$(valdir)/$$pD; \
-       rm -f ./libmpiwrap.so
+       $(mkinstalldirs) $(DESTDIR)$(valdir)/@VGCONF_ARCH_PRI@-@VGCONF_OS@; \
+       $(INSTALL_PROGRAM) ./libmpiwrap-@VGCONF_ARCH_PRI@-@VGCONF_OS@.so $(DESTDIR)$(valdir)/@VGCONF_ARCH_PRI@-@VGCONF_OS@/libmpiwrap.so;
 endif
 if BUILD_MPIWRAP_SEC
-       pD=`echo @VGCONF_PLATFORM_SEC_CAPS@ | tr A-Z_ a-z-` ; \
-       $(mkinstalldirs) $(DESTDIR)$(valdir)/$$pD; \
-       rm -f ./libmpiwrap.so; \
-       cp ./libmpiwrap-@VGCONF_PLATFORM_SEC_CAPS@.so ./libmpiwrap.so; \
-       $(INSTALL_PROGRAM) ./libmpiwrap.so \
-               $(DESTDIR)$(valdir)/$$pD; \
-       rm -f ./libmpiwrap.so
+       $(mkinstalldirs) $(DESTDIR)$(valdir)/@VGCONF_ARCH_PRI@-@VGCONF_OS@; \
+       $(INSTALL_PROGRAM) ./libmpiwrap-@VGCONF_ARCH_SEC@-@VGCONF_OS@.so $(DESTDIR)$(valdir)/@VGCONF_ARCH_SEC@-@VGCONF_OS@/libmpiwrap.so;
 endif
 
 
@@ -110,28 +98,28 @@ endif
 ## It would seem that using nodist_SOURCES is the right fix, but
 ## I can't figure out how to do it.
 ##
-#nodist_SOURCES        = libmpiwrap-@VGCONF_PLATFORM_PRI_CAPS@.c
-#nodist_SOURCES        = libmpiwrap-@VGCONF_PLATFORM_SEC_CAPS@.c
+#nodist_SOURCES        = libmpiwrap-@VGCONF_ARCH_PRI@-@VGCONF_OS@.c
+#nodist_SOURCES        = libmpiwrap-@VGCONF_ARCH_SEC@-@VGCONF_OS@.c
 
 libmpiwrap-.c:
        rm -f libmpiwrap-.c
        touch libmpiwrap-.c
 
-libmpiwrap-@VGCONF_PLATFORM_PRI_CAPS@.c:
-       rm -f libmpiwrap-@VGCONF_PLATFORM_PRI_CAPS@.c
-       touch libmpiwrap-@VGCONF_PLATFORM_PRI_CAPS@.c
+libmpiwrap-@VGCONF_ARCH_PRI@-@VGCONF_OS@.c:
+       rm -f libmpiwrap-@VGCONF_ARCH_PRI@-@VGCONF_OS@.c
+       touch libmpiwrap-@VGCONF_ARCH_PRI@-@VGCONF_OS@.c
 
 if VGCONF_HAVE_PLATFORM_SEC_CAPS
-libmpiwrap-@VGCONF_PLATFORM_SEC_CAPS@.c:
-       rm -f libmpiwrap-@VGCONF_PLATFORM_SEC_CAPS@.c
-       touch libmpiwrap-@VGCONF_PLATFORM_SEC_CAPS@.c
+libmpiwrap-@VGCONF_ARCH_SEC@-@VGCONF_OS@.c:
+       rm -f libmpiwrap-@VGCONF_ARCH_SEC@-@VGCONF_OS@.c
+       touch libmpiwrap-@VGCONF_ARCH_SEC@-@VGCONF_OS@.c
 endif
 
 ## cleanery
 clean-local:
        rm -f libmpiwrap-.c \
-       libmpiwrap-@VGCONF_PLATFORM_PRI_CAPS@.c \
-       libmpiwrap-@VGCONF_PLATFORM_SEC_CAPS@.c
+       libmpiwrap-@VGCONF_ARCH_PRI@-@VGCONF_OS@.c \
+       libmpiwrap-@VGCONF_ARCH_SEC@-@VGCONF_OS@.c
 
 #
 #----------------------------------------------------------
index d13d40baea5fc9b1cdd1ed5e373b1197a4528626..98c6c259f9c14dd2ed9e1569d87968e025ad9102 100644 (file)
@@ -5,7 +5,6 @@
 
 include $(top_srcdir)/Makefile.all.am
 include $(top_srcdir)/Makefile.flags.am
-include $(top_srcdir)/Makefile.inplace.am
 include $(top_srcdir)/Makefile.install.am