Expandend upon dependency usage in README.md
This commit is contained in:
20
README.md
20
README.md
@ -277,18 +277,28 @@ To use the library when writing a concrete motor driver, include it in the makef
|
||||
|
||||
### Usage as static dependency
|
||||
|
||||
This repository is included as a git submodule in some of the driver repositories depending upon sinqMotor. When installing via a Makefile (`make install`) using the PSI build system, the following git command is executed within `/ioc/tools/driver.makefile`:
|
||||
This repository is included as a git submodule in the driver repositories depending upon sinqMotor. When installing via a Makefile (`make install`) using the PSI build system, the following git command is executed within `/ioc/tools/driver.makefile`:
|
||||
|
||||
`git submodule update --init --recursive`
|
||||
|
||||
This forces each submodule to be checked out at the latest commit hash stored in the remote repository. However, this is usually unwanted behaviour, since the higher-level drivers are usually designed to be compiled against a specific version of sinqMotor. In order to set the submodule to a specific version, the following steps need to be done BEFORE calling `make install`:
|
||||
|
||||
- `cd sinqMotor`
|
||||
- `git checkout 0.1`
|
||||
- `git checkout 1.0`
|
||||
- `cd ..`
|
||||
|
||||
Then, the fixation of the version to 0.1 needs to be committed in the parent repository:
|
||||
Then, the fixation of the version to 1.0 needs to be committed in the parent repository:
|
||||
|
||||
- `git commit -m "Update sinqMotor to 0.1"`
|
||||
- `git commit -m "Update sinqMotor to 1.0"`
|
||||
|
||||
After this commit, running `make install` will use the correct driver version for compilation.
|
||||
After this commit, running `make install` will use the correct driver version for compilation.
|
||||
|
||||
If your driver uses another driver as a static dependency via git submodule which in turn includes a sinqMotor submodule, it is not necessary to specify the version of sinqMotor. Instead, specify the desired commit of the direct dependency, commit this change and then update all submodules:
|
||||
|
||||
- `cd turboPmac`
|
||||
- `git checkout 1.0`
|
||||
- `cd ..`
|
||||
- `git commit -m "Update turboPmac to 1.0"`
|
||||
- `git submodule update --init --recursive`
|
||||
|
||||
This will update sinqMotor to the version specified in the 1.0 commit of turboPmac.
|
Reference in New Issue
Block a user