From ef849f2df851a76eb34421fadd4b8229ec025c75 Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Sat, 4 Mar 2017 21:42:48 -0800 Subject: [PATCH] compel Makefiles: simplify headers [un]install * install 'cp' can copy recursively, create directories, and even dereference symlinks. Everything we have in uapi/ is to be installed. NOTE we can't use -r for compel includes, as there is some extra stuff in there we don't want to take with us (in particular, plugins/ and 'compel -> .' symlinks). * uninstall rm -rf everything under compel includedir While at it, fix some minor things here and there. Reviewed-by: Cyrill Gorcunov Reviewed-by: Dmitry Safonov Acked-by: Pavel Emelyanov Signed-off-by: Kir Kolyshkin Signed-off-by: Andrei Vagin --- compel/Makefile | 13 +++---------- compel/plugins/Makefile | 6 ++---- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/compel/Makefile b/compel/Makefile index d09aa7739..fee12121b 100644 --- a/compel/Makefile +++ b/compel/Makefile @@ -59,10 +59,9 @@ install: compel/compel compel/$(LIBCOMPEL_SO) compel/$(LIBCOMPEL_A) $(E) " INSTALL " $(LIBCOMPEL_A) $(Q) install -m 0644 compel/$(LIBCOMPEL_A) $(DESTDIR)$(LIBDIR) $(E) " INSTALL " compel uapi - $(Q) mkdir -p $(DESTDIR)$(LIBEXECDIR)/compel/ $(Q) mkdir -p $(DESTDIR)$(INCLUDEDIR)/compel/asm - $(Q) cp -fr compel/include/uapi/compel/*.h $(DESTDIR)$(INCLUDEDIR)/compel - $(Q) cp -fr compel/include/uapi/compel/asm/*.h $(DESTDIR)$(INCLUDEDIR)/compel/asm + $(Q) cp -fr compel/include/uapi/*.h $(DESTDIR)$(INCLUDEDIR)/compel/ + $(Q) cp -fr compel/include/uapi/asm/*.h $(DESTDIR)$(INCLUDEDIR)/compel/asm/ $(Q) mkdir -p $(DESTDIR)$(INCLUDEDIR)/compel/common/asm $(Q) cp -fr include/common/compiler.h $(DESTDIR)$(INCLUDEDIR)/compel/common/ .PHONY: install @@ -77,11 +76,5 @@ uninstall: $(E) " UNINSTALL" $(LIBCOMPEL_A) $(Q) $(RM) $(addprefix $(DESTDIR)$(LIBDIR)/,$(LIBCOMPEL_A)) $(E) " UNINSTALL" compel uapi - $(Q) $(RM) $(addprefix $(DESTDIR)$(INCLUDEDIR)/,compel/*.h) - $(Q) $(RM) $(addprefix $(DESTDIR)$(INCLUDEDIR)/,compel/asm/*.h) - $(Q) $(RM) -rf $(addprefix $(DESTDIR)$(INCLUDEDIR)/,compel/asm/) - $(Q) $(RM) $(addprefix $(DESTDIR)$(INCLUDEDIR)/,compel/common/*.h) - $(Q) $(RM) $(addprefix $(DESTDIR)$(INCLUDEDIR)/,compel/common/asm/*.h) - $(Q) $(RM) -rf $(addprefix $(DESTDIR)$(INCLUDEDIR)/,compel/common/asm/) - $(Q) $(RM) -rf $(addprefix $(DESTDIR)$(INCLUDEDIR)/,compel/common/) + $(Q) $(RM) -rf $(addprefix $(DESTDIR)$(INCLUDEDIR)/,compel/*) .PHONY: uninstall diff --git a/compel/plugins/Makefile b/compel/plugins/Makefile index 0305c8961..b4b84960b 100644 --- a/compel/plugins/Makefile +++ b/compel/plugins/Makefile @@ -84,10 +84,8 @@ install: compel/plugins/std.built-in.o $(Q) mkdir -p $(DESTDIR)$(LIBEXECDIR)/compel/scripts $(Q) install -m 0644 compel/arch/$(ARCH)/scripts/compel-pack.lds.S $(DESTDIR)$(LIBEXECDIR)/compel/scripts $(E) " INSTALL " compel plugins uapi - $(Q) mkdir -p $(DESTDIR)$(INCLUDEDIR)/compel/plugins/std/asm - $(Q) cp -fr compel/include/uapi/compel/plugins/plugin-std.h $(DESTDIR)$(INCLUDEDIR)/compel/plugins - $(Q) cp -fr compel/include/uapi/compel/plugins/std/*.h $(DESTDIR)$(INCLUDEDIR)/compel/plugins/std - $(Q) cp -fr compel/arch/$(ARCH)/plugins/include/asm/syscall-types.h $(DESTDIR)$(INCLUDEDIR)/compel/plugins/std/asm + $(Q) mkdir -p $(DESTDIR)$(INCLUDEDIR)/compel/plugins + $(Q) cp -frL compel/plugins/include/uapi/* $(DESTDIR)$(INCLUDEDIR)/compel/plugins/ .PHONY: install uninstall: