* Makefile: uses rsync(1), could this be optional?
@ 2022-01-15 18:40 Steffen Nurpmeso
0 siblings, 0 replies; only message in thread
From: Steffen Nurpmeso @ 2022-01-15 18:40 UTC (permalink / raw)
To: linux-kernel; +Cc: Steffen Nurpmeso
Hello.
As a not-yet-tested low-quality Makefile suggestion, with modern
GNU tools and find(1)'s -printf, wouldn't the following code work
out gracefully in practice? (Not subscribed.)
Thanks for Linux!
--- Makefile.orig 2022-01-15 19:33:59.337393371 +0100
+++ Makefile 2022-01-15 19:34:07.447393217 +0100
@@ -1260,8 +1288,17 @@ export INSTALL_HDR_PATH = $(objtree)/usr
quiet_cmd_headers_install = INSTALL $(INSTALL_HDR_PATH)/include
cmd_headers_install = \
mkdir -p $(INSTALL_HDR_PATH); \
- rsync -mrl --include='*/' --include='*\.h' --exclude='*' \
- usr/include $(INSTALL_HDR_PATH)
+ if command -v rsync; then \
+ rsync -mrl --include='*/' --include='*\.h' --exclude='*' \
+ usr/include $(INSTALL_HDR_PATH);\
+ else \
+ cd usr;\
+ find include/ -type f -name '*.h' -printf '%f %h\n' |\
+ while read f d; do \
+ mkdir -p $(INSTALL_HDR_PATH)/$$d;\
+ cp -P $$d/$$f $(INSTALL_HDR_PATH)/$$d/$$f;\
+ done;\
+ fi
PHONY += headers_install
headers_install: headers
--steffen
|
|Der Kragenbaer, The moon bear,
|der holt sich munter he cheerfully and one by one
|einen nach dem anderen runter wa.ks himself off
|(By Robert Gernhardt)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-01-15 18:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-15 18:40 Makefile: uses rsync(1), could this be optional? Steffen Nurpmeso
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®