Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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`.
- Loading branch information