Skip to content

Commit

Permalink
Allow svd2rust, form and cargo fmt to be replaced. Remove touch target.
Browse files Browse the repository at this point in the history
  • Loading branch information
thejpster authored and whitequark committed May 17, 2018
1 parent c92cee0 commit d16c693
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
DEVICES := tm4c123x tm4c129x
SVD2RUST ?= svd2rust
FORM ?= form
CARGO_FMT ?= cargo fmt

.SECONDARY:

Expand All @@ -13,11 +15,7 @@ purge:
touch -t 198001010000 $(patsubst %,crates/%/src/lib.rs,$(DEVICES))

.PHONY: rebuild
rebuild: touch all

.PHONY: touch
touch:
touch ./targetdb/devices/*.xml
rebuild: purge all

svd/%-vendor.xml: data/%.xml overlay/%-interrupts.xml dslite2svd.rb
ruby dslite2svd.rb $(filter %.xml,$^) $@
Expand All @@ -39,4 +37,4 @@ svd/%.xml: overlay/%.patch svd/%-vendor.xml
fi

crates/%/src/lib.rs: svd/%.xml
cd crates/$* && svd2rust -i ../../$< && rm -rf src && form -i lib.rs -o src/ && rm lib.rs && cargo fmt
cd crates/$* && $(SVD2RUST) -i ../../$< && rm -rf src && $(FORM) -i lib.rs -o src/ && rm lib.rs && $(CARGO_FMT)

0 comments on commit d16c693

Please sign in to comment.