forked from bonsai/harakit
Makefile, swab(1): fixes swab build
This commit is contained in:
parent
6bd19c072d
commit
cf5136d247
6
Makefile
6
Makefile
@ -133,10 +133,8 @@ build/bin/strcmp: src/strcmp.c build
|
|||||||
|
|
||||||
.PHONY: swab
|
.PHONY: swab
|
||||||
swab: build/bin/swab
|
swab: build/bin/swab
|
||||||
build/bin/swab: src/swab.rs build build/o/libsysexits.rlib
|
build/bin/swab: src/swab.rs build rustlibs
|
||||||
$(RUSTC) $(RUSTFLAGS) --extern getopt=build/o/libgetopt.rlib \
|
$(RUSTC) $(RUSTFLAGS) $(RUSTLIBS) -o $@ src/swab.rs
|
||||||
--extern sysexits=build/o/libsysexits.rlib \
|
|
||||||
-o $@ src/swab.rs
|
|
||||||
|
|
||||||
.PHONY: true
|
.PHONY: true
|
||||||
true: build/bin/true
|
true: build/bin/true
|
||||||
|
@ -53,7 +53,7 @@ fn main() -> ExitCode {
|
|||||||
Ok("f") => force = true,
|
Ok("f") => force = true,
|
||||||
Ok("w") => {
|
Ok("w") => {
|
||||||
if let Some(arg) = opt.arg() {
|
if let Some(arg) = opt.arg() {
|
||||||
match opt.arg().parse::<usize>() {
|
match arg.parse::<usize>() {
|
||||||
Ok(w) if w % 2 == 0 => { wordsize = w; () },
|
Ok(w) if w % 2 == 0 => { wordsize = w; () },
|
||||||
_ => { return usage(&argv[0]); },
|
_ => { return usage(&argv[0]); },
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user