[Ocfs2-tools-commits] jlbec commits r1184 - in trunk: . libo2cb libo2dlm libo2dlm/include libocfs2 libocfs2/include o2cb_ctl ocfs2console/blkid ocfs2console/ocfs2interface

svn-commits@oss.oracle.com svn-commits at oss.oracle.com
Fri Apr 28 17:31:44 CDT 2006


Author: jlbec
Signed-off-by: mfasheh
Date: 2006-04-28 17:31:42 -0500 (Fri, 28 Apr 2006)
New Revision: 1184

Modified:
   trunk/Config.make.in
   trunk/Postamble.make
   trunk/Preamble.make
   trunk/libo2cb/Makefile
   trunk/libo2dlm/Makefile
   trunk/libo2dlm/include/o2dlm.h
   trunk/libo2dlm/o2dlm.c
   trunk/libocfs2/Makefile
   trunk/libocfs2/include/ocfs2.h
   trunk/o2cb_ctl/Makefile
   trunk/ocfs2console/blkid/Makefile
   trunk/ocfs2console/ocfs2interface/Makefile
Log:

o Add libraries and headers to "make install"

Signed-off-by: mfasheh



Modified: trunk/Config.make.in
===================================================================
--- trunk/Config.make.in	2006-04-21 21:40:08 UTC (rev 1183)
+++ trunk/Config.make.in	2006-04-28 22:31:42 UTC (rev 1184)
@@ -16,6 +16,8 @@
 
 bindir = @bindir@
 sbindir = @sbindir@
+includedir = @includedir@
+libdir = @libdir@
 datadir = @datadir@
 sysconfdir = @sysconfdir@
 mandir = @mandir@
@@ -31,7 +33,9 @@
 
 INSTALL = @INSTALL@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_LIBRARY = @INSTALL_PROGRAM@
 INSTALL_DATA = @INSTALL_DATA@
+INSTALL_HEADER = @INSTALL_DATA@
 
 LN_S = @LN_S@
 

Modified: trunk/Postamble.make
===================================================================
--- trunk/Postamble.make	2006-04-21 21:40:08 UTC (rev 1183)
+++ trunk/Postamble.make	2006-04-28 22:31:42 UTC (rev 1184)
@@ -54,18 +54,46 @@
 	$(MAKE) -C $@
 
 .PHONY: all-rules
-all-rules: subdirs $(LIBRARIES) $(BIN_PROGRAMS) $(SBIN_PROGRAMS) $(UNINST_PROGRAMS) $(MODULES) $(MANS)
+all-rules: subdirs $(UNINST_LIBRARIES) $(LIBRARIES) $(BIN_PROGRAMS) $(SBIN_PROGRAMS) $(UNINST_PROGRAMS) $(MODULES) $(MANS)
 
 
 INSTALL_SUBDIRS = $(addsuffix -install,$(SUBDIRS))
 
-.PHONY: install-rules install-subdirs $(INSTALL_RULES) install-bin-programs install-bin-extra install-sbin-programs install-sbin-extra
+.PHONY: install-rules install-subdirs $(INSTALL_RULES) install-libraries install-headers install-bin-programs install-bin-extra install-sbin-programs install-sbin-extra
 
 install-subdirs: $(INSTALL_SUBDIRS)
 
 $(INSTALL_SUBDIRS):
 	$(MAKE) -C $(subst -install,,$@) install
 
+install-libraries: $(LIBRARIES)
+ifdef LIBRARIES
+	$(SHELL) $(TOPDIR)/mkinstalldirs $(DESTDIR)$(libdir)
+	for lib in $(LIBRARIES); do \
+	  $(INSTALL_LIBRARY) $$lib $(DESTDIR)$(libdir)/$$lib; \
+	done
+endif
+
+ifeq ($(filter /%,$(HEADERS_SUBDIR)),)
+Hsubdir = /$(HEADERS_SUBDIR)
+else
+Hsubdir = $(HEADERS_SUBDIR)
+endif
+
+ifeq ($(filter include/%,$(HEADERS)),)
+Hinstall = 
+else
+Hinstall = include/
+endif
+
+install-headers: $(HEADERS)
+ifdef HEADERS
+	$(SHELL) $(TOPDIR)/mkinstalldirs $(DESTDIR)$(includedir)$(Hsubdir)
+	for hdr in $(patsubst include/%,%,$(HEADERS)); do \
+	  $(INSTALL_HEADER) $(Hinstall)$$hdr $(DESTDIR)$(includedir)$(Hsubdir)/$$hdr; \
+	done
+endif
+
 install-bin-programs: $(BIN_PROGRAMS)
 ifdef BIN_PROGRAMS
 	$(SHELL) $(TOPDIR)/mkinstalldirs $(DESTDIR)$(bindir)
@@ -108,7 +136,7 @@
 	done
 endif
 
-install-rules: install-subdirs $(INSTALL_RULES) install-bin-programs install-bin-extra install-sbin-programs install-sbin-extra install-mans
+install-rules: install-subdirs $(INSTALL_RULES) install-libraries install-headers install-bin-programs install-bin-extra install-sbin-programs install-sbin-extra install-mans
 
 
 CLEAN_SUBDIRS = $(addsuffix -clean,$(SUBDIRS))

Modified: trunk/Preamble.make
===================================================================
--- trunk/Preamble.make	2006-04-21 21:40:08 UTC (rev 1183)
+++ trunk/Preamble.make	2006-04-28 22:31:42 UTC (rev 1184)
@@ -7,10 +7,16 @@
 endif
 
 LIBRARIES =
-PROGRAMS =
+UNINST_LIBRARIES =
+BIN_PROGRAMS =
+SBIN_PROGRAMS =
+UNINST_PROGRAMS =
 MODULES =
+HEADERS =
 MANS =
 
+HEADERS_SUBDIR = 
+
 INSTALL_RULES =
 
 CLEAN_FILES =

Modified: trunk/libo2cb/Makefile
===================================================================
--- trunk/libo2cb/Makefile	2006-04-21 21:40:08 UTC (rev 1183)
+++ trunk/libo2cb/Makefile	2006-04-28 22:31:42 UTC (rev 1184)
@@ -51,6 +51,9 @@
 HFILES_GEN =		\
 	include/o2cb_err.h
 
+HEADERS_SUBDIR = o2cb
+HEADERS = $(HFILES) $(HFILES_GEN)
+
 OBJS = $(subst .c,.o,$(CFILES)) \
 	o2cb_err.o
 

Modified: trunk/libo2dlm/Makefile
===================================================================
--- trunk/libo2dlm/Makefile	2006-04-21 21:40:08 UTC (rev 1183)
+++ trunk/libo2dlm/Makefile	2006-04-28 22:31:42 UTC (rev 1184)
@@ -47,6 +47,9 @@
 HFILES_GEN =			\
 	include/o2dlm_err.h
 
+HEADERS_SUBDIR = o2dlm
+HEADERS = $(HFILES) $(HFILES_GEN)
+
 OBJS = $(subst .c,.o,$(CFILES)) \
 	o2dlm_err.o
 

Modified: trunk/libo2dlm/include/o2dlm.h
===================================================================
--- trunk/libo2dlm/include/o2dlm.h	2006-04-21 21:40:08 UTC (rev 1183)
+++ trunk/libo2dlm/include/o2dlm.h	2006-04-28 22:31:42 UTC (rev 1184)
@@ -33,13 +33,15 @@
 
 #include <stdlib.h>
 
-#include <kernel-list.h>
-
 #include <et/com_err.h>
 
 #if O2DLM_FLAT_INCLUDES
+#include "kernel-list.h"
+
 #include "o2dlm_err.h"
 #else
+#include <o2dlm/kernel-list.h>
+
 #include <o2dlm/o2dlm_err.h>
 #endif
 

Modified: trunk/libo2dlm/o2dlm.c
===================================================================
--- trunk/libo2dlm/o2dlm.c	2006-04-21 21:40:08 UTC (rev 1183)
+++ trunk/libo2dlm/o2dlm.c	2006-04-28 22:31:42 UTC (rev 1184)
@@ -38,8 +38,6 @@
 #include <sys/statfs.h>
 #include <string.h>
 
-#include <kernel-list.h>
-
 #include <o2dlm.h>
 
 #define USER_DLMFS_MAGIC	0x76a9f425

Modified: trunk/libocfs2/Makefile
===================================================================
--- trunk/libocfs2/Makefile	2006-04-21 21:40:08 UTC (rev 1183)
+++ trunk/libocfs2/Makefile	2006-04-28 22:31:42 UTC (rev 1184)
@@ -100,6 +100,9 @@
 HFILES_GEN =		\
 	include/ocfs2_err.h
 
