You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
1.6 KiB

.PHONY: build run interactive clean test trace demo
# Build Docker image
build:
docker build -t lab8-task3-prolog .
# Run Prolog with family database (show basic info and exit)
run: build
docker run --rm -v $(PWD):/app lab8-task3-prolog swipl -g "consult('family.pl'), family_info_task3, halt"
# Interactive Prolog session
interactive: build
docker run -it --rm -v $(PWD):/app lab8-task3-prolog swipl family.pl
# Run test queries
test: build
docker run --rm -v $(PWD):/app lab8-task3-prolog swipl -g "consult('family.pl'), consult('tests.pl'), run_tests, halt"
# Run with tracing enabled
trace: build
docker run --rm -v $(PWD):/app lab8-task3-prolog swipl -g "consult('family.pl'), trace, grand_dats(ivan), notrace, halt"
# Show basic info about task3
info: build
docker run --rm -v $(PWD):/app lab8-task3-prolog swipl -g "consult('family.pl'), write('=== TASK3 INFO ==='), nl, family_info_task3, show_extended_relationships, halt"
# Run demo
demo: build
docker run --rm -v $(PWD):/app lab8-task3-prolog swipl -g "consult('family.pl'), consult('demo.pl'), demo, halt"
# Clean Docker images
clean:
docker rmi lab8-task3-prolog || true
# Help
help:
@echo "Available commands for lab8 task3:"
@echo " make build - Build Docker image"
@echo " make run - Run and show basic family info"
@echo " make info - Show detailed task3 information"
@echo " make demo - Run demonstration queries"
@echo " make test - Run test queries"
@echo " make interactive - Start interactive Prolog session"
@echo " make trace - Run with tracing enabled"
@echo " make clean - Clean Docker images"