Skip to content

Commit 8e7dc2a

Browse files
committed
build: Fix VPATH build when nbdkit not installed
Even when nbdkit is previously installed, we want to make sure we are using the in-tree nbdkit-version.h, and not the pre-installed one. Noticed when a native VPATH build succeeded but a mingw cross-build failed with: In file included from ../../../include/nbdkit-plugin.h:38, from ../../../common/utils/environ.c:40: ../../../include/nbdkit-common.h:51:10: fatal error: nbdkit-version.h: No such file or directory 51 | #include <nbdkit-version.h> | ^~~~~~~~~~~~~~~~~~ compilation terminated. We don't (currently) have a VPATH CI job, and even if we did, we may not have spotted this as easily, as lcitool likes to prepopulate the build containers with the distro's prebuilt nbdkit when possible. At any rate, nbdkit-version.h is generated, so for a VPATH build to find it, we must also include relative to builddir. Fixes: 0c75ccd ("include: Expose nbdkit version information to public", v1.15.1)
1 parent 9defb48 commit 8e7dc2a

File tree

84 files changed

+222
-110
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+222
-110
lines changed

common/allocators/Makefile.am

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# nbdkit
2-
# Copyright (C) 2018-2020 Red Hat Inc.
2+
# Copyright (C) 2018-2022 Red Hat Inc.
33
#
44
# Redistribution and use in source and binary forms, with or without
55
# modification, are permitted provided that the following conditions are
@@ -43,6 +43,7 @@ liballocators_la_SOURCES = \
4343
$(NULL)
4444
liballocators_la_CPPFLAGS = \
4545
-I$(top_srcdir)/include \
46+
-I$(top_builddir)/include \
4647
-I$(top_srcdir)/common/replacements \
4748
-I$(top_srcdir)/common/include \
4849
-I$(top_srcdir)/common/utils \

common/bitmap/Makefile.am

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# nbdkit
2-
# Copyright (C) 2018 Red Hat Inc.
2+
# Copyright (C) 2018-2022 Red Hat Inc.
33
#
44
# Redistribution and use in source and binary forms, with or without
55
# modification, are permitted provided that the following conditions are
@@ -39,6 +39,7 @@ libbitmap_la_SOURCES = \
3939
$(NULL)
4040
libbitmap_la_CPPFLAGS = \
4141
-I$(top_srcdir)/include \
42+
-I$(top_builddir)/include \
4243
-I$(top_srcdir)/common/include \
4344
$(NULL)
4445
libbitmap_la_CFLAGS = $(WARNINGS_CFLAGS)

common/regions/Makefile.am

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# nbdkit
2-
# Copyright (C) 2018 Red Hat Inc.
2+
# Copyright (C) 2018-2022 Red Hat Inc.
33
#
44
# Redistribution and use in source and binary forms, with or without
55
# modification, are permitted provided that the following conditions are
@@ -39,6 +39,7 @@ libregions_la_SOURCES = \
3939
$(NULL)
4040
libregions_la_CPPFLAGS = \
4141
-I$(top_srcdir)/include \
42+
-I$(top_builddir)/include \
4243
-I$(top_srcdir)/common/include \
4344
-I$(top_srcdir)/common/utils \
4445
$(NULL)

common/utils/Makefile.am

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# nbdkit
2-
# Copyright (C) 2019 Red Hat Inc.
2+
# Copyright (C) 2019-2022 Red Hat Inc.
33
#
44
# Redistribution and use in source and binary forms, with or without
55
# modification, are permitted provided that the following conditions are
@@ -57,6 +57,7 @@ libutils_la_SOURCES = \
5757
$(NULL)
5858
libutils_la_CPPFLAGS = \
5959
-I$(top_srcdir)/include \
60+
-I$(top_builddir)/include \
6061
-I$(top_srcdir)/common/include \
6162
-I$(top_srcdir)/common/replacements \
6263
$(NULL)

