All of lore.kernel.org
 help / color / mirror / Atom feed
* dmraid/lib Makefile.in
@ 2010-05-30 17:41 zkabelac
  0 siblings, 0 replies; 6+ messages in thread
From: zkabelac @ 2010-05-30 17:41 UTC (permalink / raw)
  To: dm-cvs, dm-devel

CVSROOT:	/cvs/dm
Module name:	dmraid
Changes by:	zkabelac@sourceware.org	2010-05-30 17:41:22

Modified files:
	lib            : Makefile.in 

Log message:
	Remove full path for current build dir for LIB_STATIC LIB_SHARED
	Calculate DMRAID_LIB_VERSION from vars generated by configure.in (following patch)

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/dmraid/lib/Makefile.in.diff?cvsroot=dm&r1=1.13&r2=1.14

--- dmraid/lib/Makefile.in	2010/05/29 21:34:41	1.13
+++ dmraid/lib/Makefile.in	2010/05/30 17:41:22	1.14
@@ -54,7 +54,7 @@
 
 SOURCES2 = events/$(LIB_EVENTS_NAME).c
 
-LIB_STATIC = $(top_builddir)/lib/libdmraid.a
+LIB_STATIC = libdmraid.a
 LIB_EVENTS_NAME = libdmraid-events-isw
 USRLIB_RELPATH = $(shell echo $(abspath $(usrlibdir) $(libdir)) | \
   $(AWK) -f $(top_srcdir)/tools/relpath.awk)
@@ -65,7 +65,7 @@
 
 ifeq ("@KLIBC@", "no")
 	ifeq ("@STATIC_LINK@", "no")
-		LIB_SHARED=$(top_builddir)/lib/libdmraid.so
+		LIB_SHARED = libdmraid.so
 		LIB_EVENTS_SHARED=$(LIB_EVENTS_NAME).so
 		TARGETS += $(LIB_SHARED) $(LIB_EVENTS_SHARED)
 	endif
@@ -73,12 +73,10 @@
 
 all: $(TARGETS)
 
