kirk: install only if sources are present
PATCH 1/1 kirk: install only if sources are present
From: Andrea Cervesato <[email protected]>
Fix kirk Makefile, so source code is copied during install process only if it's present.
--- tools/kirk/Makefile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
tools/kirk/Makefile +5 -3
@@ -10,13 +10,15 @@ include $(top_srcdir)/include/mk/env_pre.mk BASE_DIR := $(abspath $(DESTDIR)/$(prefix)) install: +ifneq ($(wildcard $(abs_srcdir)/kirk-src/libkirk/*.py),) mkdir -p $(BASE_DIR)/libkirk mkdir -p $(BASE_DIR)/libkirk/channels - install -m 00644 $(top_srcdir)/tools/kirk/kirk-src/libkirk/*.py $(BASE_DIR)/libkirk - install -m 00644 $(top_srcdir)/tools/kirk/kirk-src/libkirk/channels/*.py $(BASE_DIR)/libkirk/channels - install -m 00775 $(top_srcdir)/tools/kirk/kirk-src/kirk $(BASE_DIR)/kirk + install -m 00644 $(abs_srcdir)/kirk-src/libkirk/*.py $(BASE_DIR)/libkirk + install -m 00644 $(abs_srcdir)/kirk-src/libkirk/channels/*.py $(BASE_DIR)/libkirk/channels + install -m 00775 $(abs_srcdir)/kirk-src/kirk $(BASE_DIR)/kirk cd $(BASE_DIR) && ln -sf kirk runltp-ng +endif include $(top_srcdir)/include/mk/generic_leaf_target.mk
---
base-commit: 9cde2740ccc86c464cc16862b74d1cb885e4220e
change-id: 20251110-kirk_makefile_install_fix-421196bbf687
Best regards,
Signature · 5 lines
Andrea Cervesato <[email protected]> -- Mailing list info: https://lists.linux.it/listinfo/ltp
Hi Andrea,
Quoted 13 lines
Fix kirk
Makefile, so source code is copied during install process only if it's present.Signed-off-by Andrea Cervesato <[email protected]>--- tools/kirk/Makefile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)tools/kirk/Makefile +0
-0
tools/kirk/Makefile include $(top_srcdir)/include/mk/env_pre.mk · line 13
Quoted 4 lines
tools/kirk/Makefile +1
-0@@ -10,13 +10,15 @@ include $(top_srcdir)/include/mk/env_pre.mk BASE_DIR := $(abspath $(DESTDIR)/$(prefix)) install: +ifneq ($(wildcard $(abs_srcdir)/kirk-src/libkirk/*.py),)
Maybe add:
LGTM.
FYI tools/sparse/Makefile runs 'git submodule update --init' if source code does not exists:
$(SPARSE_SRC)/Makefile:
ifeq ($(SPARSE_SRC),sparse-src)
git submodule update --init else $(error "Can't find $(SPARSE_SRC)/Makefile")
endif
Because it filters out tools/sparse in tools/Makefile, this gets applied only when sparse is really needed (i.e. via 'make check' or cd into the directory).
tools/kirk/Makefile include $(top_srcdir)/include/mk/env_pre.mk · line 18
Quoted 6 lines
tools/kirk/Makefile +0
-3mkdir -p $(BASE_DIR)/libkirk mkdir -p $(BASE_DIR)/libkirk/channels - install -m 00644 $(top_srcdir)/tools/kirk/kirk-src/libkirk/*.py $(BASE_DIR)/libkirk - install -m 00644 $(top_srcdir)/tools/kirk/kirk-src/libkirk/channels/*.py $(BASE_DIR)/libkirk/channels - install -m 00775 $(top_srcdir)/tools/kirk/kirk-src/kirk $(BASE_DIR)/kirk
Although I acked the change to move Makefile to LTP, thinking about it twice I'm not convinced that it's a much better solution than keeping Makefile outside. I understand you don't want to keep LTP specific Makefile in kirk, but having to keep kirk paths in LTP is not optimal either (during experimenting with a different version one will have to update the Makefile).
Kind regards,
Petr
Quoted 6 lines
tools/kirk/Makefile +4
-0+ install -m 00644 $(abs_srcdir)/kirk-src/libkirk/*.py $(BASE_DIR)/libkirk + install -m 00644 $(abs_srcdir)/kirk-src/libkirk/channels/*.py $(BASE_DIR)/libkirk/channels + install -m 00775 $(abs_srcdir)/kirk-src/kirk $(BASE_DIR)/kirk cd $(BASE_DIR) && ln -sf kirk runltp-ng +endif
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp