forked from deepmancer/canada-visa
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (31 loc) · 1.12 KB
/
Copy pathMakefile
File metadata and controls
40 lines (31 loc) · 1.12 KB
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Makefile for building and managing Canada visa document templates
# Directories for sub-makefiles
PROOF_DIR = proof-of-financial-support
CLIENT_DIR = client-information
# Output file names
PROOF_OUTPUT_FILE_NAME = Proof_of_Means_of_Financial_Support
CLIENT_OUTPUT_FILE_NAME = Client_Information
# PDF file names
PROOF_PDF = proof-of-financial-support.pdf
CLIENT_PDF = client-information.pdf
.PHONY: all clean proof client copy
# Default target: build all documents and copy the output files
all: proof client copy
# Build the proof-of-financial-support document
proof:
$(MAKE) -C $(PROOF_DIR)
# Build the client-information document
client:
$(MAKE) -C $(CLIENT_DIR)
# Copy and rename the generated PDF files, then clean up
copy:
cp $(PROOF_DIR)/$(PROOF_PDF) ./$(PROOF_OUTPUT_FILE_NAME).pdf
cp $(CLIENT_DIR)/$(CLIENT_PDF) ./$(CLIENT_OUTPUT_FILE_NAME).pdf
$(MAKE) -C $(PROOF_DIR) clean
$(MAKE) -C $(CLIENT_DIR) clean
# Clean auxiliary files in both directories and remove output PDFs
clean:
$(MAKE) -C $(PROOF_DIR) clean
$(MAKE) -C $(CLIENT_DIR) clean
rm -f $(PROOF_OUTPUT_FILE_NAME).pdf
rm -f $(CLIENT_OUTPUT_FILE_NAME).pdf