|
20 | 20 | # SOFTWARE. |
21 | 21 |
|
22 | 22 | include config/paths.mk |
23 | | -include config/versions.mk |
24 | | -include make/common.mk |
| 23 | +include make/helpers.mk |
25 | 24 |
|
26 | 25 | ROOT_DIR := $(abspath $(ROOT_DIR)) |
27 | 26 |
|
@@ -81,10 +80,10 @@ clean-binutils: clean-gcc ## Remove binutils build directories |
81 | 80 | $(call do_clean,binutils) |
82 | 81 | $(call do_safe_remove,$(BINUTILS1_BUILD_DIR)) |
83 | 82 | $(call do_safe_remove,$(BINUTILS2_BUILD_DIR)) |
84 | | - $(call do_safe_remove,$(BINUTILS_SRC_DIR)) |
85 | | - $(call do_safe_remove,$(BINUTILS_STAMP)) |
86 | | - $(call do_safe_remove,$(BINUTILS_ARCHIVE)) |
87 | | - $(call do_safe_remove,$(DOWNLOADS_DIR)/binutils-$(BINUTILS_VERSION).tar.xz.sig) |
| 83 | + $(call do_safe_remove_glob,$(SOURCES_DIR),binutils-*) |
| 84 | + $(call do_safe_remove_glob,$(DOWNLOADS_DIR),.binutils-*-verified) |
| 85 | + $(call do_safe_remove_glob,$(DOWNLOADS_DIR),binutils-*.tar.xz) |
| 86 | + $(call do_safe_remove_glob,$(DOWNLOADS_DIR),binutils-*.tar.xz.sig) |
88 | 87 | $(call do_safe_remove,$(DOWNLOADS_DIR)/gnu-keyring.gpg) |
89 | 88 | $(call do_safe_remove_glob,$(LOGS_DIR),binutils-stage1-*.log) |
90 | 89 | $(call do_safe_remove_glob,$(LOGS_DIR),binutils-stage2-*.log) |
@@ -118,10 +117,10 @@ clean-binutils-stage2: |
118 | 117 | clean-gcc: clean-musl ## Remove GCC build directory |
119 | 118 | $(call do_clean,gcc) |
120 | 119 | $(call do_safe_remove,$(GCC_BUILD_DIR)) |
121 | | - $(call do_safe_remove,$(GCC_SRC_DIR)) |
122 | | - $(call do_safe_remove,$(GCC_STAMP)) |
123 | | - $(call do_safe_remove,$(GCC_ARCHIVE)) |
124 | | - $(call do_safe_remove,$(DOWNLOADS_DIR)/gcc-$(GCC_VERSION).tar.xz.sig) |
| 120 | + $(call do_safe_remove_glob,$(SOURCES_DIR),gcc-*) |
| 121 | + $(call do_safe_remove_glob,$(DOWNLOADS_DIR),.gcc-*-verified) |
| 122 | + $(call do_safe_remove_glob,$(DOWNLOADS_DIR),gcc-*.tar.xz) |
| 123 | + $(call do_safe_remove_glob,$(DOWNLOADS_DIR),gcc-*.tar.xz.sig) |
125 | 124 | $(call do_safe_remove,$(DOWNLOADS_DIR)/gnu-keyring.gpg) |
126 | 125 | $(call do_safe_remove_glob,$(LOGS_DIR),gcc-stage1-*.log) |
127 | 126 | $(call do_safe_remove_glob,$(LOGS_DIR),gcc-stage2-*.log) |
@@ -151,10 +150,10 @@ clean-gcc-stage2: |
151 | 150 | clean-musl: clean-binutils-stage2 clean-gcc-stage2 ## Remove musl build directory |
152 | 151 | $(call do_clean,musl) |
153 | 152 | $(call do_safe_remove,$(MUSL_BUILD_DIR)) |
154 | | - $(call do_safe_remove,$(MUSL_SRC_DIR)) |
155 | | - $(call do_safe_remove,$(MUSL_STAMP)) |
156 | | - $(call do_safe_remove,$(MUSL_ARCHIVE)) |
157 | | - $(call do_safe_remove,$(DOWNLOADS_DIR)/musl-$(MUSL_VERSION).tar.gz.asc) |
| 153 | + $(call do_safe_remove_glob,$(SOURCES_DIR),musl-*) |
| 154 | + $(call do_safe_remove_glob,$(DOWNLOADS_DIR),.musl-*-verified) |
| 155 | + $(call do_safe_remove_glob,$(DOWNLOADS_DIR),musl-*.tar.gz) |
| 156 | + $(call do_safe_remove_glob,$(DOWNLOADS_DIR),musl-*.tar.gz.asc) |
158 | 157 | $(call do_safe_remove,$(DOWNLOADS_DIR)/musl.pub) |
159 | 158 | $(call do_safe_remove_glob,$(LOGS_DIR),musl-*.log) |
160 | 159 | $(foreach lib,$(MUSL_LIBS),$(call do_safe_remove_glob,$(SYSROOT)/lib,$(lib).*)) |
@@ -187,10 +186,10 @@ clean-musl: clean-binutils-stage2 clean-gcc-stage2 ## Remove musl build director |
187 | 186 | clean-kheaders: clean-gcc ## Remove Linux UAPI headers build directory |
188 | 187 | $(call do_clean,linux-headers) |
189 | 188 | $(call do_safe_remove,$(LINUX_HEADERS_BUILD_DIR)) |
190 | | - $(call do_safe_remove,$(LINUX_SRC_DIR)) |
191 | | - $(call do_safe_remove,$(LINUX_STAMP)) |
192 | | - $(call do_safe_remove,$(LINUX_ARCHIVE)) |
193 | | - $(call do_safe_remove,$(DOWNLOADS_DIR)/linux-$(LINUX_VERSION).tar.sign) |
| 189 | + $(call do_safe_remove_glob,$(SOURCES_DIR),linux-*) |
| 190 | + $(call do_safe_remove_glob,$(DOWNLOADS_DIR),.linux-*-verified) |
| 191 | + $(call do_safe_remove_glob,$(DOWNLOADS_DIR),linux-*.tar.xz) |
| 192 | + $(call do_safe_remove_glob,$(DOWNLOADS_DIR),linux-*.tar.sign) |
194 | 193 | $(call do_safe_remove_glob,$(LOGS_DIR),linux-headers-*.log) |
195 | 194 | $(call do_safe_remove,$(SYSROOT)/usr/include/linux) |
196 | 195 | $(call do_safe_remove,$(SYSROOT)/usr/include/asm) |
|
0 commit comments