]> git.ipfire.org Git - thirdparty/util-linux.git/blobdiff - Makefile.am
po: update de.po (from translationproject.org)
[thirdparty/util-linux.git] / Makefile.am
index d3171a0e3be4e30ea2155cad96712ff23f73b884..0bfc27ff34b5147a49d768b2e79263911df1521b 100644 (file)
@@ -1,7 +1,37 @@
-include $(top_srcdir)/config/include-Makefile.am
+AM_CPPFLAGS = \
+       -include config.h \
+       -I$(top_srcdir)/include \
+       -DLOCALEDIR=\"$(localedir)\" \
+       -D_PATH_LOCALSTATEDIR=\"${localstatedir}\"
+AM_CFLAGS = -fsigned-char $(WARN_CFLAGS)
+AM_LDFLAGS =
+
+# Add gettext stuff to the global LDADD for systems with separate libintl
+# library. The LTLIBINTL is generated by AM_GNU_GETTEXT macro.
+#
+LDADD = $(LTLIBINTL)
+
+# Automake (at least up to 1.10) mishandles dist_man_MANS inside conditionals.
+# Unlike with other dist primaries, the files are not distributed if the
+# conditional is false.
+# Work the bug around until it is fixed:
+dist_noinst_DATA = $(dist_man_MANS)
+
+# Paths to in-tree libraries (use ul_ prefix to avoid possible collisions) Note
+# that blkid.h, libmount.h, libfdisk.h and libsmartcols.h are generated and
+# stored in build dirs.
+#
+ul_libblkid_incdir = $(top_builddir)/libblkid/src
+ul_libmount_incdir = $(top_builddir)/libmount/src
+ul_libsmartcols_incdir = $(top_builddir)/libsmartcols/src
+ul_libfdisk_incdir  = $(top_builddir)/libfdisk/src
+
+ul_libuuid_incdir  = $(top_srcdir)/libuuid/src
 
 pkgconfigdir = $(usrlib_execdir)/pkgconfig
 
+bashcompletiondir = @bashcompletiondir@
+
 dist_noinst_HEADERS =
 noinst_PROGRAMS =
 noinst_LTLIBRARIES =
@@ -15,20 +45,22 @@ bin_PROGRAMS =
 sbin_PROGRAMS =
 dist_usrbin_exec_SCRIPTS =
 systemdsystemunit_DATA =
+dist_bashcompletion_DATA =
+check_PROGRAMS =
+dist_check_SCRIPTS =
+
+PATHFILES =
 
 INSTALL_EXEC_HOOKS =
 UNINSTALL_HOOKS =
 INSTALL_DATA_HOOKS =
 CLEAN_LOCALS =
+CHECK_LOCALS =
 
 EXTRA_DIST =
 CLEANFILES =
 
-MAN_DIRS = man/ru
-
-SUBDIRS = \
-       $(MAN_DIRS) \
-       po
+SUBDIRS = po
 
 RCS_FIND_IGNORE = \( -name SCCS -o -name BitKeeper -o -name .svn -o \
                -name CVS -o -name .pc -o -name .hg -o -name .git \) -prune -o
@@ -42,25 +74,80 @@ EXTRA_DIST += \
        po/update-potfiles \
        README.licensing
 
-
+include tools/Makemodule.am
 include include/Makemodule.am
 include lib/Makemodule.am
 include libuuid/Makemodule.am
 include libblkid/Makemodule.am
 include libmount/Makemodule.am
+include libsmartcols/Makemodule.am
+include libfdisk/Makemodule.am
 
 include schedutils/Makemodule.am
 include text-utils/Makemodule.am
 include term-utils/Makemodule.am
 include login-utils/Makemodule.am
-include mount-deprecated/Makemodule.am
 include sys-utils/Makemodule.am
 include misc-utils/Makemodule.am
 include disk-utils/Makemodule.am
-include fdisks/Makemodule.am
+
+include bash-completion/Makemodule.am
 
 include tests/Makemodule.am
 
