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
|
diff -urN pvfs-2.7.0/Makefile.in pvfs-2.7.0_patched/Makefile.in
--- pvfs-2.7.0/Makefile.in 2008-02-28 10:27:37.000000000 -0500
+++ pvfs-2.7.0_patched/Makefile.in 2008-02-28 10:27:35.000000000 -0500
@@ -52,10 +52,14 @@
# define a few generic variables that we need to use
DESTDIR =
srcdir = @srcdir@
-prefix = $(DESTDIR)@prefix@
+prefix = @prefix@
datarootdir = $(DESTDIR)@datarootdir@
mandir = $(DESTDIR)@mandir@
-exec_prefix = $(DESTDIR)@exec_prefix@
+exec_prefix = @exec_prefix@
+sbindir = $(DESTDIR)@sbindir@
+bindir = $(DESTDIR)@bindir@
+libdir = $(DESTDIR)@libdir@
+includedir = $(DESTDIR)@includedir@
VPATH = $(srcdir)
SHELL = @SHELL@
@@ -63,6 +67,7 @@
# TODO: should probably check for bison and flex in configure
BISON = bison
FLEX = flex
+LN_S = ln -s
BUILD_BMI_TCP = @BUILD_BMI_TCP@
BUILD_GM = @BUILD_GM@
BUILD_MX = @BUILD_MX@
@@ -162,6 +167,9 @@
REDHAT_RELEASE = @REDHAT_RELEASE@
NPTL_WORKAROUND = @NPTL_WORKAROUND@
STRICT_CFLAGS = @STRICT_CFLAGS@
+SO_FULL = 2.0.0
+SO_MAJOR = 2
+
# for Solaris:
# LIBS += -lsocket -lnsl
@@ -435,8 +443,10 @@
LIBRARIES :=
LIBRARIES_THREADED :=
ifeq ($(build_shared),yes)
-LIBRARIES_SHARED = lib/libpvfs2.so
+LIBRARIES_SHARED = lib/libpvfs2.so.$(SO_FULL)
LIBRARIES += $(LIBRARIES_SHARED)
+LIBRARIES_THREADED_SHARED = lib/libpvfs2-threaded.so.$(SO_FULL)
+LIBRARIES_THREADED += $(LIBRARIES_THREADED_SHARED)
endif
ifeq ($(build_static),yes)
LIBRARIES_STATIC = lib/libpvfs2.a
@@ -627,16 +637,16 @@
$(E)ar rcs $@ $(LIBTHREADEDOBJS)
# rule for building the pvfs2 library
-lib/libpvfs2.so: $(LIBPICOBJS)
+lib/libpvfs2.so.$(SO_FULL): $(LIBPICOBJS)
$(Q) " LDSO $@"
$(E)$(INSTALL) -d lib
- $(E)$(LDSHARED) -o $@ $(LIBPICOBJS)
+ $(E)$(LDSHARED) -Wl,-soname,libpvfs2.so -o $@ $(LIBPICOBJS)
# rule for building the pvfs2 _multithreaded_ library
-lib/libpvfs2-threaded.so: $(LIBTHREADEDPICOBJS)
+lib/libpvfs2-threaded.so.$(SO_FULL): $(LIBTHREADEDPICOBJS)
$(Q) " LDSO $@"
$(E)$(INSTALL) -d lib
- $(E)$(LDSHARED) -o $@ $(LIBTHREADEDPICOBJS)
+ $(E)$(LDSHARED) -Wl,-soname,libpvfs2-threaded.so -o $@ $(LIBTHREADEDPICOBJS)
# rule for building the pvfs2 server library
lib/libpvfs2-server.a: $(SERVEROBJS)
@@ -713,7 +723,7 @@
# all applications depend on the pvfs2 library
$(ADMINTOOLS): %: %.o $(LIBRARIES)
-$(ADMINTOOLS_SERVER): %: %.o $(LIBRARIES) lib/libpvfs2-server.a
+$(ADMINTOOLS_SERVER): %: %.o $(LIBRARIES)
$(KERNAPPS): %: %.o $(LIBRARIES)
$(KERNAPPSTHR): %: %.o $(LIBRARIES_THREADED)
@@ -769,7 +779,7 @@
$(E)rm -f $(LIBOBJS) $(LIBTHREADEDOBJS) $(SERVEROBJS) $(MISCOBJS) \
$(LIBRARIES) $(LIBRARIES_THREADED) $(DEPENDS) $(SERVER) \
$(ADMINOBJS) $(ADMINOBJS_SERVER) $(ADMINTOOLS)\
- $(ADMINTOOLS_SERVER) lib/libpvfs2-server.a\
+ $(ADMINTOOLS_SERVER) \
$(KERNAPPOBJS) $(KERNAPPS) $(KERNAPPSTHR) \
$(VISS) $(VISMISCOBJS) $(VISOBJS) $(VISDEPENDS)\
$(VISMISCDEPENDS) $(KARMAOBJS) $(LIBPICOBJS) \
@@ -883,43 +893,48 @@
install -m 644 $(srcdir)/doc/man/*.5 $(mandir)/man5
install:: all install_doc
- install -d $(prefix)/include
- install -m 644 $(srcdir)/include/pvfs2.h $(prefix)/include
- install -m 644 $(srcdir)/include/pvfs2-request.h $(prefix)/include
- install -m 644 $(srcdir)/include/pvfs2-debug.h $(prefix)/include
- install -m 644 $(srcdir)/include/pvfs2-sysint.h $(prefix)/include
- install -m 644 $(srcdir)/include/pvfs2-mgmt.h $(prefix)/include
- install -m 644 $(srcdir)/include/pvfs2-types.h $(prefix)/include
- install -m 644 $(srcdir)/include/pvfs2-util.h $(prefix)/include
- install -m 644 $(srcdir)/include/pvfs2-encode-stubs.h $(prefix)/include
-
- install -d $(prefix)/lib
- install -m 755 $(LIBRARIES) $(prefix)/lib
+ install -d $(includedir)
+ install -m 644 $(srcdir)/include/pvfs2.h $(includedir)
+ install -m 644 $(srcdir)/include/pvfs2-request.h $(includedir)
+ install -m 644 $(srcdir)/include/pvfs2-debug.h $(includedir)
+ install -m 644 $(srcdir)/include/pvfs2-sysint.h $(includedir)
+ install -m 644 $(srcdir)/include/pvfs2-mgmt.h $(includedir)
+ install -m 644 $(srcdir)/include/pvfs2-types.h $(includedir)
+ install -m 644 $(srcdir)/include/pvfs2-util.h $(includedir)
+ install -m 644 $(srcdir)/include/pvfs2-encode-stubs.h $(includedir)
+
+ install -d $(libdir)
+ install -m 755 $(LIBRARIES) $(libdir)
+ install -m 755 $(LIBRARIES_THREADED) $(libdir)
+ $(LN_S) libpvfs2-threaded.so.$(SO_FULL) $(libdir)/libpvfs2-threaded.so.$(SO_MAJOR)
+ $(LN_S) libpvfs2-threaded.so.$(SO_FULL) $(libdir)/libpvfs2-threaded.so
+ $(LN_S) libpvfs2.so.$(SO_FULL) $(libdir)/libpvfs2.so.$(SO_MAJOR)
+ $(LN_S) libpvfs2.so.$(SO_FULL) $(libdir)/libpvfs2.so
ifdef TARGET_OS_DARWIN
# TOC needs to be regenerated in libs after they get moved
ranlib $(patsubst %,$(prefix)/%,$(LIBRARIES))
endif
- install -d $(prefix)/bin
- install -m 755 $(ADMINTOOLS) $(prefix)/bin
- install -m 755 src/apps/admin/pvfs2-config $(prefix)/bin
+ install -d $(bindir)
+ install -m 755 $(ADMINTOOLS) $(bindir)
+ install -m 755 src/apps/admin/pvfs2-config $(bindir)
@# if we ever auto-generate genconfig, remove the $(srcdir)
- install -m 755 $(srcdir)/src/apps/admin/pvfs2-genconfig $(prefix)/bin
- install -m 755 $(srcdir)/src/apps/admin/pvfs2-config-convert $(prefix)/bin
+ install -m 755 $(srcdir)/src/apps/admin/pvfs2-genconfig $(bindir)
+ install -m 755 $(srcdir)/src/apps/admin/pvfs2-config-convert $(bindir)
ifdef BUILD_KARMA
- install -m 755 $(KARMA) $(prefix)/bin
+ install -m 755 $(KARMA) $(bindir)
endif
- install -d $(prefix)/sbin
+ install -d $(sbindir)
ifdef BUILD_SERVER
- install -m 755 $(ADMINTOOLS_SERVER) $(prefix)/bin
+ install -m 755 $(ADMINTOOLS_SERVER) $(bindir)
ifeq ($(NPTL_WORKAROUND),)
- install -m 755 $(SERVER) $(prefix)/sbin
+ install -m 755 $(SERVER) $(sbindir)
else
- install -m 755 $(srcdir)/$(SERVER_STUB) $(prefix)/sbin/pvfs2-server
- install -m 755 $(SERVER) $(prefix)/sbin/pvfs2-server.bin
+ install -m 755 $(srcdir)/$(SERVER_STUB) $(sbindir)/pvfs2-server
+ install -m 755 $(SERVER) $(sbindir)/pvfs2-server.bin
endif
endif
@@ -939,9 +954,12 @@
install -m 755 src/kernel/linux-2.6/pvfs2.ko $(KMOD_DIR)
.PHONY: kmod_install
-kmod_install: kmod kernapps just_kmod_install
- install -d $(prefix)/sbin
- install -m 755 $(KERNAPPS) $(prefix)/sbin
+kmod_install: kmod kernapps_install just_kmod_install
+
+.PHONY: kernapps_install
+kernapps_install: kernapps
+ install -d $(sbindir)
+ install -m 755 $(KERNAPPS) $(sbindir)
endif
ifneq (,$(LINUX24_KERNEL_SRC))
@@ -960,12 +978,15 @@
install -m 755 src/kernel/linux-2.4/pvfs2.o $(KMOD_DIR)
.PHONY: kmod24_install
-kmod24_install: kmod24 kernapps just_kmod24_install
- install -d $(prefix)/sbin
- install -m 755 $(KERNAPPS) $(prefix)/sbin
- install -m 755 src/apps/kernel/linux/mount.pvfs2 $(prefix)/sbin
+kmod24_install: kmod24 kernapps_install just_kmod24_install
+
+.PHONY: kernapps_install
+kernapps_install: kernapps
+ install -d $(sbindir)
+ install -m 755 $(KERNAPPS) $(sbindir)
+ install -m 755 src/apps/kernel/linux/mount.pvfs2 $(sbindir)
@echo ""
@echo "For improved linux-2.4 support,"
- @echo "install $(prefix)/sbin/mount.pvfs2 to /sbin/mount.pvfs2"
+ @echo "install $(sbindir)/mount.pvfs2 to /sbin/mount.pvfs2"
@echo ""
endif
|