1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-29 03:57:44 +00:00

Implement md5sum (closes #47)

This commit is contained in:
Arcterus 2014-03-24 16:48:40 -07:00
parent ce6b80001f
commit df9a296100
9 changed files with 204 additions and 10 deletions

View file

@ -1,10 +1,4 @@
# Binaries
RUSTC ?= rustc
RM := rm
# Flags
RUSTCFLAGS := --opt-level=3
RMFLAGS :=
include common.mk
# Possible programs
PROGS := \
@ -16,6 +10,7 @@ PROGS := \
env \
du \
false \
md5sum \
mkdir \
paste \
printenv \
@ -70,8 +65,16 @@ command = sh -c '$(1)'
# Main exe build rule
define EXE_BUILD
ifeq ($(wildcard $(1)/Makefile),)
build/$(1): $(1)/$(1).rs
$(call command,$(RUSTC) $(RUSTCFLAGS) -o build/$(1) $(1)/$(1).rs)
clean_$(1):
else
build/$(1): $(1)/$(1).rs
cd $(1) && make
clean_$(1):
cd $(1) && make clean
endif
endef
# Test exe built rules
@ -89,7 +92,7 @@ all: build $(EXES_PATHS)
test: tmp $(addprefix test_,$(TESTS))
$(RM) -rf tmp
clean:
clean: $(addprefix clean_,$(EXES))
$(RM) -rf build tmp
build: