Skip to content

Commit

Permalink
feat realmedium_sample: made makefile consistent (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
Vinatorul authored Nov 11, 2024
1 parent 5643477 commit 3e91b00
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
14 changes: 10 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,13 @@ test-debug test-release: test-%: build-%
pycodestyle tests

# Start the service (via testsuite service runner)
.PHONY: service-start-debug service-start-release
service-start-debug service-start-release: service-start-%: build-%
.PHONY: start-debug start-release
start-debug start-release: start-%: build-%
cmake --build build_$* -v --target start-realmedium_sample

.PHONY: service-start-debug service-start-release
service-start-debug service-start-release: service-start-%: start-%

# Cleanup data
.PHONY: clean-debug clean-release
clean-debug clean-release: clean-%:
Expand Down Expand Up @@ -91,10 +94,13 @@ export DB_CONNECTION := postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@servi
--config_vars /home/user/.local/etc/realmedium_sample/config_vars.docker.yaml

# Build and run service in docker environment
.PHONY: docker-start-service-debug docker-start-service-release
docker-start-service-debug docker-start-service-release: docker-start-service-%:
.PHONY: docker-start-debug docker-start-release
docker-start-debug docker-start-release: docker-start-%:
$(DOCKER_COMPOSE) run -p 8080:8080 --rm realmedium-sample make -- --in-docker-start-$*

.PHONY: docker-start-service-debug docker-start-service-release
docker-start-service-debug docker-start-service-release: docker-start-service-%: docker-start-%

# Start targets makefile in docker environment
.PHONY: docker-cmake-debug docker-build-debug docker-test-debug docker-clean-debug docker-install-debug docker-cmake-release docker-build-release docker-test-release docker-clean-release docker-install-release
docker-cmake-debug docker-build-debug docker-test-debug docker-clean-debug docker-install-debug docker-cmake-release docker-build-release docker-test-release docker-clean-release docker-install-release: docker-%:
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ make test-release
* `make build-release` - release build of the service with LTO
* `make test-debug` - does a `make build-debug` and runs all the tests on the result
* `make test-release` - does a `make build-release` and runs all the tests on the result
* `make service-start-debug` - builds the service in debug mode and starts it
* `make service-start-release` - builds the service in release mode and starts it
* `make start-debug` - builds the service in debug mode and starts it
* `make start-release` - builds the service in release mode and starts it
* `make` or `make all` - builds and runs all the tests in release and debug modes
* `make format` - autoformat all the C++ and Python sources
* `make clean-` - cleans the object files
Expand All @@ -47,8 +47,8 @@ make test-release
* `make docker-test-debug` - does a `make build-debug` and runs all the tests on the result in docker environment
* `make docker-build-release` - release build of the service with all the assertions and sanitizers enabled in docker environment
* `make docker-test-release` - does a `make build-release` and runs all the tests on the result in docker environment
* `make docker-start-service-release` - does a `make install-release` and runs service in docker environment
* `make docker-start-service-debug` - does a `make install-debug` and runs service in docker environment
* `make docker-start-release` - does a `make install-release` and runs service in docker environment
* `make docker-start-debug` - does a `make install-debug` and runs service in docker environment
* `make docker-clean-data` - stop docker containers and clean database data


Expand Down

0 comments on commit 3e91b00

Please sign in to comment.