Commit Graph

14 Commits

Author SHA1 Message Date
Jakub Sztandera
3e199ab3f7 mk: s/go-build/go-build-relative/
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2019-03-05 18:33:58 +01:00
Łukasz Magiera
0f3e199443 mk: embed CurrentCommit in the right place
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2018-09-21 11:52:20 +02:00
Steven Allen
0252710020 remove Godeps
fixes #2722

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-09-11 12:11:24 -07:00
Łukasz Magiera
b65cf84a34 repo: move version.go back here
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2018-08-09 10:51:15 +02:00
Jakub Sztandera
2535220864 mk: add tarball support
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2018-04-05 19:18:22 +02:00
Steven Allen
ddcf5ad9c1 make: don't use the private modifier
1. We don't need it (technically).
2. TravisCI (well, Ubuntu Trusty) is using a 11 year old version of make without
support for this feature.

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2017-12-15 16:17:43 -08:00
Steven Allen
f3ad2c95bd run os builds as a part of the test_go_* targets
We were doing this as part of the `test` target but we don't run that on CI (or
at least not on Travis).

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2017-12-15 16:17:43 -08:00
Steven Allen
6917d2f08f build for all supported platforms when testing
fixes #4427

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2017-11-30 22:05:06 -08:00
Łukasz Magiera
00590fd293 mk: option to pass custom go executable
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2017-08-22 20:04:08 +02:00
Jakub Sztandera
52a293ae2d
make: fix make install not installing dependencies
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2017-03-31 13:52:59 +02:00
Jakub Sztandera
bf23a81bb3
make: fix make install not using ldflags for git hash
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2017-03-27 15:19:40 +02:00
Jakub Sztandera
f55206d336
make: reimplement commit ref in version
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2017-02-12 02:14:48 +01:00
Jakub Sztandera
cd78168d23
cover: remove Godeps from coverage, add cmd/ipfs to coverage
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2017-02-12 01:18:40 +01:00
Jakub Sztandera
f630222580
make: rework makefiles for non-recursive make and add sharness coverage
This commit introduces non-recursive Makefile infrastructure that replaces current Makefile infrastructure.
It also generally cleanups the Makefiles, separates them into nicer sub-modules and centralizes common operations into single definitions.

It allows to depend on any target that is defined in the makefile, this means that for example `gx install` is called once when `make build test_expensive_sharness` is called instead of 4 or 5 times.

It also makes the dependencies much cleaner and allows for reuse of modules. For example sharness coverage collection (WIP) uses sharness target with amended PATH, previously it might have been possible but not without wiring in the coverage collection into sharness make runner code.

Yes, it is more complex but not much more. There are few rules that have to be followed and few complexities added but IMHO it is worth it.

How to NR-make:
1. If make is to generate some file via a target, it MUST be defined in Rules.mk file in the directory of the target.
2. `Rules.mk` file MUST have `include mk/header.mk` statement as the first line and `include mk/footer.mk` statement as the last line (apart from project root `Rules.mk`).
3. It then MUST be included by the closest `Rules.mk` file up the directory tree.
4. Inside a `Rules.mk` special variable accessed as `$(d)` is defined. Its value is current directory, use it so if the `Rules.mk` file is moved in the tree it still works without a problem. Caution: this variable is not available in the recipe part and MUST NOT be used. Use name of the target or prerequisite to extract it if you need it.
5. Make has only one global scope, this means that name conflicts are a thing. Names SHOULD  follow `VAR_NAME_$(d)` convention. There are exceptions from this rule in form of well defined global variables. Examples: General lists `TGT_BIN`, `CLEAN`; General targets: `TEST`, `COVERAGE`; General variables: `GOFLAGS`, `DEPS_GO`.
3. Any rules, definitions or variables that fit some family SHOULD be defined in `mk/$family.mk` file and included from project root `Rules.mk`

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2017-02-12 01:18:40 +01:00