Whamcloud - gitweb
Makefile.in: Revamp makefile so that it doesn't depend
authorTheodore Ts'o <tytso@mit.edu>
Sun, 18 Aug 2002 07:37:10 +0000 (03:37 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 18 Aug 2002 07:37:10 +0000 (03:37 -0400)
--enable-elf-shlibs.  We always build the shared library,
since it's meant to be used as a plugin library.

ChangeLog
Makefile.in
configure
configure.in
lib/evms/ChangeLog
lib/evms/Makefile.in

index 0e6ee3e..c4e6a76 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2002-08-18  Theodore Ts'o  <tytso@mit.edu>
+
+       * configure.in, configure: Add new substitution variable,
+               LINUX_CMT, which is '' on Linux systems, and '#' on
+               non-Linux systems.
+
+       * Makefile.in: On Linux systems, build lib/evms.
+
 2002-07-14  Theodore Ts'o  <tytso@mit.edu>
 
        * configure.in, configure: Remove test for the presence (or
index e03fcdd..42468f0 100644 (file)
@@ -9,9 +9,10 @@ INSTALL = @INSTALL@
 
 @RESIZER_CMT@RESIZE_DIR= resize
 @DEBUGFS_CMT@DEBUGFS_DIR= debugfs
+@LINUX_CMT@EVMS_DIR= lib/evms
 
 LIB_SUBDIRS=lib/et lib/ss lib/e2p lib/ext2fs lib/uuid # lib/finddev
-PROG_SUBDIRS=e2fsck $(DEBUGFS_DIR) misc $(RESIZE_DIR) tests/progs 
+PROG_SUBDIRS=e2fsck $(DEBUGFS_DIR) misc $(RESIZE_DIR) tests/progs $(EVMS_DIR)
 SUBDIRS=util $(LIB_SUBDIRS) $(PROG_SUBDIRS) tests
 
 SUBS= lib/ext2fs/ext2_types.h
index f8c6bc2..78399a1 100644 (file)
--- a/configure
+++ b/configure
@@ -4791,6 +4791,13 @@ EOF
 
        ;;
 esac
+LINUX_CMT="#"
+case "$host_os" in
+linux*)
+       LINUX_CMT=
+       ;;
+esac
+
 case "$host_os" in
 linux* | gnu*)
        if test "$prefix" = NONE -a "$root_prefix" = NONE ; then
@@ -4833,20 +4840,20 @@ fi
 
 
 echo $ac_n "checking whether linker accepts -static""... $ac_c" 1>&6
-echo "configure:4837: checking whether linker accepts -static" >&5
+echo "configure:4844: checking whether linker accepts -static" >&5
 if eval "test \"`echo '$''{'ac_cv_e2fsprogs_use_static'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   SAVE_LDFLAGS=$LDFLAGS; LDFLAGS="$LDFLAGS -static"
 cat > conftest.$ac_ext <<EOF
-#line 4843 "configure"
+#line 4850 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 int main() {
 fflush(stdout);
 ; return 0; }
 EOF
-if { (eval echo configure:4850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_e2fsprogs_use_static=yes
 else
@@ -5133,6 +5140,7 @@ s%@SIZEOF_INT@%$SIZEOF_INT%g
 s%@SIZEOF_LONG@%$SIZEOF_LONG%g
 s%@SIZEOF_LONG_LONG@%$SIZEOF_LONG_LONG%g
 s%@SOCKET_LIB@%$SOCKET_LIB%g
+s%@LINUX_CMT@%$LINUX_CMT%g
 s%@root_prefix@%$root_prefix%g
 s%@root_bindir@%$root_bindir%g
 s%@root_sbindir@%$root_sbindir%g
index 11035b7..c3e2d2b 100644 (file)
@@ -606,6 +606,16 @@ linux*)
        ;;
 esac
 dnl
+dnl Uncomment only if Linux
+dnl
+LINUX_CMT="#"
+case "$host_os" in
+linux*)
+       LINUX_CMT=
+       ;;
+esac
+AC_SUBST(LINUX_CMT)
+dnl
 dnl Linux and Hurd places root files in the / by default
 dnl
 case "$host_os" in
index 7f72728..965837a 100644 (file)
@@ -1,5 +1,9 @@
 2002-08-18  Theodore Ts'o  <tytso@mit.edu>
 
+       * Makefile.in: Revamp makefile so that it doesn't depend
+               --enable-elf-shlibs.  We always build the shared library,
+               since it's meant to be used as a plugin library.
+
        * fs_ext2.c (fs_fsck, fs_shrink, fs_expand): Change to use new
                calling convention of fsim_fsck.  Fixed bug in fs_shrink
                and f_expand where the shrink or expand would get aborted
index 0248c3f..a4c15b2 100644 (file)
@@ -7,7 +7,7 @@ INSTALL = @INSTALL@
 
 MAJOR_VERSION  = 1
 MINOR_VERSION  = 1
-PATCH_LEVEL    = 0
+PATCH_LEVEL    = 1
 EXTRAVERSION   =
 
 XTRA_CFLAGS= -I@srcdir@ -DMAJOR_VERSION=$(MAJOR_VERSION) -DMINOR_VERSION=$(MINOR_VERSION) -DPATCH_LEVEL=$(PATCH_LEVEL)
@@ -26,15 +26,34 @@ ELF_VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(PATCH_LEVEL)
 ELF_SO_VERSION = $(MAJOR_VERSION)
 ELF_IMAGE = libe2fsim
 ELF_MYDIR = evms
-ELF_INSTALL_DIR = $(root_libdir)
+ELF_INSTALL_DIR = $(root_libdir)/evms
 #ELF_OTHER_LIBS = -L../.. -lcom_err
 
-@MAKEFILE_LIBRARY@
-@MAKEFILE_ELF@
+ELF_LIB = $(ELF_IMAGE).$(ELF_VERSION).so
+ELF_SONAME = $(ELF_IMAGE).$(ELF_SO_VERSION).so
+
+all:: $(ELF_LIB)
+
+$(ELF_LIB): $(OBJS)
+       $(CC) --shared -o $(ELF_LIB) -Wl,-soname,$(ELF_SONAME) \
+               $(OBJS) $(ELF_OTHER_LIBS)
+
+installdirs:: 
+       $(top_srcdir)/mkinstalldirs $(DESTDIR)$(ELF_INSTALL_DIR) 
+
+install:: $(ELF_LIB) installdirs
+       $(INSTALL_PROGRAM) $(ELF_LIB) $(DESTDIR)$(ELF_INSTALL_DIR)/$(ELF_LIB)
+       $(STRIP) $(DESTDIR)$(ELF_INSTALL_DIR)/$(ELF_LIB)
+
+uninstall-shlibs uninstall::
+       $(RM) -f $(DESTDIR)$(ELF_INSTALL_DIR)/$(ELF_LIB) 
+
+clean::
+       $(RM) -f $(ELF_LIB)
+       $(RM) -f ../$(ELF_LIB) ../$(ELF_IMAGE).so ../$(ELF_SONAME)
 
 .c.o:
-       $(CC) $(ALL_CFLAGS) -c $< -o $@
-@ELF_CMT@      $(CC) $(ALL_CFLAGS) -fPIC -o elfshared/$*.o -c $<
+       $(CC) $(ALL_CFLAGS) -fPIC -c $< -o $@
 
 clean::
        $(RM) -f \#* *.s *.o *.a *~ *.bak core profiled/* checker/*