filters/blocksize-policy/Makefile.am

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# nbdkit
2-
# Copyright (C) 2019-2021 Red Hat Inc.
2+
# Copyright (C) 2019-2022 Red Hat Inc.
33
#
44
# Redistribution and use in source and binary forms, with or without
55
# modification, are permitted provided that the following conditions are
@@ -41,9 +41,10 @@ nbdkit_blocksize_policy_filter_la_SOURCES = \
4141
$(NULL)
4242

4343
nbdkit_blocksize_policy_filter_la_CPPFLAGS = \
44+
-I$(top_srcdir)/include \
45+
-I$(top_builddir)/include \
4446
-I$(top_srcdir)/common/include \
4547
-I$(top_srcdir)/common/utils \
46-
-I$(top_srcdir)/include \
4748
$(NULL)
4849
nbdkit_blocksize_policy_filter_la_CFLAGS = $(WARNINGS_CFLAGS)
4950
nbdkit_blocksize_policy_filter_la_LDFLAGS = \

filters/blocksize/Makefile.am

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# nbdkit
2-
# Copyright (C) 2018-2021 Red Hat Inc.
2+
# Copyright (C) 2018-2022 Red Hat Inc.
33
#
44
# Redistribution and use in source and binary forms, with or without
55
# modification, are permitted provided that the following conditions are
@@ -42,6 +42,7 @@ nbdkit_blocksize_filter_la_SOURCES = \
4242

4343
nbdkit_blocksize_filter_la_CPPFLAGS = \
4444
-I$(top_srcdir)/include \
45+
-I$(top_builddir)/include \
4546
-I$(top_srcdir)/common/include \
4647
-I$(top_srcdir)/common/utils \
4748
$(NULL)

filters/cache/Makefile.am

+1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ nbdkit_cache_filter_la_SOURCES = \
5353

5454
nbdkit_cache_filter_la_CPPFLAGS = \
5555
-I$(top_srcdir)/include \
56+
-I$(top_builddir)/include \
5657
-I$(top_srcdir)/common/bitmap \
5758
-I$(top_srcdir)/common/include \
5859
-I$(top_srcdir)/common/utils \

filters/cacheextents/Makefile.am

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# nbdkit
2-
# Copyright (C) 2019-2021 Red Hat Inc.
2+
# Copyright (C) 2019-2022 Red Hat Inc.
33
#
44
# Redistribution and use in source and binary forms, with or without
55
# modification, are permitted provided that the following conditions are
@@ -42,6 +42,7 @@ nbdkit_cacheextents_filter_la_SOURCES = \
4242

4343
nbdkit_cacheextents_filter_la_CPPFLAGS = \
4444
-I$(top_srcdir)/include \
45+
-I$(top_builddir)/include \
4546
-I$(top_srcdir)/common/include \
4647
-I$(top_srcdir)/common/utils \
4748
$(NULL)

filters/checkwrite/Makefile.am

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# nbdkit
2-
# Copyright (C) 2019-2021 Red Hat Inc.
2+
# Copyright (C) 2019-2022 Red Hat Inc.
33
#
44
# Redistribution and use in source and binary forms, with or without
55
# modification, are permitted provided that the following conditions are
@@ -42,6 +42,7 @@ nbdkit_checkwrite_filter_la_SOURCES = \
4242

4343
nbdkit_checkwrite_filter_la_CPPFLAGS = \
4444
-I$(top_srcdir)/include \
45+
-I$(top_builddir)/include \
4546
-I$(top_srcdir)/common/include \
4647
-I$(top_srcdir)/common/utils \
4748
$(NULL)

filters/cow/Makefile.am

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# nbdkit
2-
# Copyright (C) 2018-2021 Red Hat Inc.
2+
# Copyright (C) 2018-2022 Red Hat Inc.
33
#
44
# Redistribution and use in source and binary forms, with or without
55
# modification, are permitted provided that the following conditions are
@@ -45,6 +45,7 @@ nbdkit_cow_filter_la_SOURCES = \
4545

4646
nbdkit_cow_filter_la_CPPFLAGS = \
4747
-I$(top_srcdir)/include \
48+
-I$(top_builddir)/include \
4849
-I$(top_srcdir)/common/bitmap \
4950
-I$(top_srcdir)/common/include \
5051
-I$(top_srcdir)/common/replacements \

