Merge pull request #675 from matthiasbeyer/make-imag-bin

Add targets for the imag binary itself
This commit is contained in:
Matthias Beyer 2016-08-29 17:14:04 +02:00 committed by GitHub
commit a401ec93c5
2 changed files with 27 additions and 8 deletions

View File

@ -21,10 +21,30 @@ CLEAN_TARGETS=$(foreach x,$(TARGETS),$(x)-clean)
all: $(TARGETS) all: $(TARGETS)
@$(ECHO) "\t[ALL ]" @$(ECHO) "\t[ALL ]"
release: $(RELEASE_TARGETS) imag-bin:
@$(ECHO) "\t[IMAG ][BUILD ]"
@$(CARGO) build --manifest-path ./bin/Cargo.toml
imag-bin-release:
@$(ECHO) "\t[IMAG ][RELEASE]"
@$(CARGO) release --manifest-path ./bin/Cargo.toml
imag-bin-update:
@$(ECHO) "\t[IMAG ][UPDATE ]"
@$(CARGO) update --manifest-path ./bin/Cargo.toml
imag-bin-install:
@$(ECHO) "\t[IMAG ][INSTALL]"
@$(CARGO) install --path ./bin/Cargo.toml
imag-bin-clean:
@$(ECHO) "\t[IMAG ][CLEAN ]"
@$(CARGO) clean --manifest-path ./bin/Cargo.toml
release: $(RELEASE_TARGETS) imag-bin-release
@$(ECHO) "\t[RELEASE]" @$(ECHO) "\t[RELEASE]"
bin: $(BIN_TARGETS) bin: $(BIN_TARGETS) imag-bin
@$(ECHO) "\t[ALLBIN ]" @$(ECHO) "\t[ALLBIN ]"
lib: $(LIB_TARGETS) lib: $(LIB_TARGETS)
@ -38,7 +58,7 @@ install: $(INSTALL_TARGETS)
update: $(UPDATE_TARGETS) update: $(UPDATE_TARGETS)
@$(ECHO) "\t[UPDATE ]" @$(ECHO) "\t[UPDATE ]"
clean: $(CLEAN_TARGETS) clean: $(CLEAN_TARGETS) imag-bin-clean
@$(ECHO) "\t[CLEAN ]" @$(ECHO) "\t[CLEAN ]"
$(TARGETS): %: .FORCE $(TARGETS): %: .FORCE
@ -53,7 +73,7 @@ $(LIB_TARGETS_TEST): %: .FORCE
@$(ECHO) "\t[TEST ]:\t$@" @$(ECHO) "\t[TEST ]:\t$@"
@$(CARGO) test --manifest-path ./$(subst test-,,$@)/Cargo.toml @$(CARGO) test --manifest-path ./$(subst test-,,$@)/Cargo.toml
$(INSTALL_TARGETS): %: .FORCE $(INSTALL_TARGETS): %: .FORCE imag-bin-install
@$(ECHO) "\t[INSTALL]:\t$(subst -install,,$@)" @$(ECHO) "\t[INSTALL]:\t$(subst -install,,$@)"
@$(CARGO) install --force --path ./$(subst -install,,$@) @$(CARGO) install --force --path ./$(subst -install,,$@)

View File

@ -128,9 +128,9 @@ By now, there are several targets in the Makefile, fulfilling following roles:
run `make test-libimagstore` for example. run `make test-libimagstore` for example.
* `clean` will run `cargo clean` in every crate. Again, for cleaning a single * `clean` will run `cargo clean` in every crate. Again, for cleaning a single
crate, use `make imag-store-clean` for example. crate, use `make imag-store-clean` for example.
* to build _only_ the `imag` binary, use the target `imag-bin`
**There is currently no target for the `imag` binary itself. Please (`imag-bin-release` for release build, `imag-bin-update` for
build/install it yourself using `cargo build --manifest-path ./bin/Cargo.toml`** `cargo update`ing, `imag-bin-clean` for `cargo clean`ing).
### Running ### Running
@ -139,7 +139,6 @@ respective directory will do the trick. For using it "normally", install the
binaries as described above, as well as the imag-binary: binaries as described above, as well as the imag-binary:
``` ```
$> make install $> make install
$> cargo install --path ./bin
``` ```
The installation root of the binaries (a.k.a. where they are installed to), may The installation root of the binaries (a.k.a. where they are installed to), may
not yet be in your $PATH. To see, where this installation root is, check out not yet be in your $PATH. To see, where this installation root is, check out