mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-09-13 18:47:58 +00:00
Merge pull request #50 from Arcterus/makefile
Added the ability to select which programs to compile
This commit is contained in:
commit
d296841f1c
2 changed files with 49 additions and 3 deletions
16
Makefile
16
Makefile
|
@ -6,8 +6,8 @@ RM := rm
|
||||||
RUSTCFLAGS := --opt-level=3
|
RUSTCFLAGS := --opt-level=3
|
||||||
RMFLAGS :=
|
RMFLAGS :=
|
||||||
|
|
||||||
# Output names
|
# Possible programs
|
||||||
EXES := \
|
PROGS := \
|
||||||
cat \
|
cat \
|
||||||
dirname \
|
dirname \
|
||||||
echo \
|
echo \
|
||||||
|
@ -21,10 +21,20 @@ EXES := \
|
||||||
whoami \
|
whoami \
|
||||||
yes \
|
yes \
|
||||||
|
|
||||||
|
BUILD ?= $(PROGS)
|
||||||
|
|
||||||
TESTS := \
|
# Output names
|
||||||
|
EXES := \
|
||||||
|
$(filter $(BUILD),$(filter-out $(DONT_BUILD),$(PROGS)))
|
||||||
|
|
||||||
|
# Programs with usable tests
|
||||||
|
TEST_PROGS := \
|
||||||
cat \
|
cat \
|
||||||
|
|
||||||
|
TEST ?= $(TEST_PROGS)
|
||||||
|
|
||||||
|
TESTS := \
|
||||||
|
$(filter $(TEST),$(filter-out $(DONT_TEST),$(filter $(BUILD),$(filter-out $(DONT_BUILD),$(TEST_PROGS)))))
|
||||||
|
|
||||||
# Utils stuff
|
# Utils stuff
|
||||||
EXES_PATHS := $(addprefix build/,$(EXES))
|
EXES_PATHS := $(addprefix build/,$(EXES))
|
||||||
|
|
36
README.md
36
README.md
|
@ -16,6 +16,42 @@ are either old, abandonned, hosted on CVS, written in platform-specific C, etc.
|
||||||
Rust provides a good platform-agnostic way of writing systems utils that are easy
|
Rust provides a good platform-agnostic way of writing systems utils that are easy
|
||||||
to compile anywhere, and this is as good a way as any to try and learn it.
|
to compile anywhere, and this is as good a way as any to try and learn it.
|
||||||
|
|
||||||
|
Build Instructions
|
||||||
|
------------------
|
||||||
|
|
||||||
|
To simply build all available utilities:
|
||||||
|
```
|
||||||
|
make
|
||||||
|
```
|
||||||
|
|
||||||
|
To build all but a few of the available utilities:
|
||||||
|
```
|
||||||
|
make DONT_BUILD='UTILITY_1 UTILITY_2'
|
||||||
|
```
|
||||||
|
|
||||||
|
To build only a few of the available utilities:
|
||||||
|
```
|
||||||
|
make BUILD='UTILITY_1 UTILITY_2'
|
||||||
|
```
|
||||||
|
|
||||||
|
Test Instructions
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
To simply test all available utilities:
|
||||||
|
```
|
||||||
|
make test
|
||||||
|
```
|
||||||
|
|
||||||
|
To test all but a few of the available utilities:
|
||||||
|
```
|
||||||
|
make DONT_TEST='UTILITY_1 UTILITY_2' test
|
||||||
|
```
|
||||||
|
|
||||||
|
To test only a few of the available utilities:
|
||||||
|
```
|
||||||
|
make TEST='UTILITY_1 UTILITY_2' test
|
||||||
|
```
|
||||||
|
|
||||||
Contribute
|
Contribute
|
||||||
----------
|
----------
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue