check_PROGRAMS =
TESTS =
+PATHFILES =
+
INSTALL_EXEC_HOOKS =
UNINSTALL_HOOKS =
INSTALL_DATA_HOOKS =
include tests/Makemodule.am
+#
+# 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|@LIBUUID_VERSION[@]|$(LIBUUID_VERSION)|g' \
+ -e 's|@LIBMOUNT_VERSION[@]|$(LIBMOUNT_VERSION)|g' \
+ -e 's|@LIBBLKID_VERSION[@]|$(LIBBLKID_VERSION)|g'
+
+CLEANFILES += $(PATHFILES)
+EXTRA_DIST += $(PATHFILES:=.in)
+
+$(PATHFILES): Makefile
+ @ rm -f $@ $@.tmp
+ $(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.
dist-hook:
AC_CONFIG_HEADERS(config.h)
-
+#
+# Don't use configure.ac to replace install paths! See Makefile PATHFILES for
+# more details.
+#
AC_CONFIG_FILES([
Makefile
-libblkid/blkid.pc
libblkid/docs/Makefile
libblkid/docs/version.xml
libblkid/src/blkid.h
libmount/docs/Makefile
libmount/docs/version.xml
-libmount/mount.pc
libmount/src/libmount.h
-libuuid/uuid.pc
-misc-utils/uuidd.8
-misc-utils/uuidd.rc
-misc-utils/uuidd.service
-misc-utils/uuidd.socket
po/Makefile.in
])
endif
pkgconfig_DATA += libblkid/blkid.pc
+PATHFILES += libblkid/blkid.pc
dist_man_MANS += libblkid/libblkid.3
-EXTRA_DIST += libblkid/blkid.pc.in libblkid/libblkid.3 libblkid/COPYING
+EXTRA_DIST += libblkid/libblkid.3 libblkid/COPYING
endif # BUILD_LIBBLKID