blob: daf3d1b17c52c1422d1d077dc388518e3ac2f329 (
plain)
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
|
all: begin $(DOCSET) $(DOCSET).docset
# Check that DOCSET is set
.PHONY: begin
begin:
ifndef DOCSET
$(error Error: DOCSET is not defined)
endif
# Get DOCSET from system files
$(DOCSET): getters/$(DOCSET).sh
rm -rf $(DOCSET)
getters/$(DOCSET).sh
# Convert to dash docset using python script
$(DOCSET).docset: $(DOCSET) mandocset.py
ifndef EXECUTABLE
python3 mandocset.py -o $(DOCSET) -p $(DOCSET)/
else
python3 mandocset.py -o $(DOCSET) -p $(DOCSET)/ -e "$(EXECUTABLE)"
endif
# Remove generated files/directories
.PHONY: clean
clean: begin
rm -rf $(DOCSET)
rm -rf $(DOCSET).docset
rm -rf $(DOCSET).tgz
# Create .tgz archive of generated docset directory
.PHONY: tgz
tgz: begin $(DOCSET).tgz
$(DOCSET).tgz: $(DOCSET).docset
tar --exclude='.DS_Store' -cvzf $(DOCSET).tgz $(DOCSET).docset
|