kubo/core/commands
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
..
dag Fix marshaling of null cbor arrays 2017-02-08 16:24:31 -08:00
files bubble up go-datastore deps 2016-11-28 22:29:38 -08:00
object bubble up go-datastore deps 2016-11-28 22:29:38 -08:00
unixfs docs: decapitalize IPFS where possible 2016-10-27 22:54:36 -07:00
active.go Changed so only explicit ipfs cli commands are lowercased 2016-10-27 22:55:13 -07:00
add.go add cmd: clean up default logic of --progress option 2016-12-04 00:11:32 -05:00
bitswap.go bubble up go-datastore deps 2016-11-28 22:29:38 -08:00
block.go cmd/block: add selection of multihash parameters to block put command 2016-12-07 16:36:00 -08:00
bootstrap.go update to libp2p 4.0.1 and propogate other changes 2016-10-05 22:12:43 -07:00
cat.go update to libp2p 4.0.1 and propogate other changes 2016-10-05 22:12:43 -07:00
commands.go Changed so only explicit ipfs cli commands are lowercased 2016-10-27 22:55:13 -07:00
config.go make: rework makefiles for non-recursive make and add sharness coverage 2017-02-12 01:18:40 +01:00
dht_test.go test for the dht key escaping 2016-04-08 11:23:21 -07:00
dht.go update dht code to drop error log to warning 2017-01-18 19:39:57 -08:00
diag_test.go Replace 'var * bytes.Buffer' with '\1 := new(bytes.Buffer)' 2015-05-26 23:18:04 +07:00
diag.go Make all Taglines use imperative mood 2016-08-04 16:45:59 -07:00
dns.go update to libp2p 4.0.1 and propogate other changes 2016-10-05 22:12:43 -07:00
external.go Capitalize print statements, add period to external 2016-05-11 16:20:15 -04:00
get.go make path resolver no longer require whole node for construction 2016-10-25 15:04:44 -07:00
id.go update go-libp2p with negotiate lazy fixes 2017-01-10 14:52:00 -08:00
ipns.go update to libp2p 4.0.1 and propogate other changes 2016-10-05 22:12:43 -07:00
keystore.go Add a test for the keystore 2017-01-11 04:23:58 -08:00
log.go Reduce vehemence of help text, per PR comments 2016-08-31 21:59:43 -07:00
ls.go Fix "ipfs ls" so it works correctly with raw leaves. 2017-01-03 21:20:04 -05:00
mount_nofuse.go docs: decapitalize IPFS where possible 2016-10-27 22:54:36 -07:00
mount_unix.go Changed so only explicit ipfs cli commands are lowercased 2016-10-27 22:55:13 -07:00
mount_windows.go Mounts detect unmounts and track mount state. 2016-02-07 19:54:59 -08:00
name.go Make all Taglines use imperative mood 2016-08-04 16:45:59 -07:00
pin.go bubble up go-datastore deps 2016-11-28 22:29:38 -08:00
ping.go bubble up go-datastore deps 2016-11-28 22:29:38 -08:00
publish.go "ipfs name publish": use path.ParsePath instead of casting input 2017-01-11 20:47:26 -05:00
pubsub.go update go-libp2p with negotiate lazy fixes 2017-01-10 14:52:00 -08:00
refs.go bubble up go-datastore deps 2016-11-28 22:29:38 -08:00
repo.go Changed so only explicit ipfs cli commands are lowercased 2016-10-27 22:55:13 -07:00
resolve.go make path resolver no longer require whole node for construction 2016-10-25 15:04:44 -07:00
root.go add a note about ipfs key in the main helptext 2017-01-09 09:28:39 -08:00
stat.go Fix link in ipfs stats bw help message 2017-01-22 02:18:25 +01:00
swarm.go update go-libp2p with negotiate lazy fixes 2017-01-10 14:52:00 -08:00
sysdiag.go update to libp2p 4.0.1 and propogate other changes 2016-10-05 22:12:43 -07:00
tar.go docs: decapitalize IPFS where possible 2016-10-27 22:54:36 -07:00
tour_test.go Changed so only explicit ipfs cli commands are lowercased 2016-10-27 22:55:13 -07:00
tour.go Make all Taglines use imperative mood 2016-08-04 16:45:59 -07:00
version.go Make all Taglines use imperative mood 2016-08-04 16:45:59 -07:00