The blkid.h file is generated and stored in $top_builddir.
Signed-off-by: Karel Zak <kzak@redhat.com>
ul_libblkid_builddir = $(top_builddir)/shlibs/blkid/src
ul_libblkid_la = $(top_builddir)/shlibs/blkid/src/libblkid.la
+# blkid.h is generated by ./configure script and stored in build directory
+ul_libblkid_incdir = $(ul_libblkid_builddir)
+
$(ul_libblkid_la):
$(MAKE) -C $(ul_libblkid_builddir)
if BUILD_LIBBLKID
# only in-tree libblkid has partitions parsing support
mkswap_LDADD += $(ul_libblkid_la)
-mkswap_CFLAGS += -I$(ul_libblkid_srcdir)
+mkswap_CFLAGS += -I$(ul_libblkid_incdir)
endif
if HAVE_SELINUX
if BUILD_LIBBLKID
fsck_LDADD += $(ul_libblkid_la)
-fsck_CFLAGS += -I$(ul_libblkid_srcdir)
+fsck_CFLAGS += -I$(ul_libblkid_incdir)
else
fsck_LDADD += $(BLKID_LIBS)
fsck_CFLAGS += $(BLKID_CFLAGS)
dist_man_MANS += blkid.8 findfs.8 wipefs.8
blkid_SOURCES = blkid.c $(top_srcdir)/lib/ismounted.c
blkid_LDADD = $(ul_libblkid_la)
-blkid_CFLAGS = -I$(ul_libblkid_srcdir)
+blkid_CFLAGS = -I$(ul_libblkid_incdir)
findfs_LDADD = $(ul_libblkid_la)
-findfs_CFLAGS = -I$(ul_libblkid_srcdir)
+findfs_CFLAGS = -I$(ul_libblkid_incdir)
wipefs_LDADD = $(ul_libblkid_la)
-wipefs_CFLAGS = -I$(ul_libblkid_srcdir)
+wipefs_CFLAGS = -I$(ul_libblkid_incdir)
if HAVE_STATIC_BLKID
sbin_PROGRAMS += blkid.static
blkid_static_SOURCES = $(blkid_SOURCES)
blkid_static_LDFLAGS = -all-static
blkid_static_LDADD = $(ul_libblkid_la)
-blkid_static_CFLAGS = -I$(ul_libblkid_srcdir)
+blkid_static_CFLAGS = -I$(ul_libblkid_incdir)
endif
endif
if BUILD_LIBBLKID
ldadd_common += $(ul_libblkid_la)
ldadd_static += $(ul_libblkid_la)
-cflags_common += -I$(ul_libblkid_srcdir)
+cflags_common += -I$(ul_libblkid_incdir)
else
ldadd_common += $(BLKID_LIBS)
ldadd_static += $(BLKID_LIBS_STATIC)
+include $(top_srcdir)/config/include-Makefile.am
+
## Process this file with automake to produce Makefile.in
# We require automake 1.10 at least.
# Used for dependencies. The docs will be rebuilt if any of these change.
# e.g. HFILE_GLOB=$(top_srcdir)/gtk/*.h
# e.g. CFILE_GLOB=$(top_srcdir)/gtk/*.c
-HFILE_GLOB=$(top_srcdir)/shlibs/blkid/src/blkid.h
+HFILE_GLOB=$(ul_libblkid_incdir)/blkid.h
CFILE_GLOB=$(top_srcdir)/shlibs/blkid/src/*.c
# Extra header to include when scanning, which are not under DOC_SOURCE_DIR
include $(top_srcdir)/config/include-Makefile.am
-AM_CPPFLAGS += -I$(ul_libblkid_srcdir)
+AM_CPPFLAGS += -I$(ul_libblkid_incdir)
AM_LDFLAGS += $(ul_libblkid_la)
noinst_PROGRAMS = topology partitions mkfs superblocks
endif
endif
-AM_CPPFLAGS += -I$(ul_libblkid_srcdir) $(common_cflags)
+AM_CPPFLAGS += -I$(ul_libblkid_incdir) -I$(ul_libblkid_srcdir) $(common_cflags)
# includes
blkidincdir = $(includedir)/blkid
include $(top_srcdir)/config/include-Makefile.am
-AM_CPPFLAGS += -I$(ul_libblkid_srcdir)
+AM_CPPFLAGS += -I$(ul_libblkid_incdir) -I$(ul_libblkid_srcdir)
libblkid_partitions_la_LIBADD =
noinst_LTLIBRARIES = libblkid_partitions.la
include $(top_srcdir)/config/include-Makefile.am
-AM_CPPFLAGS += -I$(ul_libblkid_srcdir)
+AM_CPPFLAGS += -I$(ul_libblkid_incdir) -I$(ul_libblkid_srcdir)
noinst_LTLIBRARIES = libblkid_superblocks.la
libblkid_superblocks_la_SOURCES = \
include $(top_srcdir)/config/include-Makefile.am
-AM_CPPFLAGS += -I$(ul_libblkid_srcdir)
+AM_CPPFLAGS += -I$(ul_libblkid_incdir) -I$(ul_libblkid_srcdir)
libblkid_topology_la_LIBADD =
noinst_LTLIBRARIES = libblkid_topology.la