-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
56 lines (42 loc) · 1.14 KB
/
Makefile
File metadata and controls
56 lines (42 loc) · 1.14 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
MAJOR_VERSION=2
VERSION=2.1.1
TARGET := bash-boost-$(VERSION)
SRCS := $(shell find src -type f -name "*.sh" | sort)
full: $(TARGET) check doc
only: $(TARGET)
$(TARGET): $(SRCS) flatten src/bash-boost.sh.m4
$(RM) -r $@
cp -r src $@
cp -r bin $@
cp LICENSE $@
m4 -DM4_VERSION=$(VERSION) -DM4_YEAR="$(shell date +%Y)" $@/bash-boost.sh.m4 > $@/bash-boost.sh
$(RM) $@/bash-boost.sh.m4
./flatten $@
$(RM) ./latest
ln -s $(TARGET) latest
$(RM) ./bash-boost-$(MAJOR_VERSION).latest
ln -s $(TARGET) ./bash-boost-$(MAJOR_VERSION).latest
release: $(TARGET).tar.gz
$(TARGET).tar.gz: $(TARGET)
tar czvf $@ $<
clean:
$(RM) src/MANUAL.md
$(RM) -r $(TARGET)
$(RM) $(TARGET).tar.gz
$(RM) latest
$(RM) bash-boost-$(MAJOR_VERSION).latest
test: $(TARGET) check
@./test
@./test-portable
src/MANUAL.md: $(SRCS) docgen
$(RM) $@
./docgen --title $(VERSION) > $@
for f in $(SRCS); do ./docgen "$$f" >> $@; done
src/man/man1/bash-boost.1: src/MANUAL.md
$(RM) $@
mkdir -p src/man/man1
pandoc -s src/MANUAL.md -t man -o $@
doc: src/MANUAL.md src/man/man1/bash-boost.1
check: $(SRCS)
@./check $(SRCS)
.PHONY: full only release clean test doc check