-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
28 lines (21 loc) · 847 Bytes
/
Makefile
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
# Makefile for building and installing man pages
# Copyright (C) 2015 Jens John <[email protected]>
# Licensed under the GNU General Public License v3+
include config.mk
all: $(MANPAGE_TARGETS) $(RELEASE_FILE_TARGETS)
.PHONY: clean
clean:
rm -f -- $(MANPAGE_TARGETS) $(RELEASE_FILE_TARGETS) *.sed
# debhelper handles the install via debian/manpages and debian/install
#install: $(MANPAGE_TARGETS) $(RELEASE_FILE_TARGETS)
# $(foreach m,$^,$(shell install -Dm644 $(m) $(DESTDIR)$(PREFIX)/usr/share/man/man$(call mancat,$(m))/$(m)))
$(LSB_RELEASE_FILE_TARGET): config.mk
printf '%s\n' "$$LSB_RELEASE_FILE" > $@
bash -n $@
$(OS_RELEASE_FILE_TARGET): config.mk
printf '%s\n' "$$OS_RELEASE_FILE" > $@
bash -n $@
%.gz: %.mkd
sed "s/%VERSION%/$(OS_VERSION_ID)/" $< > $(<).sed
pandoc -s -f markdown -t man -o $(@:.gz=) $(<).sed
gzip -f9 $(@:.gz=)