+# pylibmountexec module must be installed after usrlib_exec libraries,
+# otherwise the libtool relink step will fail to find libmount.la and
+# will try -lmount which is possibly not available.
+#
+# So introduce this dependency rule:
+# install-pylibmountexecLTLIBRARIES: install-usrlib_execLTLIBRARIES
+@verbatim_pylibmount_dependency@
+
+#
+# Don't rely on configure.ac AC_CONFIG_FILES for install paths.
+#
+# The paths should be expanded at make time rather than configure:
+#  - to support 'make install prefix=/foo DESTDIR=/foo'
+#  - to recursively expands the paths (e.g. AC_CONFIG_FILES expands
+#    '@usrsbin_execdir@' to ${exec_prefix}/sbin')
+#
+edit_cmd = sed \
+        -e 's|@prefix[@]|$(prefix)|g' \
+        -e 's|@exec_prefix[@]|$(exec_prefix)|g' \
+        -e 's|@sysconfdir[@]|$(sysconfdir)|g' \
+        -e 's|@datadir[@]|$(datadir)|g' \
+        -e 's|@sbindir[@]|$(sbindir)|g' \
+        -e 's|@bindir[@]|$(bindir)|g' \
+        -e 's|@includedir[@]|$(includedir)|g' \
+        -e 's|@localstatedir[@]|$(localstatedir)|g' \
+        -e 's|@usrlib_execdir[@]|$(usrlib_execdir)|g' \
+        -e 's|@usrbin_execdir[@]|$(usrbin_execdir)|g' \
+        -e 's|@usrsbin_execdir[@]|$(usrsbin_execdir)|g' \
+        -e 's|@VERSION[@]|$(VERSION)|g' \
+        -e 's|@ADJTIME_PATH[@]|$(ADJTIME_PATH)|g' \
+        -e 's|@LIBUUID_VERSION[@]|$(LIBUUID_VERSION)|g' \
+        -e 's|@LIBMOUNT_VERSION[@]|$(LIBMOUNT_VERSION)|g' \
+        -e 's|@LIBMOUNT_MAJOR_VERSION[@]|$(LIBMOUNT_MAJOR_VERSION)|g' \
+        -e 's|@LIBMOUNT_MINOR_VERSION[@]|$(LIBMOUNT_MINOR_VERSION)|g' \
+        -e 's|@LIBMOUNT_PATCH_VERSION[@]|$(LIBMOUNT_PATCH_VERSION)|g' \
+        -e 's|@LIBSMARTCOLS_VERSION[@]|$(LIBSMARTCOLS_VERSION)|g' \
+        -e 's|@LIBFDISK_PC_REQUIRES[@]|$(LIBFDISK_PC_REQUIRES)|g' \
+        -e 's|@LIBFDISK_VERSION[@]|$(LIBFDISK_VERSION)|g' \
+        -e 's|@LIBFDISK_MAJOR_VERSION[@]|$(LIBFDISK_MAJOR_VERSION)|g' \
+        -e 's|@LIBFDISK_MINOR_VERSION[@]|$(LIBFDISK_MINOR_VERSION)|g' \
+        -e 's|@LIBFDISK_PATCH_VERSION[@]|$(LIBFDISK_PATCH_VERSION)|g' \
+        -e 's|@LIBBLKID_VERSION[@]|$(LIBBLKID_VERSION)|g'
+
+CLEANFILES += $(PATHFILES)
+EXTRA_DIST += $(PATHFILES:=.in)
+
+$(PATHFILES): Makefile
+       @ rm -f $@ $@.tmp
+       $(AM_V_at) $(MKDIR_P) $$(dirname $@)
+       $(AM_V_GEN) srcdir=''; \
+               test -f ./$@.in || srcdir=$(srcdir)/; \
+               $(edit_cmd) $${srcdir}$@.in >$@.tmp
+       @ mv $@.tmp $@
 
 # Arrange so that .tarball-version appears only in the distribution
 # tarball, and never in a checked-out repository.
@@ -93,11 +180,18 @@ checkxalloc:
 checkdecl:
        @ $(top_srcdir)/tools/checkdecl.sh
 
-ENABLE_ALL = --enable-static-programs --enable-most-builds
-DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --disable-use-tty-group \
-                           --disable-silent-rules $(ENABLE_ALL) \
-                           --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir)
+checkcompletion:
+       @ $(top_srcdir)/tools/checkcompletion.sh $(top_srcdir)
 
+DISTCHECK_CONFIGURE_FLAGS = \
+       --disable-use-tty-group \
+       --disable-silent-rules \
+       --enable-all-programs \
+       --enable-static-programs \
+       --enable-gtk-doc \
+       --with-python \
+       --with-bashcompletiondir=$$dc_install_base/$(bashcompletiondir) \
+       --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir)
 
 BUILT_SOURCES = .version
 .version:
@@ -114,6 +208,12 @@ $(CHANGELOG_FILE):
        @ echo "--------------------------------------------" >> $(CHANGELOG_FILE)
        @ echo >> $(CHANGELOG_FILE)
        $(AM_V_GEN) git log --stat v$(PREVIOUS_VERSION)..HEAD >> $(CHANGELOG_FILE)
+#
+#
+# smatch scan -- smatch and cgcc are expected in $PATH
+#
+checksmatch:
+       $(MAKE) CHECK="smatch --data=$(abs_top_srcdir)/tools/smatch-data" CC=cgcc
 
 changelog: $(CHANGELOG_FILE)
 
@@ -124,3 +224,5 @@ uninstall-hook: $(UNINSTALL_HOOKS)
 install-data-hook: $(INSTALL_DATA_HOOKS)
 
 clean-local: $(CLEAN_LOCALS)
+
+check-local: $(CHECK_LOCALS)