-
Notifications
You must be signed in to change notification settings - Fork 5
/
GNUmakefile.in
56 lines (40 loc) · 909 Bytes
/
GNUmakefile.in
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
56
prefix = @prefix@
bindir = @bindir@
datarootdir = @datarootdir@
mandir = @mandir@
man1dir = $(mandir)/man1
tests = $(testdir)/*.t
smandir = m
srcdir = s
testdir = t
basexy = @basexy@
cram = cram
cramflags = -v
rst2html = rst2html
rst2htmlflags = -v
.PHONY: all
all: fake fake.1
.PHONY: html
html: README.html
.PHONY: check
check: fake
env -i BUILDDIR="$$PWD" PATH="$$PATH" $(cram) $(cramflags) $(tests)
.PHONY: clean
clean:
rm -f fake *.1 *.html *.tmp $(testdir)/*.err
.PHONY: install
install: all | installdirs
install -m 0755 fake $(DESTDIR)$(bindir)
install -m 0644 fake.1 $(DESTDIR)$(man1dir)
.PHONY: installdirs
installdirs:
mkdir -p $(DESTDIR)$(bindir)
mkdir -p $(DESTDIR)$(man1dir)
fake: fake.tmp
install -m 755 $< $@
fake.tmp: $(srcdir)/fake.in
sed -e 's:@basexy''@:$(basexy):' < $< > $@
fake.1: $(smandir)/fake.1.in
cp $< $@
%.html: %.rst
$(rst2html) $(rst2htmlflags) $< $@