1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

further progress

This commit is contained in:
Alasdair Kergon 2008-11-01 02:19:19 +00:00
parent f58b35b5a4
commit 0782ad5002
15 changed files with 108 additions and 28 deletions

View File

@ -22,7 +22,7 @@ ifeq ("@INTL@", "yes")
SUBDIRS += po
endif
SUBDIRS += lib tools daemons
SUBDIRS += lib tools daemons libdm
ifeq ($(MAKECMDGOALS),distclean)
SUBDIRS += daemons/clvmd \
@ -40,11 +40,14 @@ endif
include make.tmpl
libdm: include
lib: libdm
daemons: lib
lib: include
tools: lib
po: tools daemons
tools.device-mapper: libdm.device-mapper
ifeq ("@INTL@", "yes")
lib.pofile: include.pofile
tools.pofile: lib.pofile

View File

@ -159,6 +159,24 @@ if test x$GROUP != x; then
GROUP="-g $GROUP"
fi
################################################################################
dnl -- Setup device node ownership
AC_MSG_CHECKING(device node uid)
AC_ARG_WITH(device-uid,
[ --with-device-uid=UID Set the owner used for new device nodes [[UID=0]] ],
[ DM_DEVICE_UID="$withval" ], [ DM_DEVICE_UID="0" ] )
AC_MSG_RESULT($DM_DEVICE_UID)
################################################################################
dnl -- Setup device group ownership
AC_MSG_CHECKING(device node gid)
AC_ARG_WITH(device-gid,
[ --with-device-gid=UID Set the group used for new device nodes [[GID=0]] ],
[ DM_DEVICE_GID="$withval" ], [ DM_DEVICE_GID="0" ] )
AC_MSG_RESULT($DM_DEVICE_GID)
################################################################################
dnl -- Setup device mode
AC_MSG_CHECKING(device node mode)

View File

@ -35,6 +35,8 @@ distclean:
pofile: all
device-mapper: all
clean:
install:

View File

@ -26,6 +26,9 @@
/* Path to dmeventd pidfile. */
#undef DMEVENTD_PIDFILE
/* Library version */
#undef DM_LIB_VERSION
/* Define to 1 if you have `alloca', as a function or macro. */
#undef HAVE_ALLOCA

View File

@ -26,11 +26,17 @@
#define _FILE_OFFSET_BITS 64
#include "intl.h"
#include "libdevmapper.h"
#include "lvm-logging.h"
#include "lvm-types.h"
#include "lvm-wrappers.h"
#include "util.h"
#include <libdevmapper.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/stat.h>
#endif

View File

@ -32,7 +32,7 @@ SOURCES =\
regex/ttree.c \
$(interface)/libdm-iface.c
INCLUDES = -I$(interface)
INCLUDES = -I$(interface) -I.
LIB_STATIC = $(interface)/libdevmapper.a
@ -48,6 +48,8 @@ DEFS += -DDM_DEVICE_UID=@DM_DEVICE_UID@ -DDM_DEVICE_GID=@DM_DEVICE_GID@ \
include ../make.tmpl
device-mapper: all
.PHONY: install_dynamic install_static install_include \
install_ioctl install_ioctl_static \
install_pkgconfig

View File

@ -17,8 +17,8 @@
#define _LINUX_LIBDM_COMPAT_H
#include "kdev_t.h"
#include "dm-ioctl.h"
#include <inttypes.h>
#include <linux/dm-ioctl.h>
#include <sys/ioctl.h>
struct dm_task;

View File

