Eric Blake
2020-Mar-16 21:32 UTC
[Libguestfs] [nbdkit PATCH v2] eval: Rebuild hard link if git breaks it
Commit 39b40750dd works if you rely on 'make clean' after a git update, but not if you rely on incremental 'make'. Git likes to update files by creating new inodes, which strands hard links. We could either use symlinks, or as done here, add a dependency to force the hard links to be rebuilt as needed. Fixes: 45b4877fde Signed-off-by: Eric Blake <eblake@redhat.com> --- plugins/eval/Makefile.am | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/plugins/eval/Makefile.am b/plugins/eval/Makefile.am index abbe17a0..da2e7b39 100644 --- a/plugins/eval/Makefile.am +++ b/plugins/eval/Makefile.am @@ -1,5 +1,5 @@ # nbdkit -# Copyright (C) 2017-2019 Red Hat Inc. +# Copyright (C) 2017-2020 Red Hat Inc. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are @@ -37,14 +37,16 @@ plugin_LTLIBRARIES = nbdkit-eval-plugin.la # This plugin shares most of the same sources as nbdkit-sh-plugin. In # RHEL 7 we cannot add the C files from ../sh directly to SOURCES -# because subdir-objects is broken. Instead we create hard links to +# because subdir-objects is broken. Instead we create symlinks to # them. BUILT_SOURCES = \ call.c \ methods.c \ $(NULL) -$(BUILT_SOURCES): - ln -f ../sh/$@ +call.c: ../sh/call.c + ln -f -s ../sh/$@ +methods.c: ../sh/methods.c + ln -f -s ../sh/$@ CLEANFILES += $(BUILT_SOURCES) nbdkit_eval_plugin_la_SOURCES = \ -- 2.25.1
Seemingly Similar Threads
- [nbdkit PATCH] eval: Rebuild hard link if git breaks it
- [PATCH nbdkit 1/2] tmpdisk: Generate the default command from a shell script fragment.
- [PATCH] Fix dependencies on generator.ml
- Re: [PATCH nbdkit 1/5] src: Mark synopsis.c as BUILT_SOURCES.
- Patch to enable python bindings in absence of docs build