Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 130bbf5

Browse files
oech3RenjiSann
authored andcommitted
GNUmakefile: Reduce deps & minor cleanup
1 parent 5c5494a commit 130bbf5

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

GNUmakefile

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ ifeq ($(PROFILE),release)
2222
PROFILE_CMD = --release
2323
endif
2424

25-
RM := rm -rf
26-
2725
# Binaries
2826
CARGO ?= cargo
2927
CARGOFLAGS ?=
@@ -340,7 +338,6 @@ endif
340338

341339
all: build
342340

343-
do_install = $(INSTALL) ${1}
344341
use_default := 1
345342

346343
build-pkgs:
@@ -386,12 +383,11 @@ busybox-src:
386383

387384
# This is a busybox-specific config file their test suite wants to parse.
388385
$(BUILDDIR)/.config: $(BASEDIR)/.busybox-config
389-
cp $< $@
386+
$(INSTALL) -m 644 $< $@
390387

391388
# Test under the busybox test suite
392389
$(BUILDDIR)/busybox: busybox-src build-coreutils $(BUILDDIR)/.config
393-
cp "$(BUILDDIR)/coreutils" "$(BUILDDIR)/busybox"
394-
chmod +x $@
390+
$(INSTALL) -m 755 "$(BUILDDIR)/coreutils" "$(BUILDDIR)/busybox"
395391

396392
prepare-busytest: $(BUILDDIR)/busybox
397393
# disable inapplicable tests
@@ -504,7 +500,7 @@ endif
504500
uninstall:
505501
ifneq ($(OS),Windows_NT)
506502
rm -f $(DESTDIR)$(LIBSTDBUF_DIR)/libstdbuf*
507-
-rmdir $(DESTDIR)$(LIBSTDBUF_DIR) 2>/dev/null || true
503+
-rm -d $(DESTDIR)$(LIBSTDBUF_DIR) 2>/dev/null || true
508504
endif
509505
ifeq (${MULTICALL}, y)
510506
rm -f $(addprefix $(INSTALLDIR_BIN)/,$(PROG_PREFIX)coreutils)

0 commit comments

Comments
 (0)