diff mbox

Fix spurious config-mycompat.h warnings

Message ID 1526671459-19247-1-git-send-email-brad@nextdimension.cc (mailing list archive)
State New, archived
Headers show

Commit Message

Brad Love May 18, 2018, 7:24 p.m. UTC
Apparently a zero byte file size leads to "could not open" warnings.
Adding a single comment to the file removes the warnings displayed
after compilation.

To prevent overwriting a user supplied config-mycompat.h the file
is only created if it does not already exist.

Also fix for possible spaces in the path.

Works without warning when using both the do-it-all build script
as well as manual operation via make targets.

Signed-off-by: Brad Love <brad@nextdimension.cc>
---
 v4l/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jasmin J. May 18, 2018, 8:28 p.m. UTC | #1
Hi!

THX for the patch.

@Hans:
I applied the patch already, but I can't delete it from Patchwork.
Please remove it there.

BR,
   Jasmin
diff mbox

Patch

diff --git a/v4l/Makefile b/v4l/Makefile
index 385fa83..a7c7b60 100644
--- a/v4l/Makefile
+++ b/v4l/Makefile
@@ -273,7 +273,7 @@  links::
 	@find ../linux/drivers/misc -name '*.[ch]' -type f -print0 | xargs -0n 255 ln -sf --target-directory=.
 
 config-compat.h:: $(obj)/.version .myconfig scripts/make_config_compat.pl
-	-touch $(obj)/config-mycompat.h
+	[ ! -f "$(obj)/config-mycompat.h" ] && echo "/* empty config-mycompat.h */" > "$(obj)/config-mycompat.h" || true
 	perl scripts/make_config_compat.pl $(SRCDIR) $(obj)/.myconfig $(obj)/config-compat.h
 
 kernel-links makelinks::