-# FIXME  Use major version for -soname
-$(LIB_SHARED): $(OBJECTS) $(top_srcdir)/lib/.export.sym
-	$(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(OBJECTS) \
-		-shared -Wl,-soname,$(notdir $@).1 \
-		-Wl,--version-script,$(top_srcdir)/lib/.export.sym \
-		-ldevmapper-event
+DMRAID_LIB_VERSION = $(DMRAID_LIB_MAJOR).$(DMRAID_LIB_MINOR).$(DMRAID_LIB_SUBMINOR)
+$(LIB_SHARED): $(OBJECTS) $(LD_DEPS)
+	$(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(OBJECTS) -ldevmapper-event \
+		-shared -Wl,-soname,$(notdir $@).$(DMRAID_LIB_MAJOR) $(CLDFLAGS)
 
 $(LIB_EVENTS_SHARED): $(OBJECTS2)
 	$(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(OBJECTS2) \

^ permalink raw reply	[flat|nested] 6+ messages in thread
* dmraid/lib Makefile.in
@ 2010-05-30 22:21 zkabelac
  0 siblings, 0 replies; 6+ messages in thread
From: zkabelac @ 2010-05-30 22:21 UTC (permalink / raw)
  To: dm-cvs, dm-devel

CVSROOT:	/cvs/dm
Module name:	dmraid
Changes by:	zkabelac@sourceware.org	2010-05-30 22:21:31

Modified files:
	lib            : Makefile.in 

Log message:
	Remove VPATH
	Create complete TARGETS before include of make.tmpl
	Move LIB_SHARED and LIB_EVENTS_SHARED outside of 'if' block
	Add support for DEVMAPPEREVENT_CFLAGS
	Create  soname.major  link as well in libdir

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/dmraid/lib/Makefile.in.diff?cvsroot=dm&r1=1.15&r2=1.16

--- dmraid/lib/Makefile.in	2010/05/30 19:15:26	1.15
+++ dmraid/lib/Makefile.in	2010/05/30 22:21:31	1.16
@@ -7,7 +7,6 @@
 srcdir = @srcdir@
 top_srcdir = @top_srcdir@
 top_builddir = @top_builddir@
-VPATH = @srcdir@
 
 SOURCES  = \
 	activate/activate.c \
@@ -56,22 +55,22 @@
 
 LIB_STATIC = libdmraid.a
 LIB_EVENTS_NAME = libdmraid-events-isw
+LIB_SHARED = libdmraid.so
+LIB_EVENTS_SHARED=$(LIB_EVENTS_NAME).so
 USRLIB_RELPATH = $(shell echo $(abspath $(usrlibdir) $(libdir)) | \
   $(AWK) -f $(top_srcdir)/tools/relpath.awk)
 
 TARGETS = $(LIB_STATIC)
 
-include $(top_builddir)/make.tmpl
-
 ifeq ("@KLIBC@", "no")
 	ifeq ("@STATIC_LINK@", "no")
-		LIB_SHARED = libdmraid.so
-		LIB_EVENTS_SHARED=$(LIB_EVENTS_NAME).so
 		TARGETS += $(LIB_SHARED) $(LIB_EVENTS_SHARED)
 	endif
 endif
 
-all: $(TARGETS)
+include $(top_builddir)/make.tmpl
+
+INCLUDES += $(DEVMAPPEREVENT_CFLAGS)
 
 DMRAID_LIB_VERSION = $(DMRAID_LIB_MAJOR).$(DMRAID_LIB_MINOR).$(DMRAID_LIB_SUBMINOR)
 $(LIB_SHARED): $(OBJECTS) $(LD_DEPS)
@@ -95,11 +94,13 @@
 install_$(LIB_SHARED): $(LIB_SHARED)
 	$(INSTALL_PROGRAM) -D $< $(DESTDIR)$(libdir)/$(<F).$(DMRAID_LIB_VERSION)
 	$(INSTALL_DIR) $(DESTDIR)$(usrlibdir)
+	$(LN_S) -f $(<F).$(DMRAID_LIB_VERSION) $(DESTDIR)$(libdir)/$(<F).$(DMRAID_LIB_MAJOR)
 	$(LN_S) -f $(USRLIB_RELPATH)$(<F).$(DMRAID_LIB_VERSION) $(DESTDIR)$(usrlibdir)/$(<F)
 
 remove_$(LIB_SHARED):
-	$(RM) $(DESTDIR)$(libdir)/$(notdir $(LIB_SHARED)).$(DMRAID_LIB_VERSION)
 	$(RM) $(DESTDIR)$(usrlibdir)/$(notdir $(LIB_SHARED))
+	$(RM) $(DESTDIR)$(libdir)/$(notdir $(LIB_SHARED)).$(DMRAID_LIB_MAJOR)
+	$(RM) $(DESTDIR)$(libdir)/$(notdir $(LIB_SHARED)).$(DMRAID_LIB_VERSION)
 
 install_$(LIB_STATIC): $(LIB_STATIC)
 	$(INSTALL_DATA) -D $< $(DESTDIR)$(usrlibdir)/$(LIB_STATIC)

^ permalink raw reply	[flat|nested] 6+ messages in thread
* dmraid/lib Makefile.in
@ 2010-05-28 12:35 zkabelac
  0 siblings, 0 replies; 6+ messages in thread
From: zkabelac @ 2010-05-28 12:35 UTC (permalink / raw)
  To: dm-cvs, dm-devel

CVSROOT:	/cvs/dm
Module name:	dmraid
Changes by:	zkabelac@sourceware.org	2010-05-28 12:35:02

Modified files:
	lib            : Makefile.in 

Log message:
	Reworked installation of libraries and plugins
	Using relpath.awk for path between  usrlibdir and libdir

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/dmraid/lib/Makefile.in.diff?cvsroot=dm&r1=1.11&r2=1.12

--- dmraid/lib/Makefile.in	2010/05/28 09:17:25	1.11
+++ dmraid/lib/Makefile.in	2010/05/28 12:35:01	1.12
@@ -47,18 +47,19 @@
 	format/partition/dos.c
 
 ifeq ("@STATIC_LINK@", "no")
-	SOURCES += register/dmreg.c
 # Dynamic linker library
-LIBS += -ldl
+	LIBS += -ldl
+	SOURCES += register/dmreg.c
 endif
 
 SOURCES2 = events/$(LIB_EVENTS_NAME).c
 
-LIB_STATIC=$(top_builddir)/lib/libdmraid.a
-LIB_EVENTS_NAME=libdmraid-events-isw
+LIB_STATIC = $(top_builddir)/lib/libdmraid.a
+LIB_EVENTS_NAME = libdmraid-events-isw
+USRLIB_RELPATH = $(shell echo $(abspath $(usrlibdir) $(libdir)) | \
+  $(AWK) -f $(top_srcdir)/tools/relpath.awk)
 
-TARGETS=$(LIB_STATIC)
-INSTALL_TARGETS=$(LIB_STATIC)
+TARGETS = $(LIB_STATIC)
 
 include $(top_builddir)/make.tmpl
 
@@ -67,43 +68,40 @@
 		LIB_SHARED=$(top_builddir)/lib/libdmraid.so
 		LIB_EVENTS_SHARED=$(LIB_EVENTS_NAME).so
 		TARGETS += $(LIB_SHARED) $(LIB_EVENTS_SHARED)
-		INSTALL_TARGETS += $(LIB_SHARED) $(LIB_EVENTS_SHARED)
 	endif
 endif
 
 all: $(TARGETS)
-	@echo $(TARGETS) $(INSTALL_TARGETS)
 
 $(LIB_EVENTS_SHARED): $(OBJECTS2)
 	$(CC) -o $@ $(INCLUDES) $(CFLAGS) $(LDFLAGS) $(OBJECTS2) \
 	  -shared  -Wl,-soname,$(notdir $@).$(DMRAID_LIB_VERSION) \
 	  $(LIB_SHARED) -ldevmapper-event -lpthread
 
-.PHONY: install_dmraid_libs remove_dmraid_libs
+.PHONY: $(addprefix install_,$(TARGETS)) $(addprefix remove_,$(TARGETS))
+
+install_$(LIB_EVENTS_SHARED): $(LIB_EVENTS_SHARED)
+	$(INSTALL_PROGRAM) -D $< $(DESTDIR)$(libdir)/device-mapper/$(<F)
+	$(LN_S) -f device-mapper/$(<F) $(DESTDIR)$(libdir)/$(<F)
+
+remove_$(LIB_EVENTS_SHARED):
+	$(RM) $(DESTDIR)$(libdir)/device-mapper/$(notdir $(LIB_EVENTS_SHARED))
+	$(RM) $(DESTDIR)$(libdir)/$(notdir $(LIB_EVENTS_SHARED))
+
+install_$(LIB_SHARED): $(LIB_SHARED)
+	$(INSTALL_PROGRAM) -D $< $(DESTDIR)$(libdir)/$(<F).$(DMRAID_LIB_VERSION)
+	$(INSTALL_DIR) $(DESTDIR)$(usrlibdir)
+	$(LN_S) -f $(USRLIB_RELPATH)$(<F).$(DMRAID_LIB_VERSION) $(DESTDIR)$(usrlibdir)/$(<F)
+
+remove_$(LIB_SHARED):
+	$(RM) $(DESTDIR)$(libdir)/$(notdir $(LIB_SHARED)).$(DMRAID_LIB_VERSION)
+	$(RM) $(DESTDIR)$(usrlibdir)/$(notdir $(LIB_SHARED))
+
+install_$(LIB_STATIC): $(LIB_STATIC)
+	$(INSTALL_DATA) -D $< $(DESTDIR)$(usrlibdir)/$(LIB_STATIC)
 
-install_dmraid_libs: $(INSTALL_TARGETS)
-	@echo "Installing $(INSTALL_TARGETS) in $(DESTDIR)$(libdir)"; \
-	$(INSTALL_DIR) $(DESTDIR)$(libdir); \
-	for f in $(INSTALL_TARGETS); \
-	do \
-		n=$$(basename $${f}) ; \
- 		if [[ "$$n" =~ .so$$ ]]; then \
-			$(INSTALL_PROGRAM) $$f $(DESTDIR)$(libdir)/$${n}.$(DMRAID_LIB_VERSION); \
-			$(LN_S) -f $${n}.$(DMRAID_LIB_VERSION) $(DESTDIR)$(libdir)/$${n}; \
-		else \
-			$(INSTALL_PROGRAM) $$f $(DESTDIR)$(libdir)/$${n}; \
-		fi \
-	done
-
-install: install_dmraid_libs
-
-remove_dmraid_libs:
-	@echo "Removing $(INSTALL_TARGETS) from $(libdir)"; \
-	for f in $(INSTALL_TARGETS); \
-	do \
-		n=$$(basename $${f}) ; \
-		$(RM) $(DESTDIR)$(libdir)/$${n}.$(DMRAID_LIB_VERSION); \
-		$(RM) $(DESTDIR)$(libdir)/$${n}; \
-	done
+remove_$(LIB_STATIC):
+	$(RM) $(DESTDIR)$(usrlibdir)/$(notdir $(LIB_STATIC))
 
-remove:	remove_dmraid_libs
+install: $(addprefix install_,$(TARGETS))
+remove: $(addprefix remove_,$(TARGETS))

^ permalink raw reply	[flat|nested] 6+ messages in thread
* dmraid/lib Makefile.in
@ 2010-05-28  8:46 zkabelac
  0 siblings, 0 replies; 6+ messages in thread
From: zkabelac @ 2010-05-28  8:46 UTC (permalink / raw)
  To: dm-cvs, dm-devel

CVSROOT:	/cvs/dm
Module name:	dmraid
Changes by:	zkabelac@sourceware.org	2010-05-28 08:46:04

Modified files:
	lib            : Makefile.in 

Log message:
	Use SOURCES2 for dmraid plugin
	OBJECTS is created by make.tmpl.in

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/dmraid/lib/Makefile.in.diff?cvsroot=dm&r1=1.9&r2=1.10

--- dmraid/lib/Makefile.in	2010/05/27 19:47:49	1.9
+++ dmraid/lib/Makefile.in	2010/05/28 08:46:04	1.10
@@ -52,7 +52,7 @@
 LIBS += -ldl
 endif
 
-OBJECTS=$(SOURCES:%.c=%.o)
+SOURCES2 = events/$(LIB_EVENTS_NAME).c
 
 LIB_STATIC=$(top_builddir)/lib/libdmraid.a
 LIB_EVENTS_NAME=libdmraid-events-isw
@@ -74,8 +74,8 @@
 all: $(TARGETS)
 	@echo $(TARGETS) $(INSTALL_TARGETS)
 
-$(LIB_EVENTS_SHARED):
-	$(CC) -o $@ $(INCLUDES) $(CFLAGS) $(LDFLAGS) events/$(LIB_EVENTS_NAME).c \
+$(LIB_EVENTS_SHARED): $(OBJECTS2)
+	$(CC) -o $@ $(INCLUDES) $(CFLAGS) $(LDFLAGS) $(OBJECTS2) \
 	  -shared  -Wl,-soname,$(notdir $@).$(DMRAID_LIB_VERSION) \
 	  $(LIB_SHARED) -ldevmapper-event -lpthread
 

^ permalink raw reply	[flat|nested] 6+ messages in thread
* dmraid/lib Makefile.in
@ 2010-05-27 19:47 zkabelac
  0 siblings, 0 replies; 6+ messages in thread
From: zkabelac @ 2010-05-27 19:47 UTC (permalink / raw)
  To: dm-cvs, dm-devel

CVSROOT:	/cvs/dm
Module name:	dmraid
Changes by:	zkabelac@sourceware.org	2010-05-27 19:47:49

Modified files:
	lib            : Makefile.in 

Log message:
	Use top_builddir
	Avoid linking libdmraid-events-isw to libdmraid (opened as plugin)
	Use new INSTALL

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/dmraid/lib/Makefile.in.diff?cvsroot=dm&r1=1.8&r2=1.9

--- dmraid/lib/Makefile.in	2010/05/27 14:28:48	1.8
+++ dmraid/lib/Makefile.in	2010/05/27 19:47:49	1.9
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2004-2005  Heinz Mauelshagen, Red Hat GmbH. All rights reserved.
+# Copyright (C) 2004-2010  Heinz Mauelshagen, Red Hat GmbH. All rights reserved.
 #
 # See file LICENSE at the top of this source tree for license information.
 #
@@ -17,7 +17,6 @@
 	device/scan.c \
 	device/scsi.c \
 	display/display.c \
-	events/libdmraid-events-isw.c \
 	format/format.c \
 	locking/locking.c \
 	log/log.c \
@@ -49,22 +48,24 @@
 
 ifeq ("@STATIC_LINK@", "no")
 	SOURCES += register/dmreg.c
+# Dynamic linker library
+LIBS += -ldl
 endif
 
 OBJECTS=$(SOURCES:%.c=%.o)
 
-LIB_STATIC=$(top_srcdir)/lib/libdmraid.a
+LIB_STATIC=$(top_builddir)/lib/libdmraid.a
 LIB_EVENTS_NAME=libdmraid-events-isw
 
 TARGETS=$(LIB_STATIC)
 INSTALL_TARGETS=$(LIB_STATIC)
 
-include $(top_srcdir)/make.tmpl
+include $(top_builddir)/make.tmpl
 
 ifeq ("@KLIBC@", "no")
 	ifeq ("@STATIC_LINK@", "no")
-		LIB_SHARED=$(top_srcdir)/lib/libdmraid.so
-		LIB_EVENTS_SHARED=$(top_srcdir)/lib/$(LIB_EVENTS_NAME).so
+		LIB_SHARED=$(top_builddir)/lib/libdmraid.so
+		LIB_EVENTS_SHARED=$(LIB_EVENTS_NAME).so
 		TARGETS += $(LIB_SHARED) $(LIB_EVENTS_SHARED)
 		INSTALL_TARGETS += $(LIB_SHARED) $(LIB_EVENTS_SHARED)
 	endif
@@ -74,26 +75,26 @@
 	@echo $(TARGETS) $(INSTALL_TARGETS)
 
 $(LIB_EVENTS_SHARED):
-	$(CC) events/$(LIB_EVENTS_NAME).c $(INCLUDES) $(CFLAGS) $(LDFLAGS) -shared  -Wl,-soname,$(notdir $@).$(DMRAID_LIB_VERSION) -o $@ -ldevmapper -ldevmapper-event $(LIB_SHARED) -lpthread
+	$(CC) -o $@ $(INCLUDES) $(CFLAGS) $(LDFLAGS) events/$(LIB_EVENTS_NAME).c \
+	  -shared  -Wl,-soname,$(notdir $@).$(DMRAID_LIB_VERSION) \
+	  $(LIB_SHARED) -ldevmapper-event -lpthread
 
 .PHONY: install_dmraid_libs remove_dmraid_libs
 
 install_dmraid_libs: $(INSTALL_TARGETS)
 	@echo "Installing $(INSTALL_TARGETS) in $(DESTDIR)$(libdir)"; \
-	mkdir -p $(DESTDIR)$(libdir); \
+	$(INSTALL_DIR) $(DESTDIR)$(libdir); \
 	for f in $(INSTALL_TARGETS); \
 	do \
 		n=$$(basename $${f}) ; \
  		if [[ "$$n" =~ .so$$ ]]; then \
-			$(INSTALL) -m 555 $(STRIP) \
-				$$f $(DESTDIR)$(libdir)/$${n}.@DMRAID_LIB_VERSION@; \
+			$(INSTALL_PROGRAM) $$f $(DESTDIR)$(libdir)/$${n}.@DMRAID_LIB_VERSION@; \
 			$(LN_S) -f $${n}.@DMRAID_LIB_VERSION@ $(DESTDIR)$(libdir)/$${n}; \
 		else \
-			$(INSTALL) -m 555 $(STRIP) $$f $(DESTDIR)$(libdir)/$${n}; \
+			$(INSTALL_PROGRAM) $$f $(DESTDIR)$(libdir)/$${n}; \
 		fi \
 	done
 
-
 install: install_dmraid_libs
 
 remove_dmraid_libs:
@@ -101,10 +102,8 @@
 	for f in $(INSTALL_TARGETS); \
 	do \
 		n=$$(basename $${f}) ; \
-		rm -f $(DESTDIR)$(libdir)/$${n}.@DMRAID_LIB_VERSION@; \
-		rm -f $(DESTDIR)$(libdir)/$${n}; \
+		$(RM) $(DESTDIR)$(libdir)/$${n}.@DMRAID_LIB_VERSION@; \
+		$(RM) $(DESTDIR)$(libdir)/$${n}; \
 	done
 
-
-
 remove:	remove_dmraid_libs

^ permalink raw reply	[flat|nested] 6+ messages in thread
* dmraid/lib Makefile.in
@ 2009-09-16 11:51 heinzm
  0 siblings, 0 replies; 6+ messages in thread
From: heinzm @ 2009-09-16 11:51 UTC (permalink / raw)
  To: dm-cvs, dm-devel

CVSROOT:	/cvs/dm
Module name:	dmraid
Changes by:	heinzm@sourceware.org	2009-09-16 11:51:32

Modified files:
	lib            : Makefile.in 

Log message:
	Avoid building dmreg.o

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/dmraid/lib/Makefile.in.diff?cvsroot=dm&r1=1.3&r2=1.4

--- dmraid/lib/Makefile.in	2009/09/16 11:45:12	1.3
+++ dmraid/lib/Makefile.in	2009/09/16 11:51:32	1.4
@@ -8,7 +8,7 @@
 top_srcdir = @top_srcdir@
 VPATH = @srcdir@
 
-SOURCES=\
+SOURCES  = \
 	activate/activate.c \
 	activate/devmapper.c \
 	device/ata.c \
@@ -45,7 +45,7 @@
 	format/ddf/ddf1_dump.c \
 	format/partition/dos.c
 
-ifeq ( "@STATIC_LINK", "no")
+ifeq ("@STATIC_LINK@", "no")
 	SOURCES += register/dmreg.c
 endif
 

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-05-30 22:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-30 17:41 dmraid/lib Makefile.in zkabelac
  -- strict thread matches above, loose matches on Subject: below --
2010-05-30 22:21 zkabelac
2010-05-28 12:35 zkabelac
2010-05-28  8:46 zkabelac
2010-05-27 19:47 zkabelac
2009-09-16 11:51 heinzm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.