filters/ddrescue/Makefile.am

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# nbdkit
2-
# Copyright (C) 2018-2021 Red Hat Inc.
2+
# Copyright (C) 2018-2022 Red Hat Inc.
33
#
44
# Redistribution and use in source and binary forms, with or without
55
# modification, are permitted provided that the following conditions are
@@ -44,6 +44,7 @@ nbdkit_ddrescue_filter_la_SOURCES = \
4444

4545
nbdkit_ddrescue_filter_la_CPPFLAGS = \
4646
-I$(top_srcdir)/include \
47+
-I$(top_builddir)/include \
4748
-I$(top_srcdir)/common/include \
4849
-I$(top_srcdir)/common/replacements \
4950
-I$(top_srcdir)/common/utils \

filters/delay/Makefile.am

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# nbdkit
2-
# Copyright (C) 2018-2021 Red Hat Inc.
2+
# Copyright (C) 2018-2022 Red Hat Inc.
33
#
44
# Redistribution and use in source and binary forms, with or without
55
# modification, are permitted provided that the following conditions are
@@ -42,6 +42,7 @@ nbdkit_delay_filter_la_SOURCES = \
4242

4343
nbdkit_delay_filter_la_CPPFLAGS = \
4444
-I$(top_srcdir)/include \
45+
-I$(top_builddir)/include \
4546
$(NULL)
4647
nbdkit_delay_filter_la_CFLAGS = $(WARNINGS_CFLAGS)
4748
nbdkit_delay_filter_la_LIBADD = \

filters/error/Makefile.am

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# nbdkit
2-
# Copyright (C) 2018-2021 Red Hat Inc.
2+
# Copyright (C) 2018-2022 Red Hat Inc.
33
#
44
# Redistribution and use in source and binary forms, with or without
55
# modification, are permitted provided that the following conditions are
@@ -42,6 +42,7 @@ nbdkit_error_filter_la_SOURCES = \
4242

4343
nbdkit_error_filter_la_CPPFLAGS = \
4444
-I$(top_srcdir)/include \
45+
-I$(top_builddir)/include \
4546
-I$(top_srcdir)/common/include \
4647
-I$(top_srcdir)/common/utils \
4748
$(NULL)

filters/exitlast/Makefile.am

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# nbdkit
2-
# Copyright (C) 2019-2021 Red Hat Inc.
2+
# Copyright (C) 2019-2022 Red Hat Inc.
33
#
44
# Redistribution and use in source and binary forms, with or without
55
# modification, are permitted provided that the following conditions are
@@ -40,7 +40,10 @@ nbdkit_exitlast_filter_la_SOURCES = \
4040
$(top_srcdir)/include/nbdkit-filter.h \
4141
$(NULL)
4242

43-
nbdkit_exitlast_filter_la_CPPFLAGS = -I$(top_srcdir)/include
43+
nbdkit_exitlast_filter_la_CPPFLAGS = \
44+
-I$(top_srcdir)/include \
45+
-I$(top_builddir)/include \
46+
$(NULL)
4447
nbdkit_exitlast_filter_la_CFLAGS = $(WARNINGS_CFLAGS)
4548
nbdkit_exitlast_filter_la_LIBADD = \
4649
$(IMPORT_LIBRARY_ON_WINDOWS) \

filters/exitwhen/Makefile.am

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# nbdkit
2-
# Copyright (C) 2019-2021 Red Hat Inc.
2+
# Copyright (C) 2019-2022 Red Hat Inc.
33
#
44
# Redistribution and use in source and binary forms, with or without
55
# modification, are permitted provided that the following conditions are
@@ -41,10 +41,11 @@ nbdkit_exitwhen_filter_la_SOURCES = \
4141
$(NULL)
4242

