It looks like you are encountering errors with your Makefile syntax. Without more information about your specific Makefile and the commands you are running, it is difficult to provide a specific solution. However, some general tips for debugging Makefile syntax errors include:
Double-checking your syntax: Make sure that you are using the correct syntax for the commands you are running, and that there are no typos or missing arguments.
Using a Makefile linter: There are tools available that can help you identify syntax errors in your Makefile. You might consider using a linter like make-lint to help you identify and fix errors.
Breaking down your commands: If you have a particularly complex command that is causing an error, try breaking it down into smaller pieces and running each piece separately to identify which part of the command is causing the error.
User
ifeq ($(shell test -e '.env' && echo -n yes),yes)
include .env
endif
args := (MAKECMDGOALS))
ifndef args
MESSAGE = "No such command (or you pass two or many targets to ). List of possible commands: make help"
else
MESSAGE = "Done"
endif
Assistant
This Makefile appears to define a set of commands for working with an application called "shortener". The commands include:
env: Create .env file with variables
help: Show this help
db: Create database with docker-compose
lint: Check code with pylint
format: Reformat code with isort and black
migrate: Do all migrations in database
run: Run application server
revision: Create new revision file automatically with prefix
open_db: Open database inside docker-image
test: Test application with pytest
test-cov: Test application with pytest and create coverage report
clean: Clean directory from garbage files
The Makefile also includes some conditional logic for including environment variables from a .env file, as well as parsing additional arguments for commands. There are also a few variables defined, such as "APPLICATION_NAME" and "TEST", which are used in the commands.
To use this Makefile, you can run "make" followed by the command name. For example, to create the database you would run "make db". Running "make help" will show the list of available commands and their descriptions.
Checking for file dependencies: Make sure that you have properly identified the dependencies between files in your Makefile. If a file that a command depends on has not been properly declared, it can cause errors.
Checking for variable naming conflicts: If you are using variables in your Makefile, make sure that you are using unique names and that they are not conflicting with reserved keywords or other variables.
Reviewing Makefile documentation: If you are new to Makefiles, it may be helpful to review documentation and examples to gain a better understanding of the syntax and structure. There are many resources available online that can provide guidance on creating and troubleshooting Makefiles.
(wordlist2,100,
APPLICATION_NAME = shortener
TEST = poetry run python -m pytest --verbosity=2 --showlocals --log-level=DEBUG
CODE = $(APPLICATION_NAME) tests
test: ##@Testing Test application with pytest
make db && $(TEST)
test-cov: ##@Testing Test application with pytest and create coverage report
make db && (TEST)−−cov=(APPLICATION_NAME) --cov-report html --cov-fail-under=70