-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
25 lines (19 loc) · 689 Bytes
/
Makefile
File metadata and controls
25 lines (19 loc) · 689 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# Define variables for directories
BACKEND_DIR = backend
FRONTEND_DIR = frontend
# Default target to run both backend and frontend
all: backend frontend
# Rule to run the backend
backend:
cd $(BACKEND_DIR) && ./mvnw clean && ./mvnw install -DskipTests && ./mvnw spring-boot:run & echo $$! > backend_pid
# Rule to run the frontend
frontend:
cd $(FRONTEND_DIR) && npm install && npm start
# Rule to wait for the backend process to complete
wait:
@pid=$$(cat backend_pid); if [ -n "$$pid" ]; then wait $$pid; fi
# Clean rule to remove generated files
clean:
@pid=$$(cat backend_pid); if [ -n "$$pid" ]; then kill $$pid; fi
rm -f backend_pid
.PHONY: all backend frontend wait clean