+HEADERS_SUBDIR = ocfs2
+HEADERS = $(HFILES) $(HFILES_GEN)
+
 OBJS = $(subst .c,.o,$(CFILES)) \
 	ocfs2_err.o
 
@@ -111,7 +114,7 @@
 ocfs2_err.c ocfs2_err.h: ocfs2_err.et
 	compile_et ocfs2_err.et
 
-libocfs2.a: $(OBJS) $(LIBO2DLM_DEPS) $(LIBO2CB_DEPS)
+libocfs2.a: $(OBJS)
 	rm -f $@
 	$(AR) r $@ $^
 	$(RANLIB) $@

Modified: trunk/libocfs2/include/ocfs2.h
===================================================================
--- trunk/libocfs2/include/ocfs2.h	2006-04-21 21:40:08 UTC (rev 1183)
+++ trunk/libocfs2/include/ocfs2.h	2006-04-28 22:31:42 UTC (rev 1184)
@@ -48,17 +48,20 @@
 
 #include "byteorder.h"
 
-#include <kernel-list.h>
-#include <kernel-rbtree.h>
-
 #include <o2dlm.h>
 #include <o2cb.h>
 
 #if OCFS2_FLAT_INCLUDES
+#include "kernel-list.h"
+#include "kernel-rbtree.h"
+
 #include "ocfs2_err.h"
 #include "ocfs2_fs.h"
 #include "jbd.h"
 #else
+#include <ocfs2/kernel-list.h>
+#include <ocfs2/kernel-rbtree.h>
+
 #include <ocfs2/ocfs2_err.h>
 #include <ocfs2/ocfs2_fs.h>
 #include <ocfs2/jbd.h>

Modified: trunk/o2cb_ctl/Makefile
===================================================================
--- trunk/o2cb_ctl/Makefile	2006-04-21 21:40:08 UTC (rev 1183)
+++ trunk/o2cb_ctl/Makefile	2006-04-28 22:31:42 UTC (rev 1184)
@@ -33,13 +33,13 @@
 
 O2CB_CTL_OBJS = $(subst .c,.o,$(O2CB_CTL_CFILES))
 
-HEADERS = o2cb_config.h jconfig.h jiterator.h
+HFILES = o2cb_config.h jconfig.h jiterator.h
 
 CFILES = $(CLUSTERBO_CFILES) $(O2CB_CTL_CFILES)
 
 MANS = o2cb_ctl.8
 
-DIST_FILES = $(CFILES) $(HEADERS) o2cb_ctl.8.in
+DIST_FILES = $(CFILES) $(HFILES) o2cb_ctl.8.in
 
 DIST_RULES = dist-subdircreate
 

Modified: trunk/ocfs2console/blkid/Makefile
===================================================================
--- trunk/ocfs2console/blkid/Makefile	2006-04-21 21:40:08 UTC (rev 1183)
+++ trunk/ocfs2console/blkid/Makefile	2006-04-28 22:31:42 UTC (rev 1184)
@@ -36,7 +36,7 @@
 
 ifndef HAVE_BLKID
 
-LIBRARIES = libblkid-internal.a
+UNINST_LIBRARIES = libblkid-internal.a
 
 OBJS = $(subst .c,.o,$(CFILES))
 

Modified: trunk/ocfs2console/ocfs2interface/Makefile
===================================================================
--- trunk/ocfs2console/ocfs2interface/Makefile	2006-04-21 21:40:08 UTC (rev 1183)
+++ trunk/ocfs2console/ocfs2interface/Makefile	2006-04-28 22:31:42 UTC (rev 1184)
@@ -68,7 +68,8 @@
 OCFS2_OBJS = $(subst .c,.o,$(OCFS2_CFILES))
 O2CB_OBJS = $(subst .c,.o,$(O2CB_CFILES))
 
-LIBRARIES = plistmodule.so gidlemodule.so ocfs2module.so o2cbmodule.so
+# These are UNINST_ because the python install rule will handle them.
+UNINST_LIBRARIES = plistmodule.so gidlemodule.so ocfs2module.so o2cbmodule.so
 
 PYSRC = \
 	__init__.py		\
@@ -95,7 +96,7 @@
 	toolbar.py		\
 	tune.py
 
-PYLIB = $(LIBRARIES) $(PYSRC)
+PYLIB = $(UNINST_LIBRARIES) $(PYSRC)
 
 INSTALL_RULES = install-pylib
 




More information about the Ocfs2-tools-commits mailing list