~ubuntu-branches/ubuntu/precise/util-linux/precise-proposed

« back to all changes in this revision

Viewing changes to shlibs/mount/src/Makefile.am

  • Committer: Bazaar Package Importer
  • Author(s): Steve Langasek
  • Date: 2011-06-20 22:31:50 UTC
  • mfrom: (1.6.3 upstream) (4.5.1 sid)
  • Revision ID: james.westby@ubuntu.com-20110620223150-lz8wrv0946ihcz3z
Tags: 2.19.1-2ubuntu1
* Merge from Debian unstable, remaining changes:
  - Build for multiarch.
  - Add pre-depends on multiarch-support.
  - configure.ac: don't try to be clever about extracting a path name from
    $libdir to append to /usr in a way that's not overridable; instead,
    reuse the built-in configurable libexecdir.
  - Fix up the .pc.in files to know about libexecdir, so our substitutions
    don't leave us with unusable pkg-config files.
  - Install custom blkid.conf to use /dev/.blkid.tab since we don't
    expect device names to survive a reboot
  - Mention mountall(8) in fstab(5) manpages, along with its special
    options.
  - Since upstart is required in Ubuntu, the hwclock.sh init script is not
    called on startup and the hwclockfirst.sh init script is removed.
  - Drop depends on initscripts for the above.
  - Replace hwclock udev rule with an Upstart job.
  - For the case where mount is called with a directory to mount, look
    that directory up in mountall's /lib/init/fstab if we couldn't find
    it mentioned anywhere else.  This means "mount /proc", "mount /sys",
    etc. work.
  - mount.8 points to the cifs-utils package, not the obsolete smbfs one. 
* Dropped changes:
  - mount.preinst: lsb_release has been fixed in lucid and above to be
    usable without configuration, so we don't have to diverge from Debian
    here anymore.
* Changes merged upstream:
  - sfdisk support for '+' with '-N'
  - mount/umount.c: fix a segfault on umount with empty mtab entry
  - Fix arbitrary unmount with fuse security issue

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
include $(top_srcdir)/config/include-Makefile.am
 
2
 
 
3
AM_CPPFLAGS += -I$(ul_libmount_incdir) \
 
4
               -I$(ul_libmount_srcdir) \
 
5
               -I$(ul_libblkid_incdir)
 
6
 
 
7
# includes
 
8
mountincdir = $(includedir)/libmount
 
9
nodist_mountinc_HEADERS = libmount.h
 
10
 
 
11
usrlib_exec_LTLIBRARIES = libmount.la
 
12
libmount_la_SOURCES =   mountP.h version.c utils.c test.c init.c cache.c \
 
13
                        optstr.c optmap.c iter.c lock.c \
 
14
                        fs.c tab.c tab_parse.c tab_update.c \
 
15
                        context.c context_mount.c context_umount.c \
 
16
                        $(mountinc_HEADERS) \
 
17
                        $(top_srcdir)/lib/at.c \
 
18
                        $(top_srcdir)/include/list.h \
 
19
                        $(top_srcdir)/lib/mangle.c \
 
20
                        $(top_srcdir)/lib/canonicalize.c \
 
21
                        $(top_srcdir)/lib/strutils.c \
 
22
                        $(top_srcdir)/lib/env.c
 
23
 
 
24
nodist_libmount_la_SOURCES = mountP.h
 
25
 
 
26
libmount_la_LIBADD = $(ul_libblkid_la) $(SELINUX_LIBS)
 
27
 
 
28
libmount_la_DEPENDENCIES = $(libmount_la_LIBADD) libmount.sym libmount.h.in
 
29
 
 
30
libmount_la_LDFLAGS = -Wl,--version-script=$(ul_libmount_srcdir)/libmount.sym \
 
31
                      -version-info $(LIBMOUNT_VERSION_INFO)
 
32
 
 
33
TESTS_LIBS = $(UUID_LIBS)
 
34
 
 
35
if HAVE_SELINUX
 
36
TESTS_LIBS += $(SELINUX_LIBS)
 
37
endif
 
38
 
 
39
EXTRA_DIST = libmount.sym libmount.h.in
 
40
CLEANFILES = $(tests)
 
41
 
 
42
# move lib from $(usrlib_execdir) to $(libdir) if needed
 
43
install-exec-hook:
 
44
        if test "$(usrlib_execdir)" != "$(libdir)"; then \
 
45
                mkdir -p $(DESTDIR)$(libdir); \
 
46
                mv $(DESTDIR)$(usrlib_execdir)/libmount.so.* $(DESTDIR)$(libdir); \
 
47
                so_img_name=$$(readlink $(DESTDIR)$(usrlib_execdir)/libmount.so); \
 
48
                so_img_rel_target=$$(echo $(usrlib_execdir) | sed 's,\(^/\|\)[^/][^/]*,..,g'); \
 
49
                (cd $(DESTDIR)$(usrlib_execdir) && \
 
50
                        rm -f libmount.so && \
 
51
                        $(LN_S) $$so_img_rel_target$(libdir)/$$so_img_name libmount.so); \
 
52
        fi
 
53
 
 
54
uninstall-hook:
 
55
        rm -f $(DESTDIR)$(libdir)/libmount.so*
 
56
 
 
57
 
 
58
tests = test_version test_cache test_optstr test_lock \
 
59
                  test_tab test_utils test_tab_update test_context
 
60
 
 
61
tests: all $(tests)
 
62
test_%: %.c
 
63
        $(AM_V_CC)$(COMPILE) -DTEST_PROGRAM $< .libs/libmount.a \
 
64
                $(ul_libblkid_builddir)/.libs/libblkid.a -o $@ \
 
65
                $(TESTS_LIBS)
 
66