4343
nbdkit_exitwhen_filter_la_CPPFLAGS = \
44+
-I$(top_srcdir)/include \
45+
-I$(top_builddir)/include \
4446
-I$(top_srcdir)/common/include \
4547
-I$(top_srcdir)/common/replacements \
4648
-I$(top_srcdir)/common/utils \
47-
-I$(top_srcdir)/include \
4849
$(NULL)
4950
nbdkit_exitwhen_filter_la_CFLAGS = $(WARNINGS_CFLAGS)
5051
nbdkit_exitwhen_filter_la_LIBADD = \

filters/exportname/Makefile.am

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# nbdkit
2-
# Copyright (C) 2018-2021 Red Hat Inc.
2+
# Copyright (C) 2018-2022 Red Hat Inc.
33
#
44
# Redistribution and use in source and binary forms, with or without
55
# modification, are permitted provided that the following conditions are
@@ -42,6 +42,7 @@ nbdkit_exportname_filter_la_SOURCES = \
4242

4343
nbdkit_exportname_filter_la_CPPFLAGS = \
4444
-I$(top_srcdir)/include \
45+
-I$(top_builddir)/include \
4546
-I$(top_srcdir)/common/include \
4647
-I$(top_srcdir)/common/replacements \
4748
-I$(top_srcdir)/common/utils \

filters/ext2/Makefile.am

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# nbdkit
2-
# Copyright (C) 2017-2021 Red Hat Inc.
2+
# Copyright (C) 2017-2022 Red Hat Inc.
33
#
44
# Redistribution and use in source and binary forms, with or without
55
# modification, are permitted provided that the following conditions are
@@ -45,9 +45,10 @@ nbdkit_ext2_filter_la_SOURCES = \
4545
$(NULL)
4646

4747
nbdkit_ext2_filter_la_CPPFLAGS = \
48+
-I$(top_srcdir)/include \
49+
-I$(top_builddir)/include \
4850
-I$(top_srcdir)/common/include \
4951
-I$(top_srcdir)/common/utils \
50-
-I$(top_srcdir)/include \
5152
$(NULL)
5253
nbdkit_ext2_filter_la_CFLAGS = \
5354
$(WARNINGS_CFLAGS) \

filters/extentlist/Makefile.am

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# nbdkit
2-
# Copyright (C) 2019-2021 Red Hat Inc.
2+
# Copyright (C) 2019-2022 Red Hat Inc.
33
#
44
# Redistribution and use in source and binary forms, with or without
55
# modification, are permitted provided that the following conditions are
@@ -42,6 +42,7 @@ nbdkit_extentlist_filter_la_SOURCES = \
4242

4343
nbdkit_extentlist_filter_la_CPPFLAGS = \
4444
-I$(top_srcdir)/include \
45+
-I$(top_builddir)/include \
4546
-I$(top_srcdir)/common/include \
4647
-I$(top_srcdir)/common/replacements \
4748
-I$(top_srcdir)/common/utils \

filters/fua/Makefile.am

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# nbdkit
2-
# Copyright (C) 2018-2021 Red Hat Inc.
2+
# Copyright (C) 2018-2022 Red Hat Inc.
33
#
44
# Redistribution and use in source and binary forms, with or without
55
# modification, are permitted provided that the following conditions are
@@ -42,6 +42,7 @@ nbdkit_fua_filter_la_SOURCES = \
4242

4343
nbdkit_fua_filter_la_CPPFLAGS = \
4444
-I$(top_srcdir)/include \
45+
-I$(top_builddir)/include \
4546
$(NULL)
4647
nbdkit_fua_filter_la_CFLAGS = $(WARNINGS_CFLAGS)
4748
nbdkit_fua_filter_la_LIBADD = \

filters/gzip/Makefile.am

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# nbdkit
2-
# Copyright (C) 2019-2021 Red Hat Inc.
2+
# Copyright (C) 2019-2022 Red Hat Inc.
33
#
44
# Redistribution and use in source and binary forms, with or without
55
# modification, are permitted provided that the following conditions are
@@ -44,6 +44,7 @@ nbdkit_gzip_filter_la_SOURCES = \
4444

