forked from dlang/tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathposix.mak
50 lines (37 loc) · 748 Bytes
/
posix.mak
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
DMD ?= dmd
PREFIX ?= /usr/local/bin
WITH_DOC ?= no
DOC ?= ../d-programming-language.org/web
MODEL = 32
ifneq (,$(MODEL))
MODEL_FLAG ?= -m$(MODEL)
endif
TOOLS = \
rdmd \
ddemangle \
dget \
catdoc \
detab \
tolf
DOC_TOOLS = \
findtags \
dman
TAGS = \
expression.tag \
statement.tag
all: $(TOOLS)
$(TOOLS) $(DOC_TOOLS): %: %.d
$(DMD) $(MODEL_FLAG) $(DFLAGS) $(<)
$(TAGS): %.tag: $(DOC)/%.html findtags
./findtags $(filter %.html,$(^)) > $(@)
dman: $(TAGS)
dman: DFLAGS += -J.
install: $(TOOLS)
install -d $(DESTDIR)$(PREFIX)
install -t $(DESTDIR)$(PREFIX) $(^)
clean:
rm -f $(TOOLS) $(DOC_TOOLS) $(TAGS) *.o
ifeq ($(WITH_DOC),yes)
all install: $(DOC_TOOLS)
endif
.PHONY: all install clean