@ -35,7 +35,7 @@
# define MKDEV(x,y) makedev((x),(y))
#endif
#include <linux/dm-ioctl.h>
#include "dm-ioctl.h"
/*
* Ensure build compatibility.

View File

@ -18,14 +18,13 @@
#include "libdm-common.h"
#include "list.h"
#include "kdev_t.h"
#include "dm-ioctl.h"
#include <stdarg.h>
#include <sys/param.h>
#include <sys/ioctl.h>
#include <fcntl.h>
#include <linux/dm-ioctl.h>
#ifdef linux
# include <linux/fs.h>
#endif

View File

@ -17,12 +17,11 @@
#include "libdm-common.h"
#include "list.h"
#include "kdev_t.h"
#include "dm-ioctl.h"
#include <stdarg.h>
#include <sys/param.h>
#include <linux/dm-ioctl.h>
#define MAX_TARGET_PARAMSIZE 500000
/* FIXME Fix interface so this is used only by LVM */

View File

@ -109,12 +109,15 @@ DEPS = $(top_srcdir)/make.tmpl $(top_srcdir)/VERSION Makefile $(INC_LNS)
OBJECTS = $(SOURCES:%.c=%.o)
POTFILES = $(SOURCES:%.c=%.pot)
.PHONY: all install install_cluster pofile distclean clean cflow
.PHONY: all install install_cluster pofile distclean clean cflow device-mapper
.PHONY: $(SUBDIRS) $(SUBDIRS.install) $(SUBDIRS.clean) $(SUBDIRS.distclean)
.PHONY: $(SUBDIRS.pofile) $(SUBDIRS.install_cluster) $(SUBDIRS.cflow)
.PHONY: $(SUBDIRS.device-mapper) $(SUBDIRS.install-device-mapper)
SUBDIRS.device-mapper := $(SUBDIRS:=.device-mapper)
SUBDIRS.install := $(SUBDIRS:=.install)
SUBDIRS.install_cluster := $(SUBDIRS:=.install_cluster)
SUBDIRS.install_device-mapper := $(SUBDIRS:=.install_device-mapper)
SUBDIRS.pofile := $(SUBDIRS:=.pofile)
SUBDIRS.cflow := $(SUBDIRS:=.cflow)
SUBDIRS.clean := $(SUBDIRS:=.clean)
@ -124,18 +127,27 @@ TARGETS += $(LIB_SHARED) $(LIB_STATIC)
all: $(SUBDIRS) $(TARGETS)
device-mapper: $(SUBDIRS.device-mapper)
install: all $(SUBDIRS.install)
install_cluster: all $(SUBDIRS.install_cluster)
install_device-mapper: $(SUBDIRS.install_device-mapper)
$(SUBDIRS):
$(MAKE) -C $@
$(SUBDIRS.device-mapper):
$(MAKE) -C $(@:.device-mapper=) device-mapper
$(SUBDIRS.install): $(SUBDIRS)
$(MAKE) -C $(@:.install=) install
$(SUBDIRS.install_cluster): $(SUBDIRS)
$(MAKE) -C $(@:.install_cluster=) install_cluster
$(SUBDIRS.install_device-mapper): $(SUBDIRS)
$(MAKE) -C $(@:.install_device-mapper=) install_device-mapper
$(SUBDIRS.clean):
-$(MAKE) -C $(@:.clean=) clean

View File

@ -35,7 +35,7 @@ MAN8CLUSTER=clvmd.8
MAN5DIR=${mandir}/man5
MAN8DIR=${mandir}/man8
CLEAN_TARGETS=$(MAN5) $(MAN8) $(MAN8CLUSTER) $(FSADMMAN)
CLEAN_TARGETS=$(MAN5) $(MAN8) $(MAN8CLUSTER) $(FSADMMAN) dmsetup.8
include $(top_srcdir)/make.tmpl
@ -47,6 +47,8 @@ all: man
.PHONY: man
device-mapper: dmsetup.8
man: $(MAN5) $(MAN8) $(MAN8CLUSTER)
$(MAN5) $(MAN8) $(MAN8CLUSTER): Makefile

View File

