Deduplicates the Makefile

This commit is contained in:
Kevin K 2016-06-04 07:58:09 -04:00
parent 6a30e67411
commit f0dcfb1f4b
2 changed files with 6 additions and 26 deletions

View file

@ -1,33 +1,13 @@
toml = imag-$@/Cargo.toml toml = $@/Cargo.toml
bin = imag-$@/target/debug/imag-$@ bin = $@/target/debug/$@
default: all default: all
.PHONY: clean .PHONY: clean
all: counter link notes store tag view all: imag-counter imag-link imag-notes imag-store imag-tag imag-view
counter: prep imag-%: prep
cargo build --manifest-path $(toml)
cp $(bin) out/
link: prep
cargo build --manifest-path $(toml)
cp $(bin) out/
notes: prep
cargo build --manifest-path $(toml)
cp $(bin) out/
store: prep
cargo build --manifest-path $(toml)
cp $(bin) out/
tag: prep
cargo build --manifest-path $(toml)
cp $(bin) out/
view: prep
cargo build --manifest-path $(toml) cargo build --manifest-path $(toml)
cp $(bin) out/ cp $(bin) out/

View file

@ -100,8 +100,8 @@ imag-counter imag-link imag-notes imag-store imag-tag imag-view
``` ```
Building all the modules may take some time, so alternatively one can build only a specific module Building all the modules may take some time, so alternatively one can build only a specific module
by runing `$> make $module` where `$module` is one of the `imag-$module` names, such as `counter`, by runing `$> make $module` where `$module` is one of the `imag-*` names, such as `imag-counter`,
`link`, etc. `imag-link`, etc.
### Running ### Running