4545
nbdkit_gzip_filter_la_CPPFLAGS = \
4646
-I$(top_srcdir)/include \
47+
-I$(top_builddir)/include \
4748
-I$(top_srcdir)/common/include \
4849
-I$(top_srcdir)/common/replacements \
4950
-I$(top_srcdir)/common/utils \

filters/ip/Makefile.am

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# nbdkit
2-
# Copyright (C) 2019-2021 Red Hat Inc.
2+
# Copyright (C) 2019-2022 Red Hat Inc.
33
#
44
# Redistribution and use in source and binary forms, with or without
55
# modification, are permitted provided that the following conditions are
@@ -42,6 +42,7 @@ nbdkit_ip_filter_la_SOURCES = \
4242

4343
nbdkit_ip_filter_la_CPPFLAGS = \
4444
-I$(top_srcdir)/include \
45+
-I$(top_builddir)/include \
4546
-I$(top_srcdir)/common/include \
4647
-I$(top_srcdir)/common/utils \
4748
$(NULL)

filters/limit/Makefile.am

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# nbdkit
2-
# Copyright (C) 2019-2021 Red Hat Inc.
2+
# Copyright (C) 2019-2022 Red Hat Inc.
33
#
44
# Redistribution and use in source and binary forms, with or without
55
# modification, are permitted provided that the following conditions are
@@ -41,9 +41,10 @@ nbdkit_limit_filter_la_SOURCES = \
4141
$(NULL)
4242

4343
nbdkit_limit_filter_la_CPPFLAGS = \
44+
-I$(top_srcdir)/include \
45+
-I$(top_builddir)/include \
4446
-I$(top_srcdir)/common/include \
4547
-I$(top_srcdir)/common/utils \
46-
-I$(top_srcdir)/include \
4748
$(NULL)
4849
nbdkit_limit_filter_la_CFLAGS = $(WARNINGS_CFLAGS)
4950
nbdkit_limit_filter_la_LDFLAGS = \

filters/log/Makefile.am

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# nbdkit
2-
# Copyright (C) 2018-2021 Red Hat Inc.
2+
# Copyright (C) 2018-2022 Red Hat Inc.
33
#
44
# Redistribution and use in source and binary forms, with or without
55
# modification, are permitted provided that the following conditions are
@@ -46,9 +46,10 @@ nbdkit_log_filter_la_SOURCES = \
4646
$(NULL)
4747

4848
nbdkit_log_filter_la_CPPFLAGS = \
49+
-I$(top_srcdir)/include \
50+
-I$(top_builddir)/include \
4951
-I$(top_srcdir)/common/include \
5052
-I$(top_srcdir)/common/utils \
51-
-I$(top_srcdir)/include \
5253
$(NULL)
5354
nbdkit_log_filter_la_CFLAGS = $(WARNINGS_CFLAGS)
5455
nbdkit_log_filter_la_LDFLAGS = \

filters/luks/Makefile.am

+1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ nbdkit_luks_filter_la_SOURCES = \
4646

4747
nbdkit_luks_filter_la_CPPFLAGS = \
4848
-I$(top_srcdir)/include \
49+
-I$(top_builddir)/include \
4950
-I$(top_srcdir)/common/include \
5051
-I$(top_srcdir)/common/replacements \
5152
-I$(top_srcdir)/common/utils \

filters/multi-conn/Makefile.am

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# nbdkit
2-
# Copyright (C) 2021 Red Hat Inc.
2+
# Copyright (C) 2021, 2022 Red Hat Inc.
33
#
44
# Redistribution and use in source and binary forms, with or without
55
# modification, are permitted provided that the following conditions are
@@ -42,6 +42,7 @@ nbdkit_multi_conn_filter_la_SOURCES = \
4242

4343
nbdkit_multi_conn_filter_la_CPPFLAGS = \
4444
-I$(top_srcdir)/include \
45+
-I$(top_builddir)/include \
4546
-I$(top_srcdir)/common/include \
4647
-I$(top_srcdir)/common/utils \
4748
$(NULL)

0 commit comments

Comments
 (0)