From 959ac815b67a43f9b5f70a1dc294d2cf3a61fc2c Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Fri, 6 Nov 2009 03:05:27 +0100 Subject: [PATCH] build-sys: fix out-of-source build The blkid.h file is generated and stored in $top_builddir. Signed-off-by: Karel Zak --- config/include-Makefile.am | 3 +++ disk-utils/Makefile.am | 2 +- fsck/Makefile.am | 2 +- misc-utils/Makefile.am | 8 ++++---- mount/Makefile.am | 2 +- shlibs/blkid/docs/Makefile.am | 4 +++- shlibs/blkid/samples/Makefile.am | 2 +- shlibs/blkid/src/Makefile.am | 2 +- shlibs/blkid/src/partitions/Makefile.am | 2 +- shlibs/blkid/src/superblocks/Makefile.am | 2 +- shlibs/blkid/src/topology/Makefile.am | 2 +- 11 files changed, 18 insertions(+), 13 deletions(-) diff --git a/config/include-Makefile.am b/config/include-Makefile.am index f0077695..e13bb8ee 100644 --- a/config/include-Makefile.am +++ b/config/include-Makefile.am @@ -16,6 +16,9 @@ ul_libblkid_srcdir = $(top_srcdir)/shlibs/blkid/src 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) diff --git a/disk-utils/Makefile.am b/disk-utils/Makefile.am index 852ae8a0..08559c96 100644 --- a/disk-utils/Makefile.am +++ b/disk-utils/Makefile.am @@ -62,7 +62,7 @@ endif 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 diff --git a/fsck/Makefile.am b/fsck/Makefile.am index 567fee8b..1c88fde1 100644 --- a/fsck/Makefile.am +++ b/fsck/Makefile.am @@ -10,7 +10,7 @@ fsck_CFLAGS = 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) diff --git a/misc-utils/Makefile.am b/misc-utils/Makefile.am index 3ce85c64..adc6762f 100644 --- a/misc-utils/Makefile.am +++ b/misc-utils/Makefile.am @@ -37,17 +37,17 @@ sbin_PROGRAMS += blkid findfs wipefs 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 diff --git a/mount/Makefile.am b/mount/Makefile.am index 60ea59e0..ca44d007 100644 --- a/mount/Makefile.am +++ b/mount/Makefile.am @@ -72,7 +72,7 @@ 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) diff --git a/shlibs/blkid/docs/Makefile.am b/shlibs/blkid/docs/Makefile.am index fa8f2fba..6c209a3e 100644 --- a/shlibs/blkid/docs/Makefile.am +++ b/shlibs/blkid/docs/Makefile.am @@ -1,3 +1,5 @@ +include $(top_srcdir)/config/include-Makefile.am + ## Process this file with automake to produce Makefile.in # We require automake 1.10 at least. @@ -48,7 +50,7 @@ FIXXREF_OPTIONS= # 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 diff --git a/shlibs/blkid/samples/Makefile.am b/shlibs/blkid/samples/Makefile.am index f7458616..93588d57 100644 --- a/shlibs/blkid/samples/Makefile.am +++ b/shlibs/blkid/samples/Makefile.am @@ -1,6 +1,6 @@ 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 diff --git a/shlibs/blkid/src/Makefile.am b/shlibs/blkid/src/Makefile.am index a9fcfb52..90ce9bfc 100644 --- a/shlibs/blkid/src/Makefile.am +++ b/shlibs/blkid/src/Makefile.am @@ -15,7 +15,7 @@ common_cflags += $(UUID_CFLAGS) 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 diff --git a/shlibs/blkid/src/partitions/Makefile.am b/shlibs/blkid/src/partitions/Makefile.am index e18c81e5..6af2022e 100644 --- a/shlibs/blkid/src/partitions/Makefile.am +++ b/shlibs/blkid/src/partitions/Makefile.am @@ -1,6 +1,6 @@ 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 diff --git a/shlibs/blkid/src/superblocks/Makefile.am b/shlibs/blkid/src/superblocks/Makefile.am index 3db02540..8cf3009b 100644 --- a/shlibs/blkid/src/superblocks/Makefile.am +++ b/shlibs/blkid/src/superblocks/Makefile.am @@ -1,6 +1,6 @@ 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 = \ diff --git a/shlibs/blkid/src/topology/Makefile.am b/shlibs/blkid/src/topology/Makefile.am index c0c3a9f6..11c348b6 100644 --- a/shlibs/blkid/src/topology/Makefile.am +++ b/shlibs/blkid/src/topology/Makefile.am @@ -1,6 +1,6 @@ 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 -- 2.39.5