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