-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (31 loc) · 1.2 KB
/
Makefile
File metadata and controls
40 lines (31 loc) · 1.2 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 Advanced Library Search Firefox Extension
# --- Variables ---
# Output filename for the packaged extension
TARGET = advanced-library-search.zip
# You can use .xpi if you prefer, Firefox accepts both for temporary loading
# TARGET = advanced-library-search.xpi
# Source files and directories to include in the package
SOURCES = manifest.json index.html css/ js/ icons/
# --- Targets ---
# Default target: build the extension
all: build
# Build the extension package (zip file)
# -r: Recurse into directories
# -FS: Sync filesystem contents (useful for reproducibility if files change)
# -9: Use highest compression level
build: $(TARGET)
# zip option -x Exclude OS specific hidden files
$(TARGET): $(SOURCES)
@echo "Packaging extension into $(TARGET)..."
@# Ensure the target directory exists if needed (not strictly needed here)
@# mkdir -p $(dir $(TARGET))
@# Using zip command to create the archive
@zip -r -FS $(TARGET) $(SOURCES) -x '*.DS_Store' -x '*._*'
@echo "Extension packaged successfully: $(TARGET)"
# Clean up the build artifact
clean:
@echo "Cleaning up build artifacts..."
@rm -f $(TARGET)
@echo "Cleanup complete."
# Declare targets that are not actual files
.PHONY: all build clean