mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-22 14:42:37 +01:00
Make 'build' target phony once again
In commit 5fb4b21
("Refine deploy target..."), the 'build' target was
made normal, i.e. non-phony, but on further review it does in fact make
sense to declare 'build' phony, such that it is run no matter the status
of the root-level 'build' directory, but for different reasons.
Previously, we had been considering the presence of 'build' directory as
a reasonable proxy for determining whether the `./gradlew build` had
been run. If the directory was present, we considered the 'build' target
up-to-date. If not, then we would re-run `./gradlew build`. This is all
sensible enough, except for the fact that the root-level 'build'
directory has almost nothing to do with the actual output of `./gradlew
build`. Gradle does output 'build' directories, but in the respective
subdirectory for each module of the project. After `./gradlew build` has
been run, we would see a 'desktop/build' directory, a 'seednode/build'
directory and so forth. It just so happens that a root-level 'build'
directory was getting created at all due to idiosyncracies of a
particular Kotlin plugin.
This commit updates the makefile to better respect this reality by:
- preserving the 'build' target but marking it once again as PHONY
- introducing new 'seednode/build' and 'desktop/build' targets that
trigger './gradlew :seednode:build` and ./gradlew :desktop:build`
commands respectively.
- making 'build' depend on these two new targets
In light of this realization of flawed thinking about the root-level
build dir, this change also restores `make clean` to calling `./gradlew
clean` instead of `rm -rf build`.
This commit is contained in:
parent
eb2d6b3992
commit
145302572e
1 changed files with 13 additions and 9 deletions
22
Makefile
22
Makefile
|
@ -108,15 +108,19 @@ setup: build .localnet
|
|||
clean: clean-build clean-localnet
|
||||
|
||||
clean-build:
|
||||
rm -rf build
|
||||
./gradlew clean
|
||||
|
||||
clean-localnet:
|
||||
rm -rf .localnet ./dao-setup
|
||||
|
||||
# Build all Bisq binaries and generate the shell scripts used to run
|
||||
# them in the targets below
|
||||
build:
|
||||
./gradlew build
|
||||
# Build Bisq binaries and shell scripts used in the targets below
|
||||
build: seednode/build desktop/build
|
||||
|
||||
seednode/build:
|
||||
./gradlew :seednode:build
|
||||
|
||||
desktop/build:
|
||||
./gradlew :desktop:build
|
||||
|
||||
# Unpack and customize a Bitcoin regtest node and Alice and Bob Bisq
|
||||
# nodes that have been preconfigured with a blockchain containing the
|
||||
|
@ -171,7 +175,7 @@ bitcoind: .localnet
|
|||
-datadir=.localnet/bitcoind \
|
||||
-blocknotify='.localnet/bitcoind/blocknotify %s'
|
||||
|
||||
seednode: build
|
||||
seednode: seednode/build
|
||||
./bisq-seednode \
|
||||
--baseCurrencyNetwork=BTC_REGTEST \
|
||||
--useLocalhostForP2P=true \
|
||||
|
@ -184,7 +188,7 @@ seednode: build
|
|||
--userDataDir=.localnet \
|
||||
--appName=seednode
|
||||
|
||||
seednode2: build
|
||||
seednode2: seednode/build
|
||||
./bisq-seednode \
|
||||
--baseCurrencyNetwork=BTC_REGTEST \
|
||||
--useLocalhostForP2P=true \
|
||||
|
@ -197,7 +201,7 @@ seednode2: build
|
|||
--userDataDir=.localnet \
|
||||
--appName=seednode2
|
||||
|
||||
mediator: build
|
||||
mediator: desktop/build
|
||||
./bisq-desktop \
|
||||
--baseCurrencyNetwork=BTC_REGTEST \
|
||||
--useLocalhostForP2P=true \
|
||||
|
@ -244,4 +248,4 @@ block:
|
|||
-rpcpassword=bsq \
|
||||
generatetoaddress 1
|
||||
|
||||
.PHONY: seednode
|
||||
.PHONY: build seednode
|
||||
|
|
Loading…
Add table
Reference in a new issue