@ -17,22 +17,16 @@ VPATH = @srcdir@
LANGS=de
TARGETS=$(LANGS:%=%.mo)
TARGETS=$(LANGS:%=lvm2_%.mo) $(LANGS:%=dm_%.mo)
DM_POSOURCES = $(top_srcdir)/dmsetup/*.pot $(top_srcdir)/libdm/*.pot \
$(top_srcdir)/libdm/*/*.pot
LVM_POSOURCES = $(top_srcdir)/tools/*.pot $(top_srcdir)/lib/*/*.pot
include $(top_srcdir)/make.tmpl
install: $(TARGETS)
@echo Installing translation files in $(localedir)
@( \
for lang in $(LANGS); do \
$(INSTALL) -D $(OWNER) $(GROUP) -m 444 $$lang.mo \
$(localedir)/$$lang/LC_MESSAGES/@INTL_PACKAGE@.mo;\
done; \
)
pofile: lvm2.po
lvm2.po: Makefile $(top_srcdir)/tools/*.pot $(top_srcdir)/lib/*/*.pot
lvm2.po: Makefile $(LVM_POSOURCES)
@echo Compiling string table
@xgettext -C -F --keyword=print_log --keyword=log_debug \
--keyword=log_info --keyword=_ --keyword=N_ \
@ -40,6 +34,32 @@ lvm2.po: Makefile $(top_srcdir)/tools/*.pot $(top_srcdir)/lib/*/*.pot
--keyword=log_fatal --keyword=log_debug --keyword=log_error \
--keyword=log_print --keyword=log_verbose \
--keyword=log_very_verbose -d - \
$(top_srcdir)/tools/*.pot $(top_srcdir)/lib/*/*.pot \
> $@
$(LVM_POSOURCES) > $@
device-mapper.po: Makefile $(DM_POSOURCES)
@echo Compiling string table
@xgettext -C -F --keyword=dm_log --keyword=log_debug \
--keyword=log_info --keyword=_ --keyword=N_ \
--keyword=log_notice --keyword=log_warn --keyword=log_err \
--keyword=log_fatal --keyword=log_debug --keyword=log_error \
--keyword=log_print --keyword=log_verbose \
--keyword=log_very_verbose -d - \
$(DM_POSOURCES) > $@
pofile: lvm2.po device-mapper.po
# FIXME
install: $(TARGETS)
@echo Installing translation files in $(localedir)
@( \
for lang in $(LANGS); do \
$(INSTALL) -D $(OWNER) $(GROUP) -m 444 $$lang.mo \
$(localedir)/$$lang/LC_MESSAGES/lvm2.mo;\
done; \
)
@( \
for lang in $(LANGS); do \
$(INSTALL) -D $(OWNER) $(GROUP) -m 444 $$lang.mo \
$(localedir)/$$lang/LC_MESSAGES/device-mapper.mo;\
done; \
)

View File

@ -20,6 +20,7 @@ include $(top_srcdir)/make.tmpl
install:
$(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) lvm_dump.sh \
$(sbindir)/lvmdump
ifeq ("@FSADM@", "yes")
$(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) fsadm.sh \
$(sbindir)/fsadm
endif

View File

@ -97,6 +97,19 @@ DEFS += -DLVM_SHARED_PATH=\"$(exec_prefix)/sbin/lvm\"
include $(top_srcdir)/make.tmpl
device-mapper: dmsetup
dmsetup: dmsetup.o $(interfacedir)/libdevmapper.$(LIB_SUFFIX)
$(CC) -o $@ dmsetup.o $(CFLAGS) $(LDFLAGS) \
-L$(interfacedir) -L$(DESTDIR)/lib -ldevmapper $(LIBS)
dmsetup.static: dmsetup.o $(interfacedir)/libdevmapper.a
$(CC) -o $@ dmsetup.o $(CFLAGS) $(LDFLAGS) -static \
-L$(interfacedir) -L$(DESTDIR)/lib -ldevmapper $(LIBS) \
$(LIB_PTHREAD)
all: device-mapper
lvm: $(OBJECTS) lvm.o $(top_srcdir)/lib/liblvm.a
$(CC) -o $@ $(CFLAGS) $(OBJECTS) lvm.o \
$(LDFLAGS) $(LVMLIBS) $(LIBS) -rdynamic