diff mbox

[1/2] btrfs-progs: Fix progs_extra build dependencies

Message ID 20171223205238.19678-2-hans@knorrie.org (mailing list archive)
State New, archived
Headers show

Commit Message

Hans van Kranenburg Dec. 23, 2017, 8:52 p.m. UTC
The Makefile does not have a dependency path that builds dependencies
for tools listed in progs_extra.

E.g. doing make btrfs-show-super in a clean build environment results in:
    gcc: error: cmds-inspect-dump-super.o: No such file or directory
    Makefile:389: recipe for target 'btrfs-show-super' failed

Signed-off-by: Hans van Kranenburg <hans@knorrie.org>
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Hugo Mills Dec. 23, 2017, 9:02 p.m. UTC | #1
On Sat, Dec 23, 2017 at 09:52:37PM +0100, Hans van Kranenburg wrote:
> The Makefile does not have a dependency path that builds dependencies
> for tools listed in progs_extra.
> 
> E.g. doing make btrfs-show-super in a clean build environment results in:
>     gcc: error: cmds-inspect-dump-super.o: No such file or directory
>     Makefile:389: recipe for target 'btrfs-show-super' failed
> 
> Signed-off-by: Hans van Kranenburg <hans@knorrie.org>

   Hans and I worked this one out between us on IRC. Not sure if you
need this, but here it is:

Signed-off-by: Hugo Mills <hugo@carfax.org.uk>

   Hugo.

> ---
>  Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/Makefile b/Makefile
> index 30a0ee22..390b138f 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -220,7 +220,7 @@ cmds_restore_cflags = -DBTRFSRESTORE_ZSTD=$(BTRFSRESTORE_ZSTD)
>  CHECKER_FLAGS += $(btrfs_convert_cflags)
>  
>  # collect values of the variables above
> -standalone_deps = $(foreach dep,$(patsubst %,%_objects,$(subst -,_,$(filter btrfs-%, $(progs)))),$($(dep)))
> +standalone_deps = $(foreach dep,$(patsubst %,%_objects,$(subst -,_,$(filter btrfs-%, $(progs) $(progs_extra)))),$($(dep)))
>  
>  SUBDIRS =
>  BUILDDIRS = $(patsubst %,build-%,$(SUBDIRS))
diff mbox

Patch

diff --git a/Makefile b/Makefile
index 30a0ee22..390b138f 100644
--- a/Makefile
+++ b/Makefile
@@ -220,7 +220,7 @@  cmds_restore_cflags = -DBTRFSRESTORE_ZSTD=$(BTRFSRESTORE_ZSTD)
 CHECKER_FLAGS += $(btrfs_convert_cflags)
 
 # collect values of the variables above
-standalone_deps = $(foreach dep,$(patsubst %,%_objects,$(subst -,_,$(filter btrfs-%, $(progs)))),$($(dep)))
+standalone_deps = $(foreach dep,$(patsubst %,%_objects,$(subst -,_,$(filter btrfs-%, $(progs) $(progs_extra)))),$($(dep)))
 
 SUBDIRS =
 BUILDDIRS = $(patsubst %,build-%,$(SUBDIRS))