summaryrefslogtreecommitdiff
path: root/mpich-DESTDIR.patch
blob: 01a08b92b3c7153636124f5e715b3eb696ce494c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
--- mpich-1.2.1/util/mpiinstall.in.orig	Thu Aug 24 18:21:36 2000
+++ mpich-1.2.1/util/mpiinstall.in	Wed May 30 05:16:53 2001
@@ -38,22 +38,22 @@
 MAKE="@MAKE@"
 RSHCOMMAND="@RSHCOMMAND@"
 NOMPE=@NOMPE@
-SHAREDLIB_LOCALDIR=@SHAREDLIB_LOCALDIR@
+SHAREDLIB_LOCALDIR=${DESTDIR}@SHAREDLIB_LOCALDIR@
 MPIR_HOME=@MPIR_HOME@
 #
 # Default paths (set at configure time)
     exec_prefix=@exec_prefix@
-    bindir=@bindir@
-    sbindir=@sbindir@
-    includedir=@includedir@
-    sysconfdir=@sysconfdir@
-    libdir=@libdir@
-    sharedlib_dir=@sharedlib_dir@
-    messagecat_dir=@messagecat_dir@
-    mandir=@mandir@
-    htmldir=@htmldir@
-    datadir=@datadir@
-    docdir=@docdir@
+    bindir=${DESTDIR}@bindir@
+    sbindir=${DESTDIR}@sbindir@
+    includedir=${DESTDIR}@includedir@
+    sysconfdir=${DESTDIR}@sysconfdir@
+    libdir=${DESTDIR}@libdir@
+    sharedlib_dir=${DESTDIR}@sharedlib_dir@
+    messagecat_dir=${DESTDIR}@messagecat_dir@
+    mandir=${DESTDIR}@mandir@
+    htmldir=${DESTDIR}@htmldir@
+    datadir=${DESTDIR}@datadir@
+    docdir=${DESTDIR}@docdir@
 # Location of sources
 top_srcdir=@top_srcdir@
 #
@@ -427,7 +427,7 @@
 if [ -d $prefix ] ; then
     if [ $verbose = 1 ] ; then echo "using existing directory $prefix" ; fi
 else
-    MkDir $prefix 
+    MkDir ${DESTDIR}$prefix 
 fi
 
 # 
@@ -446,9 +446,9 @@
 MkDir $docdir
 MkDir $sysconfdir
 
-MkDir $prefix/examples
+MkDir ${DESTDIR}$prefix/examples
 if [ -n "$CPP_DIR" -a "$buildcpp" = 1 ] ; then 
-    MkDir $prefix/examples/$CPP_DIR
+    MkDir ${DESTDIR}$prefix/examples/$CPP_DIR
     MkDir $includedir/mpi2c++
 fi
 
@@ -868,7 +868,7 @@
 CopyFile $top_srcdir/util/cleanipcs $sbindir $XMODE
 #
 # Example programs
-CopyFile $top_srcdir/installtest/Makefile.in $prefix/examples
+CopyFile $top_srcdir/installtest/Makefile.in ${DESTDIR}$prefix/examples
 #
 # This SHOULD use mpireconfig...
 Savevar=$prefix
@@ -876,44 +876,44 @@
 # prefix=@prefix@ when ever prefix= starts in the first column (!)
 # It also does this with exec_prefix (!!)
      prefix=$APREFIX
-(cd $prefix/examples ; $bindir/mpireconfig Makefile )
-echo "(cd $prefix/examples ; $MAKE clean)" >> $UNINSTALLFILE
-echo "/bin/rm -f $prefix/examples/Makefile" >> $UNINSTALLFILE
+(cd ${DESTDIR}$prefix/examples ; $bindir/mpireconfig Makefile )
+echo "(cd ${DESTDIR}$prefix/examples ; $MAKE clean)" >> $UNINSTALLFILE
+echo "/bin/rm -f ${DESTDIR}$prefix/examples/Makefile" >> $UNINSTALLFILE
      prefix=$Savevar
-CopyFile $prefix/examples/Makefile $datadir/Makefile.sample
-CopyFile $top_srcdir/installtest/cpi.c $prefix/examples
-CopyFile $top_srcdir/installtest/cpip.c $prefix/examples
-CopyFile $top_srcdir/installtest/cpilog.c $prefix/examples
-CopyFile $top_srcdir/installtest/hello++.cc $prefix/examples
+CopyFile ${DESTDIR}$prefix/examples/Makefile $datadir/Makefile.sample
+CopyFile $top_srcdir/installtest/cpi.c ${DESTDIR}$prefix/examples
+CopyFile $top_srcdir/installtest/cpip.c ${DESTDIR}$prefix/examples
+CopyFile $top_srcdir/installtest/cpilog.c ${DESTDIR}$prefix/examples
+CopyFile $top_srcdir/installtest/hello++.cc ${DESTDIR}$prefix/examples
 if [ "@NOF77@" = "0" ] ; then
-    CopyFile $top_srcdir/installtest/pi3.f $prefix/examples
-    CopyFile $top_srcdir/installtest/pi3p.f $prefix/examples
+    CopyFile $top_srcdir/installtest/pi3.f ${DESTDIR}$prefix/examples
+    CopyFile $top_srcdir/installtest/pi3p.f ${DESTDIR}$prefix/examples
     if [ "@NO_F90@" = "0" ] ; then
-        CopyFile $top_srcdir/installtest/pi3f90.f90 $prefix/examples
+        CopyFile $top_srcdir/installtest/pi3f90.f90 ${DESTDIR}$prefix/examples
     fi
 fi
 if [ -s $top_srcdir/romio/test/simple.c ] ; then 
-    CopyFile $top_srcdir/romio/test/simple.c $prefix/examples/simpleio.c
+    CopyFile $top_srcdir/romio/test/simple.c ${DESTDIR}$prefix/examples/simpleio.c
 fi
-CopyFile $top_srcdir/installtest/README $prefix/examples
+CopyFile $top_srcdir/installtest/README ${DESTDIR}$prefix/examples
 #
 # Test build the examples
-$Show "(cd $prefix/examples ; /bin/rm -f mpirun ; \
+$Show "(cd ${DESTDIR}$prefix/examples ; /bin/rm -f mpirun ; \
 	  ln -s ../bin/mpirun mpirun )"
-echo "/bin/rm -f $prefix/examples/mpirun" >> $UNINSTALLFILE
+echo "/bin/rm -f ${DESTDIR}$prefix/examples/mpirun" >> $UNINSTALLFILE
 #
 echo "About to run installation test..."
-$Show "(cd $prefix/examples; $MAKE all ; $MAKE clean )"
+$Show "(cd ${DESTDIR}$prefix/examples; $MAKE all ; $MAKE clean )"
 if [ @SHAREDKIND@ != "ignore" ] ; then
     echo "About to run installation test for shared libraries ..."
-    $Show "(cd $prefix/examples; MPICH_USE_SHLIB="yes"; export MPICH_USE_SHLIB; $MAKE all ; $MAKE clean )"
+    $Show "(cd ${DESTDIR}$prefix/examples; MPICH_USE_SHLIB="yes"; export MPICH_USE_SHLIB; $MAKE all ; $MAKE clean )"
 fi
 #
 # This SHOULD use mpireconfig...
 Savevar=$prefix
 if [ -n "$CPP_DIR" -a "$buildcpp" = 1 ] ; then 
     # C++ Example programs 
-    CopyFile $top_srcdir/installtest/mpi-2-c++/Makefile.in $prefix/examples/$CPP_DIR
+    CopyFile $top_srcdir/installtest/mpi-2-c++/Makefile.in ${DESTDIR}$prefix/examples/$CPP_DIR
     #
     prefix=$APREFIX
     CPPEXDIR=$top_srcdir/$CPP_DIR/contrib/examples
@@ -921,25 +921,25 @@
     # the C++ examples Makefile, particularly the TEMPLATE_REP field
     # The intent here is to update the directories; but we also need
     # to update a few additional fields
-    (cd $prefix/examples/$CPP_DIR ; $bindir/mpireconfig Makefile )
-    echo "(cd $prefix/examples/$CPP_DIR ; $MAKE clean)" >> $UNINSTALLFILE
-    echo "/bin/rm -f $prefix/examples/$CPP_DIR/Makefile" >> $UNINSTALLFILE
+    (cd ${DESTDIR}$prefix/examples/$CPP_DIR ; $bindir/mpireconfig Makefile )
+    echo "(cd ${DESTDIR}$prefix/examples/$CPP_DIR ; $MAKE clean)" >> $UNINSTALLFILE
+    echo "/bin/rm -f ${DESTDIR}$prefix/examples/$CPP_DIR/Makefile" >> $UNINSTALLFILE
     prefix=$Savevar
-    CopyFile $CPPEXDIR/hello_world.cc $prefix/examples/$CPP_DIR
-    CopyFile $CPPEXDIR/ring.cc $prefix/examples/$CPP_DIR
-    CopyFile $CPPEXDIR/topology.cc $prefix/examples/$CPP_DIR
-    CopyFile $CPPEXDIR/user_bcast.cc $prefix/examples/$CPP_DIR
-    CopyFile $CPPEXDIR/chapter_10_mpi2.cc $prefix/examples/$CPP_DIR
-    CopyFile $CPPEXDIR/pi.cc $prefix/examples/$CPP_DIR
-    CopyFile $CPPEXDIR/README $prefix/examples/$CPP_DIR
+    CopyFile $CPPEXDIR/hello_world.cc ${DESTDIR}$prefix/examples/$CPP_DIR
+    CopyFile $CPPEXDIR/ring.cc ${DESTDIR}$prefix/examples/$CPP_DIR
+    CopyFile $CPPEXDIR/topology.cc ${DESTDIR}$prefix/examples/$CPP_DIR
+    CopyFile $CPPEXDIR/user_bcast.cc ${DESTDIR}$prefix/examples/$CPP_DIR
+    CopyFile $CPPEXDIR/chapter_10_mpi2.cc ${DESTDIR}$prefix/examples/$CPP_DIR
+    CopyFile $CPPEXDIR/pi.cc ${DESTDIR}$prefix/examples/$CPP_DIR
+    CopyFile $CPPEXDIR/README ${DESTDIR}$prefix/examples/$CPP_DIR
     #
     # Test build the C++ examples
-    $Show "(cd $prefix/examples/$CPP_DIR ; /bin/rm -f mpirun ; \
+    $Show "(cd ${DESTDIR}$prefix/examples/$CPP_DIR ; /bin/rm -f mpirun ; \
 	      ln -s ../../bin/mpirun mpirun )"
-    echo "/bin/rm -f $prefix/examples/$CPP_DIR/mpirun" >> $UNINSTALLFILE
+    echo "/bin/rm -f ${DESTDIR}$prefix/examples/$CPP_DIR/mpirun" >> $UNINSTALLFILE
     #
     echo "About to run C++ installation test..."
-    $Show "(cd $prefix/examples/$CPP_DIR; $MAKE ; $MAKE clean)"
+    $Show "(cd ${DESTDIR}$prefix/examples/$CPP_DIR; $MAKE ; $MAKE clean)"
     #
 fi
 #
--- mpich-1.2.1/mpe/sbin/mpeinstall.in.orig	Fri Aug 25 17:03:17 2000
+++ mpich-1.2.1/mpe/sbin/mpeinstall.in	Wed May 30 06:23:17 2001
@@ -29,12 +29,13 @@
 # Installation directories: Default paths (set at configure time)
 prefix=@prefix@
 exec_prefix=@exec_prefix@
-includedir=@includedir@
-libdir=@libdir@
-bindir=@bindir@
-sbindir=@sbindir@
-datadir=@datadir@
-sysconfdir=@sysconfdir@
+PREFIX=@prefix@
+includedir=${DESTDIR}@includedir@
+libdir=${DESTDIR}@libdir@
+bindir=${DESTDIR}@bindir@
+sbindir=${DESTDIR}@sbindir@
+datadir=${DESTDIR}@datadir@
+sysconfdir=${DESTDIR}@sysconfdir@
 
 PROF_LIBNAME=@PROF_LIBNAME@
 CPRP="@CPRP@"
@@ -83,7 +83,9 @@
     case "$arg" in
 	-prefix=*)
 	    prefix=`echo $arg | sed -e 's/-prefix=//g'` 
-	    prefix_override=1
+	    if [ "$prefix" != "$PREFIX" ]; then
+	    	prefix_override=1
+	    fi
 	    ;;
 	-uninstall=*)
 	    UNINSTALLFILE=`echo A$arg | sed -e 's/A-uninstall=//g'` 
@@ -345,7 +345,7 @@
 if [ -d $prefix ] ; then
     if [ $verbose = 1 ] ; then echo "using existing directory $prefix" ; fi
 else
-    MkDir $prefix
+    MkDir ${DESTDIR}$prefix
 fi
 
 # echo "prefix = $prefix"
--- mpich-1.2.1/mpe/viewers/sbin/install-viewers.in.orig	Fri Jul  7 22:59:03 2000
+++ mpich-1.2.1/mpe/viewers/sbin/install-viewers.in	Wed May 30 06:25:03 2001
@@ -26,9 +26,10 @@
 # Installation directories: Default paths (set at configure time)
 prefix=@prefix@
 exec_prefix=@exec_prefix@
-bindir=@bindir@
-sbindir=@sbindir@
-datadir=@datadir@
+PREFIX=@prefix@
+bindir=${DESTDIR}@bindir@
+sbindir=${DESTDIR}@sbindir@
+datadir=${DESTDIR}@datadir@
 
 # File access mode
 MODE=0664
@@ -70,8 +70,10 @@
     case "$arg" in
         -prefix=*)
             prefix=`echo $arg | sed -e 's/-prefix=//'`
-            prefix_override=1
-            ;;
+	    if [ "$prefix" != "$PREFIX" ]; then
+                prefix_override=1
+	    fi
+	    ;;
         -uninstall=*)
             UNINSTALLFILE=`echo A$arg | sed -e 's/A-uninstall=//g'`
 	    appendUninstall=1
@@ -333,7 +333,7 @@
 if [ -d $prefix ] ; then
     if [ $verbose = 1 ] ; then echo "using existing directory $prefix" ; fi
 else
-    MkDir $prefix
+    MkDir ${DESTDIR}$prefix
 fi
 
 if [ "$prefix_override" = 1 ] ; then