From e15baaae97d142a3b0921b97faefc192f6b3a27b Mon Sep 17 00:00:00 2001 From: vanhofen Date: Sat, 1 Jun 2019 18:35:37 +0200 Subject: [PATCH] - move draw_line define to helpers.mk --- Makefile | 32 -------------------------------- make/helpers.mk | 34 ++++++++++++++++++++++++++++++++++ make/system-tools-extra.mk | 35 +++++++++++++++++++++++++---------- 3 files changed, 59 insertions(+), 42 deletions(-) diff --git a/Makefile b/Makefile index 4c034998..40b5cefa 100755 --- a/Makefile +++ b/Makefile @@ -136,38 +136,6 @@ PHONY += printenv help done all everything PHONY += .print-phony .PHONY: $(PHONY) -# -# $(1) = title -# $(2) = color -# 0 - Black -# 1 - Red -# 2 - Green -# 3 - Yellow -# 4 - Blue -# 5 - Magenta -# 6 - Cyan -# 7 - White -# $(3) = left|center|right -# -define draw_line - @ \ - printf '%.0s-' {1..$(shell tput cols)}; \ - if test "$(1)"; then \ - cols=$(shell tput cols); \ - length=$(shell echo $(1) | awk '{print length}'); \ - case "$(3)" in \ - *right) let indent="length + 1" ;; \ - *center) let indent="cols - (cols - length) / 2" ;; \ - *left|*) let indent="cols" ;; \ - esac; \ - tput cub $$indent; \ - test "$(2)" && printf $$(tput setaf $(2)); \ - printf '$(1)'; \ - test "$(2)" && printf $$(tput sgr0); \ - fi; \ - echo -endef - # this makes sure we do not build top-level dependencies in parallel # (which would not be too helpful anyway, running many configure and # downloads in parallel...), but the sub-targets are still built in diff --git a/make/helpers.mk b/make/helpers.mk index e85d0737..7e0cad6a 100644 --- a/make/helpers.mk +++ b/make/helpers.mk @@ -38,6 +38,40 @@ endef # ----------------------------------------------------------------------------- +# +# $(1) = title +# $(2) = color +# 0 - Black +# 1 - Red +# 2 - Green +# 3 - Yellow +# 4 - Blue +# 5 - Magenta +# 6 - Cyan +# 7 - White +# $(3) = left|center|right +# +define draw_line + @ \ + printf '%.0s-' {1..$(shell tput cols)}; \ + if test "$(1)"; then \ + cols=$(shell tput cols); \ + length=$(shell echo $(1) | awk '{print length}'); \ + case "$(3)" in \ + *right) let indent="length + 1" ;; \ + *center) let indent="cols - (cols - length) / 2" ;; \ + *left|*) let indent="cols" ;; \ + esac; \ + tput cub $$indent; \ + test "$(2)" && printf $$(tput setaf $(2)); \ + printf '$(1)'; \ + test "$(2)" && printf $$(tput sgr0); \ + fi; \ + echo +endef + +# ----------------------------------------------------------------------------- + archives-list: @rm -f $(BUILD_TMP)/$@ @make -qp | grep --only-matching '^\$(ARCHIVE).*:' | sed "s|:||g" > $(BUILD_TMP)/$@ diff --git a/make/system-tools-extra.mk b/make/system-tools-extra.mk index 45b9963e..b686a8aa 100644 --- a/make/system-tools-extra.mk +++ b/make/system-tools-extra.mk @@ -62,27 +62,42 @@ $(D)/binutils: $(ARCHIVE)/binutils-$(BINUTILS_VER).tar.bz2 | $(TARGET_DIR) # ----------------------------------------------------------------------------- -UTIL-LINUX_VER = 2.29 +UTIL-LINUX_MAJOR = 2 +UTIL-LINUX_MINOR = 33 +UTIL-LINUX_MICRO = 2 +UTIL-LINUX_VER = $(UTIL-LINUX_MAJOR).$(UTIL-LINUX_MINOR).$(UTIL-LINUX_MICRO) $(ARCHIVE)/util-linux-$(UTIL-LINUX_VER).tar.xz: - $(WGET) https://www.kernel.org/pub/linux/utils/util-linux/v$(UTIL-LINUX_VER)/util-linux-$(UTIL-LINUX_VER).tar.xz + $(WGET) https://www.kernel.org/pub/linux/utils/util-linux/v$(UTIL-LINUX_MAJOR).$(UTIL-LINUX_MINOR)/util-linux-$(UTIL-LINUX_VER).tar.xz -$(D)/util-linux: $(D)/libncurses $(ARCHIVE)/util-linux-$(UTIL-LINUX_VER).tar.xz | $(TARGET_DIR) +$(D)/util-linux: $(D)/libncurses $(D)/zlib $(ARCHIVE)/util-linux-$(UTIL-LINUX_VER).tar.xz | $(TARGET_DIR) $(REMOVE)/util-linux-$(UTIL-LINUX_VER) $(UNTAR)/util-linux-$(UTIL-LINUX_VER).tar.xz $(CHDIR)/util-linux-$(UTIL-LINUX_VER); \ autoreconf -fi; \ $(CONFIGURE) \ - --prefix= \ - --build=$(BUILD) \ - --host=$(TARGET) \ + --prefix=/usr \ + --mandir=/.remove/man \ + --localedir=/.remove/locale \ --enable-static \ --disable-shared \ - --mandir=/.remove \ + --disable-gtk-doc \ + \ + --disable-all-programs \ + \ + --disable-makeinstall-chown \ + --disable-makeinstall-setuid \ + --disable-makeinstall-chown \ + \ + --without-ncursesw \ + --without-python \ + --without-slang \ + --without-systemdsystemunitdir \ + --without-tinfo \ ; \ - $(MAKE) sfdisk; \ - install -m 0755 sfdisk $(TARGET_DIR)/sbin/sfdisk - $(REMOVE)/util-linux-$(UTIL-LINUX_VER) + $(MAKE); \ + $(MAKE) install DESTDIR=$(BUILD_TMP)/util-linux-install + #$(REMOVE)/util-linux-$(UTIL-LINUX_VER) $(TOUCH) # -----------------------